mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-08-02 03:28:28 -04:00
settings: make display config identify only show when interacting
This commit is contained in:
@@ -1,10 +1,14 @@
|
||||
import QtQuick
|
||||
import qs.Common
|
||||
import qs.Services
|
||||
import qs.Widgets
|
||||
|
||||
Rectangle {
|
||||
id: root
|
||||
|
||||
property string draggingOutput: ""
|
||||
readonly property bool identifyActive: draggingOutput !== "" || identifyButton.pressed
|
||||
|
||||
property var filteredOutputs: {
|
||||
void (DisplayConfigState.pendingHyprlandChanges);
|
||||
void (DisplayConfigState.pendingNiriChanges);
|
||||
@@ -87,7 +91,26 @@ Rectangle {
|
||||
outputData: DisplayConfigState.allOutputs[modelData]
|
||||
canvasScaleFactor: canvas.scaleFactor
|
||||
canvasOffset: canvas.offset
|
||||
onIsDraggingChanged: {
|
||||
if (isDragging) {
|
||||
root.draggingOutput = outputName;
|
||||
return;
|
||||
}
|
||||
if (root.draggingOutput === outputName)
|
||||
root.draggingOutput = "";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
DankActionButton {
|
||||
id: identifyButton
|
||||
anchors.top: parent.top
|
||||
anchors.right: parent.right
|
||||
anchors.margins: Theme.spacingS
|
||||
iconName: "badge"
|
||||
iconColor: pressed ? Theme.primary : Theme.surfaceVariantText
|
||||
tooltipText: I18n.tr("Identify", "button for identifying monitor positions")
|
||||
z: 200
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user