mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-08-07 05:58: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: matugen
|
||||||
Recommends: quickshell-git
|
Recommends: quickshell-git
|
||||||
Recommends: NetworkManager
|
Recommends: NetworkManager
|
||||||
Recommends: qt6-qtmultimedia
|
Recommends: qt6-multimedia-imports
|
||||||
Suggests: cups-pk-helper
|
Suggests: cups-pk-helper
|
||||||
Suggests: qt6ct
|
Suggests: qt6ct
|
||||||
|
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ Recommends: cava
|
|||||||
Recommends: danksearch
|
Recommends: danksearch
|
||||||
Recommends: matugen
|
Recommends: matugen
|
||||||
Recommends: NetworkManager
|
Recommends: NetworkManager
|
||||||
Recommends: qt6-qtmultimedia
|
Recommends: qt6-multimedia-imports
|
||||||
Suggests: cups-pk-helper
|
Suggests: cups-pk-helper
|
||||||
Suggests: qt6ct
|
Suggests: qt6ct
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,14 @@
|
|||||||
import QtQuick
|
import QtQuick
|
||||||
import qs.Common
|
import qs.Common
|
||||||
import qs.Services
|
import qs.Services
|
||||||
|
import qs.Widgets
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
|
property string draggingOutput: ""
|
||||||
|
readonly property bool identifyActive: draggingOutput !== "" || identifyButton.pressed
|
||||||
|
|
||||||
property var filteredOutputs: {
|
property var filteredOutputs: {
|
||||||
void (DisplayConfigState.pendingHyprlandChanges);
|
void (DisplayConfigState.pendingHyprlandChanges);
|
||||||
void (DisplayConfigState.pendingNiriChanges);
|
void (DisplayConfigState.pendingNiriChanges);
|
||||||
@@ -87,7 +91,26 @@ Rectangle {
|
|||||||
outputData: DisplayConfigState.allOutputs[modelData]
|
outputData: DisplayConfigState.allOutputs[modelData]
|
||||||
canvasScaleFactor: canvas.scaleFactor
|
canvasScaleFactor: canvas.scaleFactor
|
||||||
canvasOffset: canvas.offset
|
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 {
|
MonitorCanvas {
|
||||||
|
id: monitorCanvas
|
||||||
width: parent.width
|
width: parent.width
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -642,7 +643,7 @@ Item {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Loader {
|
Loader {
|
||||||
active: root.visible && root.identifyConfigured
|
active: root.visible && root.identifyConfigured && monitorCanvas.identifyActive
|
||||||
sourceComponent: MonitorIdentifyOverlay {}
|
sourceComponent: MonitorIdentifyOverlay {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,6 +7,43 @@ import qs.Modules.Settings.Widgets
|
|||||||
Item {
|
Item {
|
||||||
id: root
|
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 {
|
DankFlickable {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
clip: true
|
clip: true
|
||||||
@@ -173,7 +210,7 @@ Item {
|
|||||||
StyledText {
|
StyledText {
|
||||||
id: notAvailableText
|
id: notAvailableText
|
||||||
font.pixelSize: Theme.fontSizeSmall
|
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
|
wrapMode: Text.WordWrap
|
||||||
width: parent.width - Theme.iconSizeSmall - Theme.spacingM
|
width: parent.width - Theme.iconSizeSmall - Theme.spacingM
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ StyledRect {
|
|||||||
property int buttonSize: 32
|
property int buttonSize: 32
|
||||||
property var tooltipText: null
|
property var tooltipText: null
|
||||||
property string tooltipSide: "bottom"
|
property string tooltipSide: "bottom"
|
||||||
|
readonly property alias pressed: stateLayer.pressed
|
||||||
|
|
||||||
signal clicked
|
signal clicked
|
||||||
signal entered
|
signal entered
|
||||||
@@ -31,6 +32,7 @@ StyledRect {
|
|||||||
}
|
}
|
||||||
|
|
||||||
StateLayer {
|
StateLayer {
|
||||||
|
id: stateLayer
|
||||||
disabled: !root.enabled
|
disabled: !root.enabled
|
||||||
stateColor: Theme.primary
|
stateColor: Theme.primary
|
||||||
cornerRadius: root.radius
|
cornerRadius: root.radius
|
||||||
|
|||||||
+260
-206
File diff suppressed because it is too large
Load Diff
@@ -2260,6 +2260,13 @@
|
|||||||
"reference": "",
|
"reference": "",
|
||||||
"comment": ""
|
"comment": ""
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"term": "Available Updates (%1)",
|
||||||
|
"translation": "",
|
||||||
|
"context": "",
|
||||||
|
"reference": "",
|
||||||
|
"comment": ""
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"term": "Available in Detailed and Forecast view modes",
|
"term": "Available in Detailed and Forecast view modes",
|
||||||
"translation": "",
|
"translation": "",
|
||||||
@@ -2925,6 +2932,13 @@
|
|||||||
"reference": "",
|
"reference": "",
|
||||||
"comment": ""
|
"comment": ""
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"term": "By %1",
|
||||||
|
"translation": "",
|
||||||
|
"context": "",
|
||||||
|
"reference": "",
|
||||||
|
"comment": ""
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"term": "CPU",
|
"term": "CPU",
|
||||||
"translation": "",
|
"translation": "",
|
||||||
@@ -5578,6 +5592,13 @@
|
|||||||
"reference": "",
|
"reference": "",
|
||||||
"comment": ""
|
"comment": ""
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"term": "Diff",
|
||||||
|
"translation": "",
|
||||||
|
"context": "",
|
||||||
|
"reference": "",
|
||||||
|
"comment": ""
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"term": "Digital",
|
"term": "Digital",
|
||||||
"translation": "",
|
"translation": "",
|
||||||
@@ -7475,6 +7496,13 @@
|
|||||||
"reference": "",
|
"reference": "",
|
||||||
"comment": ""
|
"comment": ""
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"term": "Failed to update %1: %2",
|
||||||
|
"translation": "",
|
||||||
|
"context": "",
|
||||||
|
"reference": "",
|
||||||
|
"comment": ""
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"term": "Failed to update VPN",
|
"term": "Failed to update VPN",
|
||||||
"translation": "",
|
"translation": "",
|
||||||
@@ -9351,6 +9379,13 @@
|
|||||||
"reference": "",
|
"reference": "",
|
||||||
"comment": ""
|
"comment": ""
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"term": "Identify",
|
||||||
|
"translation": "",
|
||||||
|
"context": "button for identifying monitor positions",
|
||||||
|
"reference": "",
|
||||||
|
"comment": ""
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"term": "Idle",
|
"term": "Idle",
|
||||||
"translation": "",
|
"translation": "",
|
||||||
@@ -12501,6 +12536,13 @@
|
|||||||
"reference": "",
|
"reference": "",
|
||||||
"comment": ""
|
"comment": ""
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"term": "No updates available.",
|
||||||
|
"translation": "",
|
||||||
|
"context": "",
|
||||||
|
"reference": "",
|
||||||
|
"comment": ""
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"term": "No user specified",
|
"term": "No user specified",
|
||||||
"translation": "",
|
"translation": "",
|
||||||
@@ -19529,6 +19571,20 @@
|
|||||||
"reference": "",
|
"reference": "",
|
||||||
"comment": ""
|
"comment": ""
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"term": "Updating %1...",
|
||||||
|
"translation": "",
|
||||||
|
"context": "",
|
||||||
|
"reference": "",
|
||||||
|
"comment": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"term": "Updating plugins...",
|
||||||
|
"translation": "",
|
||||||
|
"context": "",
|
||||||
|
"reference": "",
|
||||||
|
"comment": ""
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"term": "Upgrading...",
|
"term": "Upgrading...",
|
||||||
"translation": "",
|
"translation": "",
|
||||||
@@ -21321,6 +21377,13 @@
|
|||||||
"reference": "",
|
"reference": "",
|
||||||
"comment": ""
|
"comment": ""
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"term": "the Qt 6 Multimedia QML module",
|
||||||
|
"translation": "",
|
||||||
|
"context": "",
|
||||||
|
"reference": "",
|
||||||
|
"comment": ""
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"term": "this app",
|
"term": "this app",
|
||||||
"translation": "",
|
"translation": "",
|
||||||
|
|||||||
Reference in New Issue
Block a user