Show the remote session indicator only during a remote session (#14981)
Hovering the indicators revealed it dimmed alongside the ones that can be switched on, though there is nothing to do with it there. An indicator can now opt out of that reveal, and remote session does. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
cf473b5c5d
commit
18e059d9a4
3 files changed
+13
-5
No files matched your search
@@ -13,9 +13,12 @@ BarIconButton {
|
||||
property string indicatorBlock: "single"
|
||||
property var indicatorHost: null
|
||||
property var activeOverride: null
|
||||
// An indicator with nothing to turn on, such as a remote session, shows only
|
||||
// while it is active, never among the inactive ones a hover reveals.
|
||||
property bool revealWhenInactive: true
|
||||
readonly property bool effectiveActive: activeOverride === null || activeOverride === undefined ? active : activeOverride === true
|
||||
readonly property bool belongsInBlock: indicatorBlock === "active" ? effectiveActive : (indicatorBlock === "inactive" ? !effectiveActive : true)
|
||||
readonly property bool inactiveRevealed: !effectiveActive && !!indicatorHost && indicatorHost.revealInactiveIndicators
|
||||
readonly property bool belongsInBlock: indicatorBlock === "active" ? effectiveActive : (indicatorBlock === "inactive" ? !effectiveActive && revealWhenInactive : true)
|
||||
readonly property bool inactiveRevealed: !effectiveActive && revealWhenInactive && !!indicatorHost && indicatorHost.revealInactiveIndicators
|
||||
|
||||
function extractData(raw) {
|
||||
return Util.parseModuleJson(raw)
|
||||
|
||||
@@ -10,11 +10,10 @@ BarIndicator {
|
||||
|
||||
active: remoteSessionService ? remoteSessionService.active : false
|
||||
activeText: ""
|
||||
inactiveText: ""
|
||||
activeTooltipText: peers.length > 0 ? "Remote session from " + peers.join(", ") : "Remote session"
|
||||
inactiveTooltipText: "Remote Session"
|
||||
useActiveColor: true
|
||||
activeColor: Commons.Color.urgent
|
||||
revealWhenInactive: false
|
||||
|
||||
Connections {
|
||||
target: root.indicatorHost
|
||||
|
||||
Reference in new issue
Block a user