mirror of
https://github.com/zoriya/noctalia-shell.git
synced 2026-08-15 18:43:59 +00:00
Bar: improved "mini" density look
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user