Tooltips on all NIconButtons
This commit is contained in:
parent
c075b89dd2
commit
9990a88e90
19 changed files with 63 additions and 24 deletions
|
|
@ -283,7 +283,9 @@ NLoader {
|
|||
radius: Style.radiusMedium * scaling
|
||||
color: Colors.mSurface
|
||||
border.color: searchInput.activeFocus ? Colors.mPrimary : Colors.mOutline
|
||||
border.width: Math.max(1, searchInput.activeFocus ? Style.borderMedium * scaling : Style.borderThin * scaling)
|
||||
border.width: Math.max(
|
||||
1,
|
||||
searchInput.activeFocus ? Style.borderMedium * scaling : Style.borderThin * scaling)
|
||||
|
||||
Row {
|
||||
anchors.fill: parent
|
||||
|
|
@ -372,7 +374,8 @@ NLoader {
|
|||
color: (appCardArea.containsMouse || isSelected) ? Qt.darker(Colors.mPrimary,
|
||||
1.1) : Colors.mSurface
|
||||
border.color: (appCardArea.containsMouse || isSelected) ? Colors.mPrimary : "transparent"
|
||||
border.width: Math.max(1, (appCardArea.containsMouse || isSelected) ? Style.borderMedium * scaling : 0)
|
||||
border.width: Math.max(1, (appCardArea.containsMouse
|
||||
|| isSelected) ? Style.borderMedium * scaling : 0)
|
||||
|
||||
Behavior on color {
|
||||
ColorAnimation {
|
||||
|
|
@ -414,9 +417,9 @@ NLoader {
|
|||
// Clipboard image display
|
||||
Image {
|
||||
id: clipboardImage
|
||||
anchors.fill: parent
|
||||
anchors.margins: Style.marginTiny * scaling
|
||||
visible: modelData.type === 'image'
|
||||
anchors.fill: parent
|
||||
anchors.margins: Style.marginTiny * scaling
|
||||
visible: modelData.type === 'image'
|
||||
source: modelData.data || ""
|
||||
fillMode: Image.PreserveAspectCrop
|
||||
asynchronous: true
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ Item {
|
|||
|
||||
Behavior on height {
|
||||
SmoothedAnimation {
|
||||
duration: Style.animationFast
|
||||
duration: Style.animationFast
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ Row {
|
|||
// Timer to hide full title after window switch
|
||||
Timer {
|
||||
id: fullTitleTimer
|
||||
interval: Style.animationSlow * 4 // Show full title for 2 seconds
|
||||
interval: Style.animationSlow * 4 // Show full title for 2 seconds
|
||||
repeat: false
|
||||
onTriggered: {
|
||||
showingFullTitle = false
|
||||
|
|
@ -59,7 +59,7 @@ Row {
|
|||
|
||||
Behavior on width {
|
||||
NumberAnimation {
|
||||
duration: Style.animationNormal
|
||||
duration: Style.animationNormal
|
||||
easing.type: Easing.OutCubic
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -130,7 +130,7 @@ Variants {
|
|||
NIconButton {
|
||||
id: demoPanelToggle
|
||||
icon: "experiment"
|
||||
tooltipText: "Open demo panel"
|
||||
tooltipText: "Open Demo Panel"
|
||||
sizeMultiplier: 0.8
|
||||
showBorder: false
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
|
|
@ -142,7 +142,7 @@ Variants {
|
|||
NIconButton {
|
||||
id: sidePanelToggle
|
||||
icon: "widgets"
|
||||
tooltipText: "Open side panel"
|
||||
tooltipText: "Open Side Panel"
|
||||
sizeMultiplier: 0.8
|
||||
showBorder: false
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ Item {
|
|||
icon: getIcon()
|
||||
iconCircleColor: Colors.mPrimary
|
||||
collapsedIconColor: Colors.mOnSurface
|
||||
autoHide: true
|
||||
autoHide: false // Important to be false so we can hover as long as we want
|
||||
text: Math.round(BrightnessService.brightness) + "%"
|
||||
tooltipText: "Brightness: " + Math.round(
|
||||
BrightnessService.brightness) + "%\nMethod: " + BrightnessService.currentMethod
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ PopupWindow {
|
|||
property real anchorX
|
||||
property real anchorY
|
||||
|
||||
implicitWidth: Style.baseWidgetSize * 5.625 * scaling
|
||||
implicitWidth: Style.baseWidgetSize * 5.625 * scaling
|
||||
implicitHeight: Math.max(60 * scaling, listView.contentHeight + (Style.marginMedium * 2 * scaling))
|
||||
visible: false
|
||||
color: "transparent"
|
||||
|
|
|
|||
|
|
@ -31,16 +31,26 @@ Item {
|
|||
firstVolumeReceived = true
|
||||
} else {
|
||||
pill.show()
|
||||
externalHideTimer.restart()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Timer {
|
||||
id: externalHideTimer
|
||||
running: false
|
||||
interval: 1500
|
||||
onTriggered: {
|
||||
pill.hide()
|
||||
}
|
||||
}
|
||||
|
||||
NPill {
|
||||
id: pill
|
||||
icon: getIcon()
|
||||
iconCircleColor: Colors.mPrimary
|
||||
collapsedIconColor: Colors.mOnSurface
|
||||
autoHide: true
|
||||
autoHide: false // Important to be false so we can hover as long as we want
|
||||
text: Math.floor(Audio.volume * 100) + "%"
|
||||
tooltipText: "Volume: " + Math.round(
|
||||
Audio.volume * 100) + "%\nLeft click for advanced settings.\nScroll up/down to change volume."
|
||||
|
|
|
|||
|
|
@ -164,6 +164,7 @@ NLoader {
|
|||
|
||||
NIconButton {
|
||||
icon: "refresh"
|
||||
tooltipText: "Refresh Networks"
|
||||
sizeMultiplier: 0.8
|
||||
enabled: Settings.data.network.wifiEnabled && !network.isLoading
|
||||
onClicked: {
|
||||
|
|
@ -173,6 +174,7 @@ NLoader {
|
|||
|
||||
NIconButton {
|
||||
icon: "close"
|
||||
tooltipText: "Close"
|
||||
sizeMultiplier: 0.8
|
||||
onClicked: {
|
||||
wifiPanel.hide()
|
||||
|
|
|
|||
|
|
@ -120,6 +120,7 @@ NLoader {
|
|||
|
||||
NIconButton {
|
||||
icon: "chevron_left"
|
||||
tooltipText: "Previous Month"
|
||||
onClicked: {
|
||||
let newDate = new Date(grid.year, grid.month - 1, 1)
|
||||
grid.year = newDate.getFullYear()
|
||||
|
|
@ -138,6 +139,7 @@ NLoader {
|
|||
|
||||
NIconButton {
|
||||
icon: "chevron_right"
|
||||
tooltipText: "Next Month"
|
||||
onClicked: {
|
||||
let newDate = new Date(grid.year, grid.month + 1, 1)
|
||||
grid.year = newDate.getFullYear()
|
||||
|
|
|
|||
|
|
@ -154,6 +154,7 @@ NLoader {
|
|||
}
|
||||
NIconButton {
|
||||
icon: "refresh"
|
||||
tooltipText: "Reset Scaling"
|
||||
fontPointSize: Style.fontSizeLarge * scaling
|
||||
onClicked: {
|
||||
Scaling.overrideEnabled = false
|
||||
|
|
@ -178,6 +179,7 @@ NLoader {
|
|||
NIconButton {
|
||||
id: myIconButton
|
||||
icon: "celebration"
|
||||
tooltipText: "A nice tooltip"
|
||||
fontPointSize: Style.fontSizeLarge * scaling
|
||||
}
|
||||
|
||||
|
|
@ -318,6 +320,7 @@ NLoader {
|
|||
spacing: Style.marginSmall * scaling
|
||||
NIconButton {
|
||||
icon: "brightness_low"
|
||||
tooltipText: "Decrease Brightness"
|
||||
fontPointSize: Style.fontSizeLarge * scaling
|
||||
onClicked: {
|
||||
BrightnessService.decreaseBrightness()
|
||||
|
|
@ -335,6 +338,7 @@ NLoader {
|
|||
}
|
||||
NIconButton {
|
||||
icon: "brightness_high"
|
||||
tooltipText: "Increase Brightness"
|
||||
fontPointSize: Style.fontSizeLarge * scaling
|
||||
onClicked: {
|
||||
BrightnessService.increaseBrightness()
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ Variants {
|
|||
id: notificationStack
|
||||
anchors.top: parent.top
|
||||
anchors.right: parent.right
|
||||
spacing: Style.marginSmall * scaling
|
||||
spacing: Style.marginSmall * scaling
|
||||
width: 360 * scaling
|
||||
visible: true
|
||||
|
||||
|
|
@ -183,12 +183,14 @@ Variants {
|
|||
}
|
||||
|
||||
NIconButton {
|
||||
icon: "close"
|
||||
tooltipText: "Close"
|
||||
sizeMultiplier: 0.8
|
||||
showBorder: false
|
||||
anchors.top: parent.top
|
||||
anchors.right: parent.right
|
||||
anchors.margins: Style.marginSmall * scaling
|
||||
icon: "close"
|
||||
|
||||
onClicked: {
|
||||
animateOut()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -131,13 +131,14 @@ NLoader {
|
|||
|
||||
NIconButton {
|
||||
icon: "delete"
|
||||
tooltipText: "Clear History"
|
||||
sizeMultiplier: 0.8
|
||||
tooltipText: "Clear history"
|
||||
onClicked: NotificationService.clearHistory()
|
||||
}
|
||||
|
||||
NIconButton {
|
||||
icon: "close"
|
||||
tooltipText: "Close"
|
||||
sizeMultiplier: 0.8
|
||||
onClicked: {
|
||||
notificationPanel.hide()
|
||||
|
|
@ -207,8 +208,9 @@ NLoader {
|
|||
// Trash icon button
|
||||
NIconButton {
|
||||
icon: "delete"
|
||||
tooltipText: "Delete Notification"
|
||||
sizeMultiplier: 0.7
|
||||
tooltipText: "Delete notification"
|
||||
|
||||
onClicked: {
|
||||
console.log("[NotificationHistory] Removing notification:", summary)
|
||||
NotificationService.historyModel.remove(index)
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ NBox {
|
|||
text: "album"
|
||||
font.family: "Material Symbols Outlined"
|
||||
font.pointSize: Style.fontSizeXXL * 2.5 * scaling
|
||||
color: Colors.mOnSurfaceVariant
|
||||
color: Colors.mPrimary
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
}
|
||||
NText {
|
||||
|
|
@ -182,6 +182,7 @@ NBox {
|
|||
NText {
|
||||
anchors.centerIn: parent
|
||||
text: "album"
|
||||
color: Colors.mPrimary
|
||||
font.family: "Material Symbols Outlined"
|
||||
font.pointSize: Style.fontSizeLarge * 12 * scaling
|
||||
visible: !trackArt.visible
|
||||
|
|
@ -310,18 +311,24 @@ NBox {
|
|||
// Previous button
|
||||
NIconButton {
|
||||
icon: "skip_previous"
|
||||
tooltipText: "Previous Media"
|
||||
visible: MediaPlayer.canGoPrevious
|
||||
onClicked: MediaPlayer.canGoPrevious ? MediaPlayer.previous() : {}
|
||||
}
|
||||
|
||||
// Play/Pause button
|
||||
NIconButton {
|
||||
icon: MediaPlayer.isPlaying ? "pause" : "play_arrow"
|
||||
tooltipText: MediaPlayer.isPlaying ? "Pause" : "Play"
|
||||
visible: (MediaPlayer.canPlay || MediaPlayer.canPause)
|
||||
onClicked: (MediaPlayer.canPlay || MediaPlayer.canPause) ? MediaPlayer.playPause() : {}
|
||||
}
|
||||
|
||||
// Next button
|
||||
NIconButton {
|
||||
icon: "skip_next"
|
||||
tooltipText: "Next Media"
|
||||
visible: MediaPlayer.canGoNext
|
||||
onClicked: MediaPlayer.canGoNext ? MediaPlayer.next() : {}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@ NBox {
|
|||
// Performance
|
||||
NIconButton {
|
||||
icon: "speed"
|
||||
tooltipText: "Set Performance Power Profile"
|
||||
enabled: hasPP
|
||||
opacity: enabled ? Style.opacityFull : Style.opacityMedium
|
||||
showFilled: enabled && powerProfiles.profile === PowerProfile.Performance
|
||||
|
|
@ -40,6 +41,7 @@ NBox {
|
|||
// Balanced
|
||||
NIconButton {
|
||||
icon: "balance"
|
||||
tooltipText: "Set Balanced Power Profile"
|
||||
enabled: hasPP
|
||||
opacity: enabled ? Style.opacityFull : Style.opacityMedium
|
||||
showFilled: enabled && powerProfiles.profile === PowerProfile.Balanced
|
||||
|
|
@ -53,6 +55,7 @@ NBox {
|
|||
// Eco
|
||||
NIconButton {
|
||||
icon: "eco"
|
||||
tooltipText: "Set Eco Power Profile"
|
||||
enabled: hasPP
|
||||
opacity: enabled ? Style.opacityFull : Style.opacityMedium
|
||||
showFilled: enabled && powerProfiles.profile === PowerProfile.PowerSaver
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ NBox {
|
|||
|
||||
ColumnLayout {
|
||||
Layout.fillWidth: true
|
||||
spacing: Style.marginTiniest * scaling
|
||||
spacing: Style.marginTiniest * scaling
|
||||
NText {
|
||||
text: Quickshell.env("USER") || "user"
|
||||
font.weight: Style.fontWeightBold
|
||||
|
|
@ -57,15 +57,17 @@ NBox {
|
|||
}
|
||||
NIconButton {
|
||||
icon: "settings"
|
||||
tooltipText: "Open settings"
|
||||
tooltipText: "Open Settings"
|
||||
onClicked: {
|
||||
settingsPanel.requestedTab = SettingsPanel.Tab.General
|
||||
settingsPanel.isLoaded = !settingsPanel.isLoaded
|
||||
}
|
||||
}
|
||||
|
||||
NIconButton {
|
||||
id: powerButton
|
||||
icon: "power_settings_new"
|
||||
tooltipText: "Power Menu"
|
||||
onClicked: {
|
||||
powerMenu.show()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ NBox {
|
|||
// Screen Recorder
|
||||
NIconButton {
|
||||
icon: "videocam"
|
||||
tooltipText: ScreenRecorder.isRecording ? "Stop Screen Recording" : "Start Screen Recording"
|
||||
showFilled: ScreenRecorder.isRecording
|
||||
onClicked: {
|
||||
ScreenRecorder.toggleRecording()
|
||||
|
|
@ -31,6 +32,7 @@ NBox {
|
|||
// Wallpaper
|
||||
NIconButton {
|
||||
icon: "image"
|
||||
tooltipText: "Open Wallpaper Selector"
|
||||
onClicked: {
|
||||
settingsPanel.requestedTab = SettingsPanel.Tab.WallpaperSelector
|
||||
settingsPanel.isLoaded = true
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@ Rectangle {
|
|||
anchors.right: parent.right
|
||||
anchors.top: parent.top
|
||||
anchors.rightMargin: -6 * scaling * contentScale
|
||||
anchors.topMargin: Style.marginTiniest * scaling * contentScale
|
||||
anchors.topMargin: Style.marginTiniest * scaling * contentScale
|
||||
|
||||
Text {
|
||||
anchors.centerIn: parent
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ RowLayout {
|
|||
|
||||
Behavior on x {
|
||||
NumberAnimation {
|
||||
duration: Style.animationFast
|
||||
duration: Style.animationFast
|
||||
easing.type: Easing.OutCubic
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ Window {
|
|||
function _showNow() {
|
||||
// Compute new size everytime we show the tooltip
|
||||
width = Math.max(50 * scaling, tooltipText.implicitWidth + Style.marginLarge * 2 * scaling)
|
||||
height = Math.max(50 * scaling, tooltipText.implicitHeight + Style.marginMedium * 2 * scaling)
|
||||
height = Math.max(40 * scaling, tooltipText.implicitHeight + Style.marginMedium * 2 * scaling)
|
||||
|
||||
if (!target) {
|
||||
return
|
||||
|
|
@ -121,7 +121,7 @@ Window {
|
|||
// Timer to trigger show animation
|
||||
Timer {
|
||||
id: showTimer
|
||||
interval: Style.animationFast / 15 // Very short delay to ensure component is visible
|
||||
interval: Style.animationFast / 15 // Very short delay to ensure component is visible
|
||||
repeat: false
|
||||
onTriggered: {
|
||||
// Animate to final values
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue