mirror of
https://github.com/noctalia-dev/noctalia-shell.git
synced 2026-05-11 17:08:27 +08:00
Widgets: improved centering
This commit is contained in:
@@ -9,7 +9,6 @@ Rectangle {
|
||||
|
||||
// Multiplier to control how large the button container is relative to Style.baseWidgetSize
|
||||
property real sizeRatio: 1.0
|
||||
readonly property real size: Style.baseWidgetSize * sizeRatio * scaling
|
||||
|
||||
property string icon
|
||||
property string tooltipText
|
||||
@@ -30,8 +29,8 @@ Rectangle {
|
||||
signal rightClicked
|
||||
signal middleClicked
|
||||
|
||||
implicitWidth: Style.baseWidgetSize * scaling * sizeRatio
|
||||
implicitHeight: Style.baseWidgetSize * scaling * sizeRatio
|
||||
implicitWidth: Math.round(Style.baseWidgetSize * scaling * sizeRatio)
|
||||
implicitHeight: Math.round(Style.baseWidgetSize * scaling * sizeRatio)
|
||||
|
||||
opacity: root.enabled ? Style.opacityFull : Style.opacityMedium
|
||||
color: root.enabled && root.hovering ? colorBgHover : colorBg
|
||||
|
||||
Reference in New Issue
Block a user