mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-24 21:42:51 -05:00
media: restore tooltips
This commit is contained in:
@@ -16,6 +16,10 @@ Item {
|
||||
property MprisPlayer activePlayer: MprisController.activePlayer
|
||||
property var allPlayers: MprisController.availablePlayers
|
||||
|
||||
DankTooltipV2 {
|
||||
id: sharedTooltip
|
||||
}
|
||||
|
||||
readonly property bool isRightEdge: (SettingsData.barConfigs[0]?.position ?? SettingsData.Position.Top) === SettingsData.Position.Right
|
||||
readonly property bool volumeAvailable: (activePlayer && activePlayer.volumeSupported) || (AudioService.sink && AudioService.sink.audio)
|
||||
readonly property bool usePlayerVolume: activePlayer && activePlayer.volumeSupported
|
||||
@@ -1070,6 +1074,12 @@ Item {
|
||||
onClicked: {
|
||||
parent.playersExpanded = !parent.playersExpanded;
|
||||
}
|
||||
onEntered: {
|
||||
sharedTooltip.show("Media Players", playerSelectorButton, 0, 0, isRightEdge ? "right" : "left");
|
||||
}
|
||||
onExited: {
|
||||
sharedTooltip.hide();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1182,6 +1192,12 @@ Item {
|
||||
onClicked: {
|
||||
parent.devicesExpanded = !parent.devicesExpanded;
|
||||
}
|
||||
onEntered: {
|
||||
sharedTooltip.show("Output Device", audioDevicesButton, 0, 0, isRightEdge ? "right" : "left");
|
||||
}
|
||||
onExited: {
|
||||
sharedTooltip.hide();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -281,7 +281,7 @@ Column {
|
||||
onEntered: {
|
||||
var currentEnabled = modelData.minimumWidth !== undefined ? modelData.minimumWidth : true;
|
||||
const tooltipText = currentEnabled ? "Force Padding" : "Dynamic Width";
|
||||
sharedTooltip.show(tooltipText, minimumWidthButton, 0, 0);
|
||||
sharedTooltip.show(tooltipText, minimumWidthButton, 0, 0, "bottom");
|
||||
}
|
||||
onExited: {
|
||||
sharedTooltip.hide();
|
||||
@@ -302,7 +302,7 @@ Column {
|
||||
onEntered: {
|
||||
var currentEnabled = modelData.showSwap !== undefined ? modelData.showSwap : false;
|
||||
const tooltipText = currentEnabled ? "Hide Swap" : "Show Swap";
|
||||
sharedTooltip.show(tooltipText, showSwapButton, 0, 0);
|
||||
sharedTooltip.show(tooltipText, showSwapButton, 0, 0, "bottom");
|
||||
}
|
||||
onExited: {
|
||||
sharedTooltip.hide();
|
||||
@@ -324,7 +324,7 @@ Column {
|
||||
root.compactModeChanged("music", 0);
|
||||
}
|
||||
onEntered: {
|
||||
sharedTooltip.show("Small", smallSizeButton, 0, 0);
|
||||
sharedTooltip.show("Small", smallSizeButton, 0, 0, "bottom");
|
||||
}
|
||||
onExited: {
|
||||
sharedTooltip.hide();
|
||||
@@ -342,7 +342,7 @@ Column {
|
||||
root.compactModeChanged("music", 1);
|
||||
}
|
||||
onEntered: {
|
||||
sharedTooltip.show("Medium", mediumSizeButton, 0, 0);
|
||||
sharedTooltip.show("Medium", mediumSizeButton, 0, 0, "bottom");
|
||||
}
|
||||
onExited: {
|
||||
sharedTooltip.hide();
|
||||
@@ -360,7 +360,7 @@ Column {
|
||||
root.compactModeChanged("music", 2);
|
||||
}
|
||||
onEntered: {
|
||||
sharedTooltip.show("Large", largeSizeButton, 0, 0);
|
||||
sharedTooltip.show("Large", largeSizeButton, 0, 0, "bottom");
|
||||
}
|
||||
onExited: {
|
||||
sharedTooltip.hide();
|
||||
@@ -416,7 +416,7 @@ Column {
|
||||
} else if (modelData.id === "keyboard_layout_name") {
|
||||
tooltipText = SettingsData.keyboardLayoutNameCompactMode ? "Full Size" : "Compact";
|
||||
}
|
||||
sharedTooltip.show(tooltipText, compactModeButton, 0, 0);
|
||||
sharedTooltip.show(tooltipText, compactModeButton, 0, 0, "bottom");
|
||||
}
|
||||
onExited: {
|
||||
sharedTooltip.hide();
|
||||
@@ -435,7 +435,7 @@ Column {
|
||||
}
|
||||
onEntered: {
|
||||
const tooltipText = SettingsData.runningAppsGroupByApp ? "Ungroup" : "Group by App";
|
||||
sharedTooltip.show(tooltipText, groupByAppButton, 0, 0);
|
||||
sharedTooltip.show(tooltipText, groupByAppButton, 0, 0, "bottom");
|
||||
}
|
||||
onExited: {
|
||||
sharedTooltip.hide();
|
||||
@@ -523,7 +523,7 @@ Column {
|
||||
}
|
||||
onEntered: {
|
||||
const tooltipText = modelData.enabled ? "Hide" : "Show";
|
||||
sharedTooltip.show(tooltipText, visibilityButton, 0, 0);
|
||||
sharedTooltip.show(tooltipText, visibilityButton, 0, 0, "bottom");
|
||||
}
|
||||
onExited: {
|
||||
sharedTooltip.hide();
|
||||
|
||||
Reference in New Issue
Block a user