mirror of
https://github.com/zhuzichu520/FluentUI.git
synced 2024-10-31 00:07:36 +08:00
Merge pull request #232 from FeJQ/FluNavigationView-pr
给FluPaneItemSeparator增加spacing和size属性
This commit is contained in:
commit
9bd98c68e4
@ -323,6 +323,11 @@ FluObject{
|
||||
}
|
||||
}
|
||||
|
||||
FluPaneItemSeparator{
|
||||
spacing:20
|
||||
size:1
|
||||
}
|
||||
|
||||
FluPaneItemExpander{
|
||||
title:lang.other
|
||||
icon:FluentIcons.Shop
|
||||
|
@ -3,5 +3,16 @@ import QtQuick.Window
|
||||
import FluentUI
|
||||
|
||||
Rectangle {
|
||||
color: FluTheme.dark ? Qt.rgba(80/255,80/255,80/255,1) : Qt.rgba(210/255,210/255,210/255,1)
|
||||
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
|
||||
}
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -6,4 +6,6 @@ QtObject {
|
||||
readonly property string key : FluTools.uuid()
|
||||
property int _idx
|
||||
property var parent
|
||||
property real spacing
|
||||
property int size:1
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user