Tooltip improvements (only use period for long sentences)

This commit is contained in:
LemmyCook
2025-09-19 10:38:10 -04:00
parent 61203dc5fd
commit ed557af1c2
28 changed files with 42 additions and 84 deletions
+1 -1
View File
@@ -21,7 +21,7 @@ NIconButton {
colorBorderHover: Color.transparent
icon: Settings.data.network.bluetoothEnabled ? "bluetooth" : "bluetooth-off"
tooltipText: "Bluetooth devices."
tooltipText: "Bluetooth devices"
onClicked: PanelService.getPanel("bluetoothPanel")?.toggle(this)
onRightClicked: PanelService.getPanel("bluetoothPanel")?.toggle(this)
}
+1 -1
View File
@@ -10,7 +10,7 @@ NIconButton {
property real scaling: 1.0
icon: "dark-mode"
tooltipText: "Toggle light/dark mode."
tooltipText: `Switch to ${Settings.data.colorSchemes.darkMode ? "light" : "dark" } mode`
compact: (Settings.data.bar.density === "compact")
baseSize: Style.capsuleHeight
colorBg: Settings.data.colorSchemes.darkMode ? (Settings.data.bar.showCapsule ? Color.mSurfaceVariant : Color.transparent) : Color.mPrimary
+2 -4
View File
@@ -48,13 +48,11 @@ Item {
icon: "keyboard"
autoHide: false // Important to be false so we can hover as long as we want
text: currentLayout.toUpperCase()
tooltipText: "Keyboard layout: " + currentLayout.toUpperCase()
tooltipText: `${currentLayout.toUpperCase()} keyboard layout`
forceOpen: root.displayMode === "forceOpen"
forceClose: root.displayMode === "alwaysHide"
onClicked: {
// You could open keyboard settings here if needed
// For now, just show the current layout
// You could open keyboard settings here if needed.
}
}
}
+1 -1
View File
@@ -97,7 +97,7 @@ Item {
suffix: "%"
forceOpen: displayMode === "alwaysShow"
forceClose: displayMode === "alwaysHide"
tooltipText: "Microphone: " + Math.round(AudioService.inputVolume * 100) + "%\nLeft click to toggle mute.\nRight click for settings.\nScroll to modify volume."
tooltipText: "Microphone volume at " + Math.round(AudioService.inputVolume * 100) + "%\nLeft click to toggle mute. Right click for settings.\nScroll to modify volume."
onWheel: function (delta) {
wheelAccumulator += delta
+1 -1
View File
@@ -22,7 +22,7 @@ NIconButton {
colorBorderHover: Color.transparent
icon: Settings.data.nightLight.enabled ? (Settings.data.nightLight.forced ? "nightlight-forced" : "nightlight-on") : "nightlight-off"
tooltipText: `Night light: ${Settings.data.nightLight.enabled ? (Settings.data.nightLight.forced ? "forced." : "enabled.") : "disabled."}\nLeft click to cycle (disabled normal forced).\nRight click to access settings.`
tooltipText: `Night light is ${Settings.data.nightLight.enabled ? (Settings.data.nightLight.forced ? "forced." : "enabled.") : "disabled."}\nLeft click to cycle mode.\nRight click to access settings.`
onClicked: {
if (!Settings.data.nightLight.enabled) {
Settings.data.nightLight.enabled = true
+1 -1
View File
@@ -52,7 +52,7 @@ NIconButton {
baseSize: Style.capsuleHeight
compact: (Settings.data.bar.density === "compact")
icon: Settings.data.notifications.doNotDisturb ? "bell-off" : "bell"
tooltipText: Settings.data.notifications.doNotDisturb ? "Notification history.\nRight-click to disable 'Do Not Disturb'." : "Notification history.\nRight-click to enable 'Do Not Disturb'."
tooltipText: `Open notification history\nRight-click to ${Settings.data.notifications.doNotDisturb ? "disable" : "enable"} 'Do Not Disturb'.`
colorBg: (Settings.data.bar.showCapsule ? Color.mSurfaceVariant : Color.transparent)
colorFg: Color.mOnSurface
colorBorder: Color.transparent
+1 -1
View File
@@ -16,7 +16,7 @@ NIconButton {
visible: PowerProfileService.available
icon: PowerProfileService.getIcon()
tooltipText: `Current power profile is "${PowerProfileService.getName()}".`
tooltipText: `'${PowerProfileService.getName()}' power profile`
compact: (Settings.data.bar.density === "compact")
colorBg: (PowerProfileService.profile === PowerProfile.Balanced) ? (Settings.data.bar.showCapsule ? Color.mSurfaceVariant : Color.transparent) : Color.mPrimary
colorFg: (PowerProfileService.profile === PowerProfile.Balanced) ? Color.mOnSurface : Color.mOnPrimary
+1 -1
View File
@@ -14,7 +14,7 @@ NIconButton {
compact: (Settings.data.bar.density === "compact")
baseSize: Style.capsuleHeight
icon: "power"
tooltipText: "Power Settings"
tooltipText: "Power panel"
colorBg: (Settings.data.bar.showCapsule ? Color.mSurfaceVariant : Color.transparent)
colorFg: Color.mError
colorBorder: Color.transparent
@@ -11,7 +11,7 @@ NIconButton {
property real scaling: 1.0
icon: "camera-video"
tooltipText: ScreenRecorderService.isRecording ? "Click to stop recording." : "Click to start recording."
tooltipText: ScreenRecorderService.isRecording ? "Click to stop recording" : "Click to start recording"
compact: (Settings.data.bar.density === "compact")
baseSize: Style.capsuleHeight
colorBg: ScreenRecorderService.isRecording ? Color.mPrimary : (Settings.data.bar.showCapsule ? Color.mSurfaceVariant : Color.transparent)
+1 -1
View File
@@ -32,7 +32,7 @@ NIconButton {
readonly property bool useDistroLogo: (widgetSettings.useDistroLogo !== undefined) ? widgetSettings.useDistroLogo : widgetMetadata.useDistroLogo
icon: useDistroLogo ? "" : "noctalia"
tooltipText: "Open side panel."
tooltipText: "Open side panel"
baseSize: Style.capsuleHeight
compact: (Settings.data.bar.density === "compact")
colorBg: (Settings.data.bar.showCapsule ? Color.mSurfaceVariant : Color.transparent)
+1 -1
View File
@@ -83,7 +83,7 @@ Item {
suffix: "%"
forceOpen: displayMode === "alwaysShow"
forceClose: displayMode === "alwaysHide"
tooltipText: "Volume: " + Math.round(AudioService.volume * 100) + "%\nLeft click to toggle mute.\nRight click for settings.\nScroll to modify volume."
tooltipText: "Volume at " + Math.round(AudioService.volume * 100) + "%\nLeft click to toggle mute. Right click for settings.\nScroll to modify volume."
onWheel: function (delta) {
wheelAccumulator += delta
+1 -1
View File
@@ -40,7 +40,7 @@ NIconButton {
return "signal_wifi_bad"
}
}
tooltipText: "Manage Wi-Fi."
tooltipText: "Manage Wi-Fi"
onClicked: PanelService.getPanel("wifiPanel")?.toggle(this)
onRightClicked: PanelService.getPanel("wifiPanel")?.toggle(this)
}
@@ -176,46 +176,6 @@ ColumnLayout {
}
}
}
// MouseArea {
// id: availableDeviceArea
// acceptedButtons: Qt.LeftButton | Qt.RightButton
// anchors.fill: parent
// hoverEnabled: true
// cursorShape: (canConnect || canDisconnect)
// && !isBusy ? Qt.PointingHandCursor : (isBusy ? Qt.BusyCursor : Qt.ArrowCursor)
// onEntered: {
// if (root.tooltipText && !isBusy) {
// tooltip.show()
// }
// }
// onExited: {
// if (root.tooltipText && !isBusy) {
// tooltip.hide()
// }
// }
// onClicked: function (mouse) {
// if (!modelData || modelData.pairing) {
// return
// }
// if (root.tooltipText && !isBusy) {
// tooltip.hide()
// }
// if (mouse.button === Qt.LeftButton) {
// if (modelData.connected) {
// BluetoothService.disconnectDevice(modelData)
// } else {
// BluetoothService.connectDeviceWithTrust(modelData)
// }
// } else if (mouse.button === Qt.RightButton) {
// BluetoothService.forgetDevice(modelData)
// }
// }
// }
}
}
}
+3 -3
View File
@@ -52,7 +52,7 @@ NPanel {
NIconButton {
enabled: Settings.data.network.bluetoothEnabled
icon: BluetoothService.adapter && BluetoothService.adapter.discovering ? "stop" : "refresh"
tooltipText: "Refresh Devices"
tooltipText: "Refresh devices"
baseSize: Style.baseWidgetSize * 0.8
onClicked: {
if (BluetoothService.adapter) {
@@ -63,7 +63,7 @@ NPanel {
NIconButton {
icon: "close"
tooltipText: "Close."
tooltipText: "Close"
baseSize: Style.baseWidgetSize * 0.8
onClicked: {
root.close()
@@ -139,7 +139,7 @@ NPanel {
// Known devices
BluetoothDevicesList {
label: "Known devices"
tooltipText: "Left click to connect.\nRight click to forget."
tooltipText: "Left click to connect. Right click to forget."
property var items: {
if (!BluetoothService.adapter || !Bluetooth.devices)
return []
+3 -3
View File
@@ -770,7 +770,7 @@ Loader {
id: shutdownTooltipText
anchors.margins: Style.marginM * scaling
anchors.fill: parent
text: "Shut down."
text: "Shut down"
font.pointSize: Style.fontSizeM * scaling
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
@@ -821,7 +821,7 @@ Loader {
id: restartTooltipText
anchors.margins: Style.marginM * scaling
anchors.fill: parent
text: "Restart."
text: "Restart"
font.pointSize: Style.fontSizeM * scaling
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
@@ -873,7 +873,7 @@ Loader {
id: suspendTooltipText
anchors.margins: Style.marginM * scaling
anchors.fill: parent
text: "Suspend."
text: "Suspend"
font.pointSize: Style.fontSizeM * scaling
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
+1 -1
View File
@@ -327,7 +327,7 @@ Variants {
// Close button positioned absolutely
NIconButton {
icon: "close"
tooltipText: "Close."
tooltipText: "Close"
baseSize: Style.baseWidgetSize * 0.6
anchors.top: parent.top
anchors.topMargin: Style.marginM * scaling
@@ -46,7 +46,7 @@ NPanel {
NIconButton {
icon: Settings.data.notifications.doNotDisturb ? "bell-off" : "bell"
tooltipText: Settings.data.notifications.doNotDisturb ? "'Do Not Disturb' is enabled." : "'Do Not Disturb' is disabled."
tooltipText: `'Do Not Disturb' ${Settings.data.notifications.doNotDisturb ? "enabled" : "disabled"}`
baseSize: Style.baseWidgetSize * 0.8
onClicked: Settings.data.notifications.doNotDisturb = !Settings.data.notifications.doNotDisturb
onRightClicked: Settings.data.notifications.doNotDisturb = !Settings.data.notifications.doNotDisturb
@@ -54,7 +54,7 @@ NPanel {
NIconButton {
icon: "trash"
tooltipText: "Clear history."
tooltipText: "Clear history"
baseSize: Style.baseWidgetSize * 0.8
onClicked: {
NotificationService.clearHistory()
@@ -64,7 +64,7 @@ NPanel {
NIconButton {
icon: "close"
tooltipText: "Close."
tooltipText: "Close"
baseSize: Style.baseWidgetSize * 0.8
onClicked: {
root.close()
@@ -199,7 +199,7 @@ NPanel {
// Delete button
NIconButton {
icon: "trash"
tooltipText: "Delete notification."
tooltipText: "Delete notification"
baseSize: Style.baseWidgetSize * 0.7
Layout.alignment: Qt.AlignTop
+2 -2
View File
@@ -263,7 +263,7 @@ NPanel {
Layout.preferredHeight: Style.baseWidgetSize * 0.8 * scaling
NText {
text: timerActive ? `${pendingAction.charAt(0).toUpperCase() + pendingAction.slice(1)} in ${Math.ceil(timeRemaining / 1000)} seconds...` : "Power Menu"
text: timerActive ? `${pendingAction.charAt(0).toUpperCase() + pendingAction.slice(1)} in ${Math.ceil(timeRemaining / 1000)} seconds...` : "Power panel"
font.weight: Style.fontWeightBold
font.pointSize: Style.fontSizeL * scaling
color: timerActive ? Color.mPrimary : Color.mOnSurface
@@ -277,7 +277,7 @@ NPanel {
NIconButton {
icon: timerActive ? "stop" : "close"
tooltipText: timerActive ? "Cancel Timer" : "Close"
tooltipText: timerActive ? "Cancel timer" : "Close"
Layout.alignment: Qt.AlignVCenter
colorBg: timerActive ? Qt.alpha(Color.mError, 0.08) : Color.transparent
colorFg: timerActive ? Color.mError : Color.mOnSurface
@@ -98,7 +98,7 @@ NBox {
colorBgHover: Color.mSecondary
colorFgHover: Color.mOnSecondary
enabled: comboBox.currentKey !== ""
tooltipText: "Add widget to section"
tooltipText: "Add widget"
Layout.alignment: Qt.AlignVCenter
Layout.leftMargin: Style.marginS * scaling
onClicked: {
+1 -1
View File
@@ -462,7 +462,7 @@ NPanel {
// Close button
NIconButton {
icon: "close"
tooltipText: "Close."
tooltipText: "Close"
Layout.alignment: Qt.AlignVCenter
onClicked: root.close()
}
+1 -1
View File
@@ -125,7 +125,7 @@ ColumnLayout {
NIconButton {
icon: "refresh"
baseSize: Style.baseWidgetSize * 0.9
tooltipText: "Reset scaling."
tooltipText: "Reset scaling"
onClicked: ScalingService.setScreenScale(modelData, 1.0)
anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter
+1 -1
View File
@@ -300,7 +300,7 @@ NBox {
// Previous button
NIconButton {
icon: "media-prev"
tooltipText: "Previous Media"
tooltipText: "Previous media"
visible: MediaService.canGoPrevious
onClicked: MediaService.canGoPrevious ? MediaService.previous() : {}
}
@@ -26,7 +26,7 @@ NBox {
// Performance
NIconButton {
icon: PowerProfileService.getIcon(PowerProfile.Performance)
tooltipText: `Set "${PowerProfileService.getName(PowerProfile.Performance)}" power profile.`
tooltipText: `Set "${PowerProfileService.getName(PowerProfile.Performance)}" power profile`
enabled: hasPP
opacity: enabled ? Style.opacityFull : Style.opacityMedium
colorBg: (enabled && PowerProfileService.profile === PowerProfile.Performance) ? Color.mPrimary : Color.mSurfaceVariant
@@ -36,7 +36,7 @@ NBox {
// Balanced
NIconButton {
icon: PowerProfileService.getIcon(PowerProfile.Balanced)
tooltipText: `Set "${PowerProfileService.getName(PowerProfile.Balanced)}" power profile.`
tooltipText: `Set "${PowerProfileService.getName(PowerProfile.Balanced)}" power profile`
enabled: hasPP
opacity: enabled ? Style.opacityFull : Style.opacityMedium
colorBg: (enabled && PowerProfileService.profile === PowerProfile.Balanced) ? Color.mPrimary : Color.mSurfaceVariant
@@ -46,7 +46,7 @@ NBox {
// Eco
NIconButton {
icon: PowerProfileService.getIcon(PowerProfile.PowerSaver)
tooltipText: `Set "${PowerProfileService.getName(PowerProfile.PowerSaver)}" power profile.`
tooltipText: `Set "${PowerProfileService.getName(PowerProfile.PowerSaver)}" power profile`
enabled: hasPP
opacity: enabled ? Style.opacityFull : Style.opacityMedium
colorBg: (enabled && PowerProfileService.profile === PowerProfile.PowerSaver) ? Color.mPrimary : Color.mSurfaceVariant
+3 -3
View File
@@ -56,7 +56,7 @@ NBox {
}
NIconButton {
icon: "settings"
tooltipText: "Open settings."
tooltipText: "Open settings"
onClicked: {
settingsPanel.requestedTab = SettingsPanel.Tab.General
settingsPanel.open()
@@ -66,7 +66,7 @@ NBox {
NIconButton {
id: powerButton
icon: "power"
tooltipText: "Power menu."
tooltipText: "Power panel"
onClicked: {
powerPanel.open()
sidePanel.close()
@@ -76,7 +76,7 @@ NBox {
NIconButton {
id: closeButton
icon: "close"
tooltipText: "Close side panel."
tooltipText: "Close side panel"
onClicked: {
sidePanel.close()
}
+2 -2
View File
@@ -24,7 +24,7 @@ NBox {
NIconButton {
icon: "camera-video"
enabled: ScreenRecorderService.isAvailable
tooltipText: ScreenRecorderService.isAvailable ? (ScreenRecorderService.isRecording ? "Stop screen recording." : "Start screen recording.") : "Screen recorder not installed."
tooltipText: ScreenRecorderService.isAvailable ? (ScreenRecorderService.isRecording ? "Stop screen recording" : "Start screen recording") : "Screen recorder is not installed"
colorBg: ScreenRecorderService.isRecording ? Color.mPrimary : Color.mSurfaceVariant
colorFg: ScreenRecorderService.isRecording ? Color.mOnPrimary : Color.mPrimary
onClicked: {
@@ -42,7 +42,7 @@ NBox {
// Idle Inhibitor
NIconButton {
icon: IdleInhibitorService.isInhibited ? "keep-awake-on" : "keep-awake-off"
tooltipText: IdleInhibitorService.isInhibited ? "Disable keep awake." : "Enable keep awake."
tooltipText: `${IdleInhibitorService.isInhibited ? "Disable" : "Enable"} keep awake`
colorBg: IdleInhibitorService.isInhibited ? Color.mPrimary : Color.mSurfaceVariant
colorFg: IdleInhibitorService.isInhibited ? Color.mOnPrimary : Color.mPrimary
onClicked: {
@@ -55,14 +55,14 @@ NPanel {
NIconButton {
icon: "refresh"
tooltipText: "Refresh wallpaper list."
tooltipText: "Refresh wallpaper list"
baseSize: Style.baseWidgetSize * 0.8
onClicked: WallpaperService.refreshWallpapersList()
}
NIconButton {
icon: "close"
tooltipText: "Close."
tooltipText: "Close"
baseSize: Style.baseWidgetSize * 0.8
onClicked: root.close()
}
+1 -1
View File
@@ -64,7 +64,7 @@ NPanel {
NIconButton {
icon: "close"
tooltipText: "Close."
tooltipText: "Close"
baseSize: Style.baseWidgetSize * 0.8
onClicked: root.close()
}
+1 -1
View File
@@ -25,7 +25,7 @@ Singleton {
case PowerProfile.Balanced:
return "Balanced"
case PowerProfile.PowerSaver:
return "Power Saver"
return "Power saver"
default:
return "Unknown"
}