Bar: improved "mini" density look

This commit is contained in:
ItsLemmy
2025-10-13 20:16:18 -04:00
parent 4e11f4e2e6
commit 00509170ef
29 changed files with 95 additions and 54 deletions
+9 -2
View File
@@ -13,10 +13,10 @@ Rectangle {
property string icon
property string tooltipText
property string tooltipDirection: "auto"
property string density: ""
property bool enabled: true
property bool allowClickWhenDisabled: false
property bool hovering: false
property bool compact: false
property color colorBg: Color.mSurfaceVariant
property color colorFg: Color.mPrimary
@@ -49,7 +49,14 @@ Rectangle {
NIcon {
icon: root.icon
pointSize: Math.max(1, root.compact ? root.width * 0.65 : root.width * 0.48)
pointSize: {
switch (root.density) {
case "compact":
return Math.max(1, root.width * 0.65)
default:
return Math.max(1, root.width * 0.48)
}
}
applyUiScale: root.applyUiScale
color: root.enabled && root.hovering ? colorFgHover : colorFg
// Center horizontally