mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-08-01 19:18:28 -04:00
settings: make display config identify only show when interacting
This commit is contained in:
@@ -25,7 +25,7 @@ Recommends: danksearch
|
||||
Recommends: matugen
|
||||
Recommends: quickshell-git
|
||||
Recommends: NetworkManager
|
||||
Recommends: qt6-qtmultimedia
|
||||
Recommends: qt6-multimedia-imports
|
||||
Suggests: cups-pk-helper
|
||||
Suggests: qt6ct
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ Recommends: cava
|
||||
Recommends: danksearch
|
||||
Recommends: matugen
|
||||
Recommends: NetworkManager
|
||||
Recommends: qt6-qtmultimedia
|
||||
Recommends: qt6-multimedia-imports
|
||||
Suggests: cups-pk-helper
|
||||
Suggests: qt6ct
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -13,6 +13,7 @@ StyledRect {
|
||||
property int buttonSize: 32
|
||||
property var tooltipText: null
|
||||
property string tooltipSide: "bottom"
|
||||
readonly property alias pressed: stateLayer.pressed
|
||||
|
||||
signal clicked
|
||||
signal entered
|
||||
@@ -31,6 +32,7 @@ StyledRect {
|
||||
}
|
||||
|
||||
StateLayer {
|
||||
id: stateLayer
|
||||
disabled: !root.enabled
|
||||
stateColor: Theme.primary
|
||||
cornerRadius: root.radius
|
||||
|
||||
+260
-206
File diff suppressed because it is too large
Load Diff
@@ -2260,6 +2260,13 @@
|
||||
"reference": "",
|
||||
"comment": ""
|
||||
},
|
||||
{
|
||||
"term": "Available Updates (%1)",
|
||||
"translation": "",
|
||||
"context": "",
|
||||
"reference": "",
|
||||
"comment": ""
|
||||
},
|
||||
{
|
||||
"term": "Available in Detailed and Forecast view modes",
|
||||
"translation": "",
|
||||
@@ -2925,6 +2932,13 @@
|
||||
"reference": "",
|
||||
"comment": ""
|
||||
},
|
||||
{
|
||||
"term": "By %1",
|
||||
"translation": "",
|
||||
"context": "",
|
||||
"reference": "",
|
||||
"comment": ""
|
||||
},
|
||||
{
|
||||
"term": "CPU",
|
||||
"translation": "",
|
||||
@@ -5578,6 +5592,13 @@
|
||||
"reference": "",
|
||||
"comment": ""
|
||||
},
|
||||
{
|
||||
"term": "Diff",
|
||||
"translation": "",
|
||||
"context": "",
|
||||
"reference": "",
|
||||
"comment": ""
|
||||
},
|
||||
{
|
||||
"term": "Digital",
|
||||
"translation": "",
|
||||
@@ -7475,6 +7496,13 @@
|
||||
"reference": "",
|
||||
"comment": ""
|
||||
},
|
||||
{
|
||||
"term": "Failed to update %1: %2",
|
||||
"translation": "",
|
||||
"context": "",
|
||||
"reference": "",
|
||||
"comment": ""
|
||||
},
|
||||
{
|
||||
"term": "Failed to update VPN",
|
||||
"translation": "",
|
||||
@@ -9351,6 +9379,13 @@
|
||||
"reference": "",
|
||||
"comment": ""
|
||||
},
|
||||
{
|
||||
"term": "Identify",
|
||||
"translation": "",
|
||||
"context": "button for identifying monitor positions",
|
||||
"reference": "",
|
||||
"comment": ""
|
||||
},
|
||||
{
|
||||
"term": "Idle",
|
||||
"translation": "",
|
||||
@@ -12501,6 +12536,13 @@
|
||||
"reference": "",
|
||||
"comment": ""
|
||||
},
|
||||
{
|
||||
"term": "No updates available.",
|
||||
"translation": "",
|
||||
"context": "",
|
||||
"reference": "",
|
||||
"comment": ""
|
||||
},
|
||||
{
|
||||
"term": "No user specified",
|
||||
"translation": "",
|
||||
@@ -19529,6 +19571,20 @@
|
||||
"reference": "",
|
||||
"comment": ""
|
||||
},
|
||||
{
|
||||
"term": "Updating %1...",
|
||||
"translation": "",
|
||||
"context": "",
|
||||
"reference": "",
|
||||
"comment": ""
|
||||
},
|
||||
{
|
||||
"term": "Updating plugins...",
|
||||
"translation": "",
|
||||
"context": "",
|
||||
"reference": "",
|
||||
"comment": ""
|
||||
},
|
||||
{
|
||||
"term": "Upgrading...",
|
||||
"translation": "",
|
||||
@@ -21321,6 +21377,13 @@
|
||||
"reference": "",
|
||||
"comment": ""
|
||||
},
|
||||
{
|
||||
"term": "the Qt 6 Multimedia QML module",
|
||||
"translation": "",
|
||||
"context": "",
|
||||
"reference": "",
|
||||
"comment": ""
|
||||
},
|
||||
{
|
||||
"term": "this app",
|
||||
"translation": "",
|
||||
|
||||
Reference in New Issue
Block a user