mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-29 15:03:09 +00:00
statusbar: Fix polish loop
This commit is contained in:
parent
66c09cb708
commit
58faa0362c
1 changed files with 113 additions and 113 deletions
|
|
@ -85,9 +85,9 @@ Item {
|
||||||
|
|
||||||
// drop shadow for icons
|
// drop shadow for icons
|
||||||
MultiEffect {
|
MultiEffect {
|
||||||
anchors.fill: icons
|
anchors.fill: control
|
||||||
visible: showDropShadow
|
visible: showDropShadow
|
||||||
source: icons
|
source: control
|
||||||
blurMax: 16
|
blurMax: 16
|
||||||
shadowEnabled: true
|
shadowEnabled: true
|
||||||
shadowVerticalOffset: 1
|
shadowVerticalOffset: 1
|
||||||
|
|
@ -95,13 +95,9 @@ Item {
|
||||||
}
|
}
|
||||||
|
|
||||||
// screen top panel
|
// screen top panel
|
||||||
Item {
|
|
||||||
id: icons
|
|
||||||
z: 1
|
|
||||||
anchors.fill: parent
|
|
||||||
|
|
||||||
Controls.Control {
|
Controls.Control {
|
||||||
id: control
|
id: control
|
||||||
|
z: 1
|
||||||
topPadding: Kirigami.Units.smallSpacing
|
topPadding: Kirigami.Units.smallSpacing
|
||||||
bottomPadding: Kirigami.Units.smallSpacing
|
bottomPadding: Kirigami.Units.smallSpacing
|
||||||
rightPadding: Kirigami.Units.smallSpacing * 3
|
rightPadding: Kirigami.Units.smallSpacing * 3
|
||||||
|
|
@ -117,9 +113,12 @@ Item {
|
||||||
spacing: Kirigami.Units.smallSpacing / 2
|
spacing: Kirigami.Units.smallSpacing / 2
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
id: row
|
id: mainRow
|
||||||
|
readonly property real rowHeight: Components.Constants.topPanelHeight - Kirigami.Units.smallSpacing * 2
|
||||||
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.maximumHeight: Components.Constants.topPanelHeight - control.topPadding - control.bottomPadding
|
Layout.preferredHeight: rowHeight
|
||||||
|
|
||||||
spacing: 0
|
spacing: 0
|
||||||
|
|
||||||
// clock
|
// clock
|
||||||
|
|
@ -159,36 +158,38 @@ Item {
|
||||||
}
|
}
|
||||||
|
|
||||||
// system indicators
|
// system indicators
|
||||||
|
// using Layout.fillHeight here seems to cause polish loops, instead just define the height of the row
|
||||||
RowLayout {
|
RowLayout {
|
||||||
id: indicators
|
id: indicators
|
||||||
Layout.leftMargin: Kirigami.Units.smallSpacing // applets have different spacing needs
|
Layout.leftMargin: Kirigami.Units.smallSpacing // applets have different spacing needs
|
||||||
Layout.fillHeight: true
|
Layout.maximumHeight: mainRow.rowHeight
|
||||||
|
|
||||||
spacing: root.elementSpacing
|
spacing: root.elementSpacing
|
||||||
|
|
||||||
Indicators.SignalStrengthIndicator {
|
Indicators.SignalStrengthIndicator {
|
||||||
showLabel: false
|
showLabel: false
|
||||||
visible: root.showTime
|
visible: root.showTime
|
||||||
internetIndicator: internetIndicatorItem
|
internetIndicator: internetIndicatorItem
|
||||||
Layout.fillHeight: true
|
implicitHeight: mainRow.rowHeight
|
||||||
Layout.preferredWidth: height
|
Layout.preferredWidth: height
|
||||||
}
|
}
|
||||||
Indicators.BluetoothIndicator {
|
Indicators.BluetoothIndicator {
|
||||||
Layout.fillHeight: true
|
implicitHeight: mainRow.rowHeight
|
||||||
Layout.preferredWidth: height
|
Layout.preferredWidth: height
|
||||||
}
|
}
|
||||||
Indicators.InternetIndicator {
|
Indicators.InternetIndicator {
|
||||||
id: internetIndicatorItem
|
id: internetIndicatorItem
|
||||||
Layout.fillHeight: true
|
implicitHeight: mainRow.rowHeight
|
||||||
Layout.preferredWidth: height
|
Layout.preferredWidth: height
|
||||||
}
|
}
|
||||||
Indicators.VolumeIndicator {
|
Indicators.VolumeIndicator {
|
||||||
Layout.fillHeight: true
|
implicitHeight: mainRow.rowHeight
|
||||||
Layout.preferredWidth: height
|
Layout.preferredWidth: height
|
||||||
}
|
}
|
||||||
Indicators.BatteryIndicator {
|
Indicators.BatteryIndicator {
|
||||||
spacing: root.elementSpacing
|
spacing: root.elementSpacing
|
||||||
textPixelSize: root.textPixelSize
|
textPixelSize: root.textPixelSize
|
||||||
Layout.fillHeight: true
|
implicitHeight: mainRow.rowHeight
|
||||||
Layout.preferredWidth: height
|
Layout.preferredWidth: height
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -221,4 +222,3 @@ Item {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue