mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-26 14:23:09 +00:00
Revert "phonepanel: Keep the Quick Settings buttons the same size"
This reverts commit c4903c25b9.
This commit is contained in:
parent
fa9b0c9710
commit
43f2f293cf
1 changed files with 8 additions and 3 deletions
|
|
@ -94,6 +94,9 @@ Item {
|
|||
spacing: 0
|
||||
height: Layout.minimumHeight * (1 - root.expandedRatio) + (Layout.maximumHeight * root.expandedRatio)
|
||||
|
||||
readonly property real cellSizeHint: PlasmaCore.Units.iconSizes.large + PlasmaCore.Units.smallSpacing * 6
|
||||
readonly property real columnWidth: Math.floor(width / Math.floor(width / cellSizeHint))
|
||||
|
||||
// top indicators (clock, widgets, etc.)
|
||||
IndicatorsRow {
|
||||
id: indicatorsRow
|
||||
|
|
@ -124,7 +127,7 @@ Item {
|
|||
|
||||
readonly property real cellSizeHint: PlasmaCore.Units.iconSizes.large + PlasmaCore.Units.smallSpacing * 6
|
||||
readonly property real columns: Math.floor(width / cellSizeHint)
|
||||
readonly property real columnWidth: (flow.width / (flow.columns + 1)) * (root.expandedRatio > 0.4 ? 1 : (1 - root.expandedRatio) + (flow.width / flow.columns) * root.expandedRatio)
|
||||
readonly property real columnWidth: Math.floor(width / columns)
|
||||
|
||||
spacing: 0
|
||||
|
||||
|
|
@ -133,8 +136,10 @@ Item {
|
|||
delegate: Delegate {
|
||||
id: delegateItem
|
||||
required property var modelData
|
||||
width: flow.columnWidth
|
||||
|
||||
width: root.expandedRatio < 0.4
|
||||
? Math.max(implicitWidth + PlasmaCore.Units.smallSpacing * 2, flow.width / (flow.columns + 1))
|
||||
: Math.max(implicitWidth + PlasmaCore.Units.smallSpacing * 2,
|
||||
(flow.width / (flow.columns + 1)) * (1 - root.expandedRatio) + (flow.width / flow.columns) * root.expandedRatio)
|
||||
|
||||
labelOpacity: y > 0 ? 1 : root.expandedRatio
|
||||
opacity: y <= 0 ? 1 : root.expandedRatio
|
||||
|
|
|
|||
Loading…
Reference in a new issue