Tooltips: fixed a bunch of tooltips which were not properly scaled.

This commit is contained in:
ItsLemmy
2025-10-03 19:02:53 -04:00
parent 46707fb926
commit 47b0ace199
20 changed files with 30 additions and 13 deletions
@@ -10,6 +10,8 @@ import qs.Widgets
NBox {
id: root
property ShellScreen screen
ColumnLayout {
anchors.fill: parent
anchors.margins: Style.marginL * scaling
@@ -280,6 +282,7 @@ NBox {
// Previous button
NIconButton {
icon: "media-prev"
screen: root.screen
tooltipText: I18n.tr("tooltips.previous-media")
visible: MediaService.canGoPrevious
onClicked: MediaService.canGoPrevious ? MediaService.previous() : {}
@@ -288,6 +291,7 @@ NBox {
// Play/Pause button
NIconButton {
icon: MediaService.isPlaying ? "media-pause" : "media-play"
screen: root.screen
tooltipText: MediaService.isPlaying ? I18n.tr("tooltips.pause") : I18n.tr("tooltips.play")
visible: (MediaService.canPlay || MediaService.canPause)
onClicked: (MediaService.canPlay || MediaService.canPause) ? MediaService.playPause() : {}
@@ -296,6 +300,7 @@ NBox {
// Next button
NIconButton {
icon: "media-next"
screen: root.screen
tooltipText: I18n.tr("tooltips.next-media")
visible: MediaService.canGoNext
onClicked: MediaService.canGoNext ? MediaService.next() : {}
@@ -10,6 +10,7 @@ import qs.Widgets
// Power Profiles: performance, balanced, eco
NBox {
property ShellScreen screen
property real spacing: 0
// Centralized service
@@ -26,6 +27,7 @@ NBox {
// Performance
NIconButton {
icon: PowerProfileService.getIcon(PowerProfile.Performance)
screen: root.screen
tooltipText: I18n.tr("tooltips.set-power-profile", {
"profile": PowerProfileService.getName(PowerProfile.Performance)
})
@@ -38,6 +40,7 @@ NBox {
// Balanced
NIconButton {
icon: PowerProfileService.getIcon(PowerProfile.Balanced)
screen: root.screen
tooltipText: I18n.tr("tooltips.set-power-profile", {
"profile": PowerProfileService.getName(PowerProfile.Balanced)
})
@@ -50,6 +53,7 @@ NBox {
// Eco
NIconButton {
icon: PowerProfileService.getIcon(PowerProfile.PowerSaver)
screen: root.screen
tooltipText: I18n.tr("tooltips.set-power-profile", {
"profile": PowerProfileService.getName(PowerProfile.PowerSaver)
})
+4 -2
View File
@@ -14,6 +14,7 @@ import qs.Widgets
NBox {
id: root
property ShellScreen screen
property string uptimeText: "--"
RowLayout {
@@ -58,6 +59,7 @@ NBox {
}
NIconButton {
icon: "settings"
screen: root.screen
tooltipText: I18n.tr("tooltips.open-settings")
onClicked: {
settingsPanel.requestedTab = SettingsPanel.Tab.General
@@ -66,8 +68,8 @@ NBox {
}
NIconButton {
id: powerButton
icon: "power"
screen: root.screen
tooltipText: I18n.tr("tooltips.session-menu")
onClicked: {
sessionMenuPanel.open()
@@ -76,8 +78,8 @@ NBox {
}
NIconButton {
id: closeButton
icon: "close"
screen: root.screen
tooltipText: I18n.tr("tooltips.close")
onClicked: {
controlCenterPanel.close()
@@ -1,5 +1,6 @@
import QtQuick
import QtQuick.Layouts
import Quickshell
import qs.Commons
import qs.Services
import qs.Widgets
@@ -8,6 +9,8 @@ import qs.Widgets
NBox {
id: root
property ShellScreen screen
ColumnLayout {
id: content
anchors.left: parent.left
@@ -10,6 +10,7 @@ import qs.Widgets
// Utilities: record & wallpaper
NBox {
property ShellScreen screen
property real spacing: 0
RowLayout {
@@ -23,6 +24,7 @@ NBox {
// Screen Recorder
NIconButton {
icon: "camera-video"
screen: root.screen
enabled: ScreenRecorderService.isAvailable
tooltipText: ScreenRecorderService.isAvailable ? (ScreenRecorderService.isRecording ? I18n.tr("tooltips.stop-screen-recording") : I18n.tr("tooltips.start-screen-recording")) : I18n.tr("tooltips.screen-recorder-not-installed")
colorBg: ScreenRecorderService.isRecording ? Color.mPrimary : Color.mSurfaceVariant
@@ -42,6 +44,7 @@ NBox {
// Idle Inhibitor
NIconButton {
icon: IdleInhibitorService.isInhibited ? "keep-awake-on" : "keep-awake-off"
screen: root.screen
tooltipText: IdleInhibitorService.isInhibited ? I18n.tr("tooltips.disable-keep-awake") : I18n.tr("tooltips.enable-keep-awake")
colorBg: IdleInhibitorService.isInhibited ? Color.mPrimary : Color.mSurfaceVariant
colorFg: IdleInhibitorService.isInhibited ? Color.mOnPrimary : Color.mPrimary
@@ -54,6 +57,7 @@ NBox {
NIconButton {
visible: Settings.data.wallpaper.enabled
icon: "wallpaper-selector"
screen: root.screen
tooltipText: I18n.tr("tooltips.wallpaper-selector")
onClicked: PanelService.getPanel("wallpaperPanel")?.toggle(this)
onRightClicked: WallpaperService.setRandomWallpaper()
@@ -9,6 +9,7 @@ import qs.Widgets
NBox {
id: root
property ShellScreen screen
readonly property bool weatherReady: (LocationService.data.weather !== null)
ColumnLayout {