controlcenter: better navrail
This commit is contained in:
parent
d9ffc13825
commit
b3d1a85f1c
2 changed files with 7 additions and 6 deletions
|
|
@ -6,6 +6,5 @@ JsonObject {
|
||||||
component Sizes: JsonObject {
|
component Sizes: JsonObject {
|
||||||
property real heightMult: 0.7
|
property real heightMult: 0.7
|
||||||
property real ratio: 16 / 9
|
property real ratio: 16 / 9
|
||||||
property real expandedNavWidth: 180
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -13,13 +13,15 @@ Item {
|
||||||
required property ShellScreen screen
|
required property ShellScreen screen
|
||||||
required property Session session
|
required property Session session
|
||||||
|
|
||||||
implicitWidth: layout.implicitWidth + Appearance.padding.large * 4
|
implicitWidth: layout.implicitWidth + Appearance.padding.larger * 4
|
||||||
implicitHeight: layout.implicitHeight + Appearance.padding.large * 2
|
implicitHeight: layout.implicitHeight + Appearance.padding.large * 2
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
id: layout
|
id: layout
|
||||||
|
|
||||||
anchors.centerIn: parent
|
anchors.left: parent.left
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
anchors.leftMargin: Appearance.padding.larger * 2
|
||||||
spacing: Appearance.spacing.normal
|
spacing: Appearance.spacing.normal
|
||||||
|
|
||||||
states: State {
|
states: State {
|
||||||
|
|
@ -45,7 +47,7 @@ Item {
|
||||||
id: menuBtn
|
id: menuBtn
|
||||||
|
|
||||||
Layout.topMargin: Appearance.spacing.large
|
Layout.topMargin: Appearance.spacing.large
|
||||||
Layout.fillWidth: true
|
implicitWidth: menuIcon.implicitWidth + menuIcon.anchors.leftMargin * 2
|
||||||
implicitHeight: menuIcon.implicitHeight + Appearance.padding.normal * 2
|
implicitHeight: menuIcon.implicitHeight + Appearance.padding.normal * 2
|
||||||
|
|
||||||
StateLayer {
|
StateLayer {
|
||||||
|
|
@ -125,7 +127,7 @@ Item {
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
anchors.leftMargin: Appearance.spacing.normal
|
anchors.leftMargin: Appearance.spacing.normal
|
||||||
|
|
||||||
text: qsTr("Open in window")
|
text: qsTr("Float window")
|
||||||
opacity: root.session.navExpanded ? 1 : 0
|
opacity: root.session.navExpanded ? 1 : 0
|
||||||
|
|
||||||
Behavior on opacity {
|
Behavior on opacity {
|
||||||
|
|
@ -183,7 +185,7 @@ Item {
|
||||||
PropertyChanges {
|
PropertyChanges {
|
||||||
expandedLabel.opacity: 1
|
expandedLabel.opacity: 1
|
||||||
smallLabel.opacity: 0
|
smallLabel.opacity: 0
|
||||||
background.implicitWidth: Config.controlCenter.sizes.expandedNavWidth
|
background.implicitWidth: icon.implicitWidth + icon.anchors.leftMargin * 2 + expandedLabel.anchors.leftMargin + expandedLabel.implicitWidth
|
||||||
background.implicitHeight: icon.implicitHeight + Appearance.padding.normal * 2
|
background.implicitHeight: icon.implicitHeight + Appearance.padding.normal * 2
|
||||||
item.implicitHeight: background.implicitHeight
|
item.implicitHeight: background.implicitHeight
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue