UserInterface: add universal opacity slider (except for bar)

LauncherTab: remove opacity slider
Settings: add migration
i18n: add opacity slider translation
This commit is contained in:
Ly-sec
2025-11-12 20:32:11 +01:00
parent 88a968aa21
commit 0db78a0abe
16 changed files with 101 additions and 50 deletions
-2
View File
@@ -21,8 +21,6 @@ SmartPanel {
exclusiveKeyboard: true
panelBackgroundColor: Qt.alpha(Color.mSurface, Settings.data.appLauncher.backgroundOpacity)
// Positioning
readonly property string panelPosition: {
if (Settings.data.appLauncher.position === "follow_bar") {
@@ -49,37 +49,6 @@ ColumnLayout {
}
}
ColumnLayout {
spacing: Style.marginXXS
Layout.fillWidth: true
NText {
text: I18n.tr("settings.launcher.settings.background-opacity.label")
pointSize: Style.fontSizeL
font.weight: Style.fontWeightBold
color: Color.mOnSurface
}
NText {
text: I18n.tr("settings.launcher.settings.background-opacity.description")
pointSize: Style.fontSizeXS
color: Color.mOnSurfaceVariant
wrapMode: Text.WordWrap
Layout.fillWidth: true
}
NValueSlider {
id: launcherBgOpacity
Layout.fillWidth: true
from: 0.0
to: 1.0
stepSize: 0.01
value: Settings.data.appLauncher.backgroundOpacity
onMoved: value => Settings.data.appLauncher.backgroundOpacity = value
text: Math.floor(Settings.data.appLauncher.backgroundOpacity * 100) + "%"
}
}
NToggle {
label: I18n.tr("settings.launcher.settings.clipboard-history.label")
description: I18n.tr("settings.launcher.settings.clipboard-history.description")
@@ -119,6 +119,27 @@ ColumnLayout {
}
}
// Panel Background Opacity
ColumnLayout {
spacing: Style.marginXXS
Layout.fillWidth: true
NLabel {
label: I18n.tr("settings.user-interface.panel-background-opacity.label")
description: I18n.tr("settings.user-interface.panel-background-opacity.description")
}
NValueSlider {
Layout.fillWidth: true
from: 0
to: 1
stepSize: 0.01
value: Settings.data.ui.panelBackgroundOpacity
onMoved: value => Settings.data.ui.panelBackgroundOpacity = value
text: Math.floor(Settings.data.ui.panelBackgroundOpacity * 100) + "%"
}
}
NDivider {
Layout.fillWidth: true
Layout.topMargin: Style.marginL