Initial commit
This commit is contained in:
commit
8d1a045333
333 changed files with 41117 additions and 0 deletions
41
ii/modules/bar/BarGroup.qml
Normal file
41
ii/modules/bar/BarGroup.qml
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
import qs.modules.common
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
|
||||
Item {
|
||||
id: root
|
||||
property bool vertical: false
|
||||
property real padding: 5
|
||||
implicitWidth: vertical ? Appearance.sizes.baseVerticalBarWidth : (gridLayout.implicitWidth + padding * 2)
|
||||
implicitHeight: vertical ? (gridLayout.implicitHeight + padding * 2) : Appearance.sizes.baseBarHeight
|
||||
default property alias items: gridLayout.children
|
||||
|
||||
Rectangle {
|
||||
id: background
|
||||
anchors {
|
||||
fill: parent
|
||||
topMargin: root.vertical ? 0 : 4
|
||||
bottomMargin: root.vertical ? 0 : 4
|
||||
leftMargin: root.vertical ? 4 : 0
|
||||
rightMargin: root.vertical ? 4 : 0
|
||||
}
|
||||
color: Config.options?.bar.borderless ? "transparent" : Appearance.colors.colLayer1
|
||||
radius: Appearance.rounding.small
|
||||
}
|
||||
|
||||
GridLayout {
|
||||
id: gridLayout
|
||||
columns: root.vertical ? 1 : -1
|
||||
anchors {
|
||||
verticalCenter: root.vertical ? undefined : parent.verticalCenter
|
||||
horizontalCenter: root.vertical ? parent.horizontalCenter : undefined
|
||||
left: root.vertical ? undefined : parent.left
|
||||
right: root.vertical ? undefined : parent.right
|
||||
top: root.vertical ? parent.top : undefined
|
||||
bottom: root.vertical ? parent.bottom : undefined
|
||||
margins: root.padding
|
||||
}
|
||||
columnSpacing: 4
|
||||
rowSpacing: 12
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue