Tray capsule hidden if empty + formatting
This commit is contained in:
parent
1993e28c18
commit
fdf475cabc
3 changed files with 14 additions and 15 deletions
|
|
@ -53,7 +53,8 @@ Singleton {
|
|||
}
|
||||
}
|
||||
if (!hasValidBarMonitor) {
|
||||
Logger.log("Settings", "No configured bar monitors found on system, clearing bar monitor list to show on all screens")
|
||||
Logger.log("Settings",
|
||||
"No configured bar monitors found on system, clearing bar monitor list to show on all screens")
|
||||
adapter.bar.monitors = []
|
||||
} else {
|
||||
Logger.log("Settings", "Found valid bar monitors, keeping configuration")
|
||||
|
|
@ -222,7 +223,7 @@ Singleton {
|
|||
property string fontFamily: "Roboto" // Family for all text
|
||||
}
|
||||
|
||||
// Scaling (not stored as JsonObject)
|
||||
// Scaling (not stored inside JsonObject, or it crashes)
|
||||
property var monitorsScaling: {
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,12 +43,10 @@ NLoader {
|
|||
}
|
||||
|
||||
margins {
|
||||
top: (Settings.data.bar.monitors.includes(modelData.name)
|
||||
|| (Settings.data.bar.monitors.length === 0)) && Settings.data.bar.barPosition === "top"
|
||||
? Math.floor(Style.barHeight * scaling) : 0
|
||||
bottom: (Settings.data.bar.monitors.includes(modelData.name)
|
||||
|| (Settings.data.bar.monitors.length === 0)) && Settings.data.bar.barPosition === "bottom"
|
||||
? Math.floor(Style.barHeight * scaling) : 0
|
||||
top: (Settings.data.bar.monitors.includes(modelData.name) || (Settings.data.bar.monitors.length === 0))
|
||||
&& Settings.data.bar.barPosition === "top" ? Math.floor(Style.barHeight * scaling) : 0
|
||||
bottom: (Settings.data.bar.monitors.includes(modelData.name) || (Settings.data.bar.monitors.length === 0))
|
||||
&& Settings.data.bar.barPosition === "bottom" ? Math.floor(Style.barHeight * scaling) : 0
|
||||
}
|
||||
|
||||
// Source we want to show only as a ring
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ import qs.Widgets
|
|||
Rectangle {
|
||||
readonly property real itemSize: 24 * scaling
|
||||
|
||||
visible: Settings.data.bar.showTray
|
||||
visible: Settings.data.bar.showTray && SystemTray.items.length > 0
|
||||
width: tray.width + Style.marginM * scaling * 2
|
||||
|
||||
height: Math.round(Style.capsuleHeight * scaling)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue