Commit d56d8ab2 authored by ivan tkachenko's avatar ivan tkachenko
Browse files

[lookandfeel] Refactor OsdItem's sizing to use preferred size first

Using "preferred" layout size as a source of truth is more correct than
choosing between minimum and maximum sizes for that same purpose. This
does not technically fix or impact anything per se; just makes the code
slightly better.
parent f5d9e5d5
......@@ -28,10 +28,12 @@ RowLayout {
spacing: PlasmaCore.Units.smallSpacing
Layout.minimumWidth: Math.max(Math.min(Screen.desktopAvailableWidth / 2, implicitWidth), PlasmaCore.Units.gridUnit * 15)
Layout.minimumHeight: PlasmaCore.Units.iconSizes.medium
Layout.maximumWidth: Layout.minimumWidth
Layout.maximumHeight: Layout.minimumHeight
Layout.preferredWidth: Math.max(Math.min(Screen.desktopAvailableWidth / 2, implicitWidth), PlasmaCore.Units.gridUnit * 15)
Layout.preferredHeight: PlasmaCore.Units.iconSizes.medium
Layout.minimumWidth: Layout.preferredWidth
Layout.minimumHeight: Layout.preferredHeight
Layout.maximumWidth: Layout.preferredWidth
Layout.maximumHeight: Layout.preferredHeight
PlasmaCore.IconItem {
Layout.leftMargin: PlasmaCore.Units.smallSpacing
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment