forked from Shinonome/dots-hyprland
tray: use more descriptive text for tooltip and update on entry (#1906)
This commit is contained in:
@@ -29,6 +29,12 @@ MouseArea {
|
|||||||
}
|
}
|
||||||
event.accepted = true;
|
event.accepted = true;
|
||||||
}
|
}
|
||||||
|
onEntered: {
|
||||||
|
tooltip.content = item.tooltipTitle.length > 0 ? item.tooltipTitle
|
||||||
|
: (item.title.length > 0 ? item.title : item.id);
|
||||||
|
if (item.tooltipDescription.length > 0) tooltip.content += " • " + item.tooltipDescription;
|
||||||
|
if (Config.options.bar.tray.showItemId) tooltip.content += "\n[" + item.id + "]";
|
||||||
|
}
|
||||||
|
|
||||||
QsMenuAnchor {
|
QsMenuAnchor {
|
||||||
id: menu
|
id: menu
|
||||||
@@ -71,11 +77,7 @@ MouseArea {
|
|||||||
}
|
}
|
||||||
|
|
||||||
StyledToolTip {
|
StyledToolTip {
|
||||||
content: {
|
id: tooltip
|
||||||
let c = root.item.id
|
|
||||||
if (root.item.tooltipDescription.length > 0) c += " • " + root.item.tooltipDescription
|
|
||||||
return c;
|
|
||||||
}
|
|
||||||
extraVisibleCondition: root.containsMouse
|
extraVisibleCondition: root.containsMouse
|
||||||
alternativeVisibleCondition: extraVisibleCondition
|
alternativeVisibleCondition: extraVisibleCondition
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -172,6 +172,7 @@ Singleton {
|
|||||||
}
|
}
|
||||||
property JsonObject tray: JsonObject {
|
property JsonObject tray: JsonObject {
|
||||||
property bool monochromeIcons: true
|
property bool monochromeIcons: true
|
||||||
|
property bool showItemId: false
|
||||||
property bool invertPinnedItems: false // Makes the below a whitelist for the tray and blacklist for the pinned area
|
property bool invertPinnedItems: false // Makes the below a whitelist for the tray and blacklist for the pinned area
|
||||||
property list<string> pinnedItems: [ "Fcitx" ]
|
property list<string> pinnedItems: [ "Fcitx" ]
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user