mirror of
https://github.com/zhuzichu520/FluentUI.git
synced 2024-11-23 11:17:15 +08:00
给FluPaneItemSeparator增加spacing和size属性
This commit is contained in:
parent
dde817923c
commit
7cd9b7c6bc
@ -323,6 +323,11 @@ FluObject{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FluPaneItemSeparator{
|
||||||
|
spacing:20
|
||||||
|
size:1
|
||||||
|
}
|
||||||
|
|
||||||
FluPaneItemExpander{
|
FluPaneItemExpander{
|
||||||
title:lang.other
|
title:lang.other
|
||||||
icon:FluentIcons.Shop
|
icon:FluentIcons.Shop
|
||||||
|
@ -3,5 +3,16 @@ import QtQuick.Window
|
|||||||
import FluentUI
|
import FluentUI
|
||||||
|
|
||||||
Rectangle {
|
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)
|
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
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -110,11 +110,12 @@ Item {
|
|||||||
id:com_panel_item_separatorr
|
id:com_panel_item_separatorr
|
||||||
FluDivider{
|
FluDivider{
|
||||||
width: layout_list.width
|
width: layout_list.width
|
||||||
height: {
|
spacing: model.spacing
|
||||||
|
separatorHeight: {
|
||||||
if(model.parent){
|
if(model.parent){
|
||||||
return model.parent.isExpand ? 1 : 0
|
return model.parent.isExpand ? model.size : 0
|
||||||
}
|
}
|
||||||
return 1
|
return model.size
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -6,4 +6,6 @@ QtObject {
|
|||||||
readonly property string key : FluTools.uuid()
|
readonly property string key : FluTools.uuid()
|
||||||
property int _idx
|
property int _idx
|
||||||
property var parent
|
property var parent
|
||||||
|
property real spacing
|
||||||
|
property int size:1
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user