给FluPaneItemSeparator增加spacing和size属性

This commit is contained in:
HARRISON-FENG\FengJQ 2023-08-03 18:14:52 +08:00
parent dde817923c
commit 7cd9b7c6bc
4 changed files with 23 additions and 4 deletions

View File

@ -323,6 +323,11 @@ FluObject{
}
}
FluPaneItemSeparator{
spacing:20
size:1
}
FluPaneItemExpander{
title:lang.other
icon:FluentIcons.Shop

View File

@ -3,5 +3,16 @@ import QtQuick.Window
import FluentUI
Rectangle {
property real spacing
property alias separatorHeight:separator.height
id:root
color:Qt.rgba(0,0,0,0)
height: spacing*2+separator.height
Rectangle{
id:separator
color: FluTheme.dark ? Qt.rgba(80/255,80/255,80/255,1) : Qt.rgba(210/255,210/255,210/255,1)
width:parent.width
anchors.centerIn: parent
}
}

View File

@ -110,11 +110,12 @@ Item {
id:com_panel_item_separatorr
FluDivider{
width: layout_list.width
height: {
spacing: model.spacing
separatorHeight: {
if(model.parent){
return model.parent.isExpand ? 1 : 0
return model.parent.isExpand ? model.size : 0
}
return 1
return model.size
}
}
}

View File

@ -6,4 +6,6 @@ QtObject {
readonly property string key : FluTools.uuid()
property int _idx
property var parent
property real spacing
property int size:1
}