controlcenter: hide float button when floating
This commit is contained in:
parent
d7e3be861f
commit
964d5deaa2
4 changed files with 64 additions and 61 deletions
|
|
@ -12,9 +12,9 @@ Item {
|
|||
id: root
|
||||
|
||||
required property ShellScreen screen
|
||||
property bool floating
|
||||
readonly property int rounding: floating ? 0 : Appearance.rounding.normal
|
||||
|
||||
property alias floating: session.floating
|
||||
property alias active: session.active
|
||||
property alias navExpanded: session.navExpanded
|
||||
|
||||
|
|
|
|||
|
|
@ -80,13 +80,14 @@ Item {
|
|||
}
|
||||
}
|
||||
|
||||
StyledRect {
|
||||
id: normalWinBtn
|
||||
Loader {
|
||||
asynchronous: true
|
||||
active: !root.session.floating
|
||||
visible: active
|
||||
|
||||
sourceComponent: StyledRect {
|
||||
readonly property int nonAnimWidth: normalWinIcon.implicitWidth + (root.session.navExpanded ? normalWinLabel.anchors.leftMargin + normalWinLabel.implicitWidth : 0) + normalWinIcon.anchors.leftMargin * 2
|
||||
|
||||
Layout.bottomMargin: Appearance.spacing.large * 2
|
||||
|
||||
implicitWidth: nonAnimWidth
|
||||
implicitHeight: root.session.navExpanded ? normalWinIcon.implicitHeight + Appearance.padding.normal * 2 : nonAnimWidth
|
||||
|
||||
|
|
@ -153,8 +154,10 @@ Item {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
NavItem {
|
||||
Layout.topMargin: Appearance.spacing.large * 2
|
||||
icon: "network_manage"
|
||||
label: "network"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ QtObject {
|
|||
readonly property list<string> panes: ["network", "bluetooth", "audio"]
|
||||
|
||||
required property var root
|
||||
property bool floating: false
|
||||
property string active: panes[0]
|
||||
property int activeIndex: 0
|
||||
property bool navExpanded: false
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@ import qs.config
|
|||
import Quickshell.Widgets
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import QtQuick.Controls
|
||||
|
||||
RowLayout {
|
||||
id: root
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue