mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-26 14:23: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
|
||||
MultiEffect {
|
||||
anchors.fill: icons
|
||||
anchors.fill: control
|
||||
visible: showDropShadow
|
||||
source: icons
|
||||
source: control
|
||||
blurMax: 16
|
||||
shadowEnabled: true
|
||||
shadowVerticalOffset: 1
|
||||
|
|
@ -95,13 +95,9 @@ Item {
|
|||
}
|
||||
|
||||
// screen top panel
|
||||
Item {
|
||||
id: icons
|
||||
z: 1
|
||||
anchors.fill: parent
|
||||
|
||||
Controls.Control {
|
||||
id: control
|
||||
z: 1
|
||||
topPadding: Kirigami.Units.smallSpacing
|
||||
bottomPadding: Kirigami.Units.smallSpacing
|
||||
rightPadding: Kirigami.Units.smallSpacing * 3
|
||||
|
|
@ -117,9 +113,12 @@ Item {
|
|||
spacing: Kirigami.Units.smallSpacing / 2
|
||||
|
||||
RowLayout {
|
||||
id: row
|
||||
id: mainRow
|
||||
readonly property real rowHeight: Components.Constants.topPanelHeight - Kirigami.Units.smallSpacing * 2
|
||||
|
||||
Layout.fillWidth: true
|
||||
Layout.maximumHeight: Components.Constants.topPanelHeight - control.topPadding - control.bottomPadding
|
||||
Layout.preferredHeight: rowHeight
|
||||
|
||||
spacing: 0
|
||||
|
||||
// clock
|
||||
|
|
@ -159,36 +158,38 @@ Item {
|
|||
}
|
||||
|
||||
// system indicators
|
||||
// using Layout.fillHeight here seems to cause polish loops, instead just define the height of the row
|
||||
RowLayout {
|
||||
id: indicators
|
||||
Layout.leftMargin: Kirigami.Units.smallSpacing // applets have different spacing needs
|
||||
Layout.fillHeight: true
|
||||
Layout.maximumHeight: mainRow.rowHeight
|
||||
|
||||
spacing: root.elementSpacing
|
||||
|
||||
Indicators.SignalStrengthIndicator {
|
||||
showLabel: false
|
||||
visible: root.showTime
|
||||
internetIndicator: internetIndicatorItem
|
||||
Layout.fillHeight: true
|
||||
implicitHeight: mainRow.rowHeight
|
||||
Layout.preferredWidth: height
|
||||
}
|
||||
Indicators.BluetoothIndicator {
|
||||
Layout.fillHeight: true
|
||||
implicitHeight: mainRow.rowHeight
|
||||
Layout.preferredWidth: height
|
||||
}
|
||||
Indicators.InternetIndicator {
|
||||
id: internetIndicatorItem
|
||||
Layout.fillHeight: true
|
||||
implicitHeight: mainRow.rowHeight
|
||||
Layout.preferredWidth: height
|
||||
}
|
||||
Indicators.VolumeIndicator {
|
||||
Layout.fillHeight: true
|
||||
implicitHeight: mainRow.rowHeight
|
||||
Layout.preferredWidth: height
|
||||
}
|
||||
Indicators.BatteryIndicator {
|
||||
spacing: root.elementSpacing
|
||||
textPixelSize: root.textPixelSize
|
||||
Layout.fillHeight: true
|
||||
implicitHeight: mainRow.rowHeight
|
||||
Layout.preferredWidth: height
|
||||
}
|
||||
}
|
||||
|
|
@ -221,4 +222,3 @@ Item {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue