Dont scale NIconButton in the bar

This commit is contained in:
ItsLemmy
2025-10-12 16:54:36 -04:00
parent c456cb1ee6
commit 5a47f88d48
17 changed files with 22 additions and 7 deletions
+5 -3
View File
@@ -7,7 +7,8 @@ import qs.Services
Rectangle {
id: root
property real baseSize: Style.baseWidgetSize * Style.uiScaleRatio
property real baseSize: Style.baseWidgetSize
property bool applyUiScale: true
property string icon
property string tooltipText
@@ -30,8 +31,8 @@ Rectangle {
signal rightClicked
signal middleClicked
implicitWidth: Math.round(baseSize)
implicitHeight: Math.round(baseSize)
implicitWidth: applyUiScale ? Math.round(baseSize * applyUiScale) : Math.round(baseSize)
implicitHeight: applyUiScale ? Math.round(baseSize * applyUiScale) : Math.round(baseSize)
opacity: root.enabled ? Style.opacityFull : Style.opacityMedium
color: root.enabled && root.hovering ? colorBgHover : colorBg
@@ -49,6 +50,7 @@ Rectangle {
NIcon {
icon: root.icon
pointSize: Math.max(1, root.compact ? root.width * 0.65 : root.width * 0.48)
applyUiScale: root.applyUiScale
color: root.enabled && root.hovering ? colorFgHover : colorFg
// Center horizontally
x: (root.width - width) / 2