mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-28 23:42:51 -05:00
meta: Vertical Bar, Notification Popup Position Options, ++
- CC Color picker widget - Tooltips in more places - Attempt to improve niri screen transitiosn
This commit is contained in:
@@ -305,6 +305,19 @@ Column {
|
||||
onClicked: {
|
||||
root.compactModeChanged("music", 0)
|
||||
}
|
||||
onEntered: {
|
||||
smallTooltipLoader.active = true
|
||||
if (smallTooltipLoader.item) {
|
||||
const p = smallSizeButton.mapToItem(null, smallSizeButton.width / 2, 0)
|
||||
smallTooltipLoader.item.show("Small", p.x, p.y - 40, null)
|
||||
}
|
||||
}
|
||||
onExited: {
|
||||
if (smallTooltipLoader.item) {
|
||||
smallTooltipLoader.item.hide()
|
||||
}
|
||||
smallTooltipLoader.active = false
|
||||
}
|
||||
}
|
||||
|
||||
DankActionButton {
|
||||
@@ -318,6 +331,19 @@ Column {
|
||||
onClicked: {
|
||||
root.compactModeChanged("music", 1)
|
||||
}
|
||||
onEntered: {
|
||||
mediumTooltipLoader.active = true
|
||||
if (mediumTooltipLoader.item) {
|
||||
const p = mediumSizeButton.mapToItem(null, mediumSizeButton.width / 2, 0)
|
||||
mediumTooltipLoader.item.show("Medium", p.x, p.y - 40, null)
|
||||
}
|
||||
}
|
||||
onExited: {
|
||||
if (mediumTooltipLoader.item) {
|
||||
mediumTooltipLoader.item.hide()
|
||||
}
|
||||
mediumTooltipLoader.active = false
|
||||
}
|
||||
}
|
||||
|
||||
DankActionButton {
|
||||
@@ -331,6 +357,19 @@ Column {
|
||||
onClicked: {
|
||||
root.compactModeChanged("music", 2)
|
||||
}
|
||||
onEntered: {
|
||||
largeTooltipLoader.active = true
|
||||
if (largeTooltipLoader.item) {
|
||||
const p = largeSizeButton.mapToItem(null, largeSizeButton.width / 2, 0)
|
||||
largeTooltipLoader.item.show("Large", p.x, p.y - 40, null)
|
||||
}
|
||||
}
|
||||
onExited: {
|
||||
if (largeTooltipLoader.item) {
|
||||
largeTooltipLoader.item.hide()
|
||||
}
|
||||
largeTooltipLoader.active = false
|
||||
}
|
||||
}
|
||||
|
||||
DankActionButton {
|
||||
@@ -373,6 +412,27 @@ Column {
|
||||
!SettingsData.runningAppsCompactMode)
|
||||
}
|
||||
}
|
||||
onEntered: {
|
||||
compactTooltipLoader.active = true
|
||||
if (compactTooltipLoader.item) {
|
||||
let tooltipText = "Toggle Compact Mode"
|
||||
if (modelData.id === "clock") {
|
||||
tooltipText = SettingsData.clockCompactMode ? "Full Size" : "Compact"
|
||||
} else if (modelData.id === "focusedWindow") {
|
||||
tooltipText = SettingsData.focusedWindowCompactMode ? "Full Size" : "Compact"
|
||||
} else if (modelData.id === "runningApps") {
|
||||
tooltipText = SettingsData.runningAppsCompactMode ? "Full Size" : "Compact"
|
||||
}
|
||||
const p = compactModeButton.mapToItem(null, compactModeButton.width / 2, 0)
|
||||
compactTooltipLoader.item.show(tooltipText, p.x, p.y - 40, null)
|
||||
}
|
||||
}
|
||||
onExited: {
|
||||
if (compactTooltipLoader.item) {
|
||||
compactTooltipLoader.item.hide()
|
||||
}
|
||||
compactTooltipLoader.active = false
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
@@ -426,6 +486,7 @@ Column {
|
||||
}
|
||||
|
||||
DankActionButton {
|
||||
id: visibilityButton
|
||||
visible: modelData.id !== "spacer"
|
||||
buttonSize: 32
|
||||
iconName: modelData.enabled ? "visibility" : "visibility_off"
|
||||
@@ -436,6 +497,20 @@ Column {
|
||||
modelData.id,
|
||||
!modelData.enabled)
|
||||
}
|
||||
onEntered: {
|
||||
visibilityTooltipLoader.active = true
|
||||
if (visibilityTooltipLoader.item) {
|
||||
const tooltipText = modelData.enabled ? "Hide" : "Show"
|
||||
const p = visibilityButton.mapToItem(null, visibilityButton.width / 2, 0)
|
||||
visibilityTooltipLoader.item.show(tooltipText, p.x, p.y - 40, null)
|
||||
}
|
||||
}
|
||||
onExited: {
|
||||
if (visibilityTooltipLoader.item) {
|
||||
visibilityTooltipLoader.item.hide()
|
||||
}
|
||||
visibilityTooltipLoader.active = false
|
||||
}
|
||||
}
|
||||
|
||||
Row {
|
||||
@@ -791,4 +866,34 @@ Column {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Loader {
|
||||
id: smallTooltipLoader
|
||||
active: false
|
||||
sourceComponent: DankTooltip {}
|
||||
}
|
||||
|
||||
Loader {
|
||||
id: mediumTooltipLoader
|
||||
active: false
|
||||
sourceComponent: DankTooltip {}
|
||||
}
|
||||
|
||||
Loader {
|
||||
id: largeTooltipLoader
|
||||
active: false
|
||||
sourceComponent: DankTooltip {}
|
||||
}
|
||||
|
||||
Loader {
|
||||
id: compactTooltipLoader
|
||||
active: false
|
||||
sourceComponent: DankTooltip {}
|
||||
}
|
||||
|
||||
Loader {
|
||||
id: visibilityTooltipLoader
|
||||
active: false
|
||||
sourceComponent: DankTooltip {}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user