mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-08-04 12:38:31 -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
|
||||
}
|
||||
}
|
||||
|
||||
@@ -535,6 +535,7 @@ Item {
|
||||
}
|
||||
|
||||
MonitorCanvas {
|
||||
id: monitorCanvas
|
||||
width: parent.width
|
||||
}
|
||||
|
||||
@@ -642,7 +643,7 @@ Item {
|
||||
}
|
||||
|
||||
Loader {
|
||||
active: root.visible && root.identifyConfigured
|
||||
active: root.visible && root.identifyConfigured && monitorCanvas.identifyActive
|
||||
sourceComponent: MonitorIdentifyOverlay {}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,6 +7,43 @@ import qs.Modules.Settings.Widgets
|
||||
Item {
|
||||
id: root
|
||||
|
||||
readonly property string multimediaPackage: {
|
||||
const id = (SystemUpdateService.distribution || "").toLowerCase();
|
||||
if (id.includes("suse"))
|
||||
return "qt6-multimedia-imports";
|
||||
switch (id) {
|
||||
case "fedora":
|
||||
case "fedora-asahi-remix":
|
||||
case "nobara":
|
||||
case "bazzite":
|
||||
case "bluefin":
|
||||
case "ultramarine":
|
||||
case "evernight":
|
||||
return "qt6-qtmultimedia";
|
||||
case "debian":
|
||||
case "ubuntu":
|
||||
case "linuxmint":
|
||||
case "pop":
|
||||
case "elementary":
|
||||
case "zorin":
|
||||
return "qml6-module-qtmultimedia";
|
||||
case "arch":
|
||||
case "archarm":
|
||||
case "archcraft":
|
||||
case "cachyos":
|
||||
case "catos":
|
||||
case "endeavouros":
|
||||
case "manjaro":
|
||||
case "garuda":
|
||||
case "artix":
|
||||
case "obarun":
|
||||
case "xerolinux":
|
||||
return "qt6-multimedia";
|
||||
default:
|
||||
return I18n.tr("the Qt 6 Multimedia QML module");
|
||||
}
|
||||
}
|
||||
|
||||
DankFlickable {
|
||||
anchors.fill: parent
|
||||
clip: true
|
||||
@@ -173,7 +210,7 @@ Item {
|
||||
StyledText {
|
||||
id: notAvailableText
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
text: I18n.tr("System sounds are not available. Install %1 for sound support.").arg("qt6-multimedia")
|
||||
text: I18n.tr("System sounds are not available. Install %1 for sound support.").arg(root.multimediaPackage)
|
||||
wrapMode: Text.WordWrap
|
||||
width: parent.width - Theme.iconSizeSmall - Theme.spacingM
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
|
||||
Reference in New Issue
Block a user