mirror of
https://github.com/noctalia-dev/noctalia-shell.git
synced 2026-05-11 17:08:27 +08:00
fix(workspace): minor cleanup
This commit is contained in:
@@ -782,6 +782,7 @@ Item {
|
||||
// liveWindows is reassigned on scroll/focus; delegates can outlive rows and see null modelData
|
||||
readonly property var win: modelData
|
||||
readonly property bool winOk: win !== undefined && win !== null
|
||||
readonly property bool isFocused: winOk && win.isFocused
|
||||
|
||||
width: winOk ? root.iconSize : 0
|
||||
height: winOk ? root.iconSize : 0
|
||||
@@ -800,24 +801,24 @@ Item {
|
||||
source: {
|
||||
root.iconRevision; // Force re-evaluation when revision changes
|
||||
const w = groupedTaskbarItem.win;
|
||||
if (!w || !w.appId)
|
||||
if (!w)
|
||||
return "";
|
||||
return ThemeIcons.iconForAppId(w.appId.toLowerCase());
|
||||
return ThemeIcons.iconForAppId(w.appId?.toLowerCase());
|
||||
}
|
||||
smooth: true
|
||||
asynchronous: true
|
||||
opacity: groupedTaskbarItem.winOk && groupedTaskbarItem.win.isFocused ? Style.opacityFull : unfocusedIconsOpacity
|
||||
layer.enabled: root.colorizeIcons && groupedTaskbarItem.winOk && !groupedTaskbarItem.win.isFocused
|
||||
opacity: groupedTaskbarItem.isFocused ? Style.opacityFull : unfocusedIconsOpacity
|
||||
layer.enabled: root.colorizeIcons && !groupedTaskbarItem.isFocused
|
||||
|
||||
Rectangle {
|
||||
id: groupedFocusIndicator
|
||||
visible: (groupedTaskbarItem.winOk && groupedTaskbarItem.win.isFocused) || windowHoverHandler.hovered
|
||||
visible: groupedTaskbarItem.isFocused || windowHoverHandler.hovered
|
||||
anchors.bottomMargin: -2
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
width: Style.toOdd(root.iconSize * 0.25)
|
||||
height: 4
|
||||
color: (groupedTaskbarItem.winOk && groupedTaskbarItem.win.isFocused) ? Color.mPrimary : Color.mHover
|
||||
color: groupedTaskbarItem.isFocused ? Color.mPrimary : Color.mHover
|
||||
radius: Math.min(Style.radiusXXS, width / 2)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user