mirror of
https://github.com/noctalia-dev/noctalia-shell.git
synced 2026-05-11 17:08:27 +08:00
Tray: layout fixes
This commit is contained in:
@@ -1773,6 +1773,7 @@
|
||||
"night-light-forced": "Nachtlicht ist erzwungen.\nLinksklick zum Wechseln des Modus.\nRechtsklick für Einstellungen.",
|
||||
"night-light-not-installed": "Nachtlicht ist nicht verfügbar.\nwlsunset ist nicht installiert.",
|
||||
"open-control-center": "Kontrollzentrum öffnen",
|
||||
"open-tray-dropdown": "Tray-Dropdown öffnen",
|
||||
"open-notification-history-disable-dnd": "Benachrichtigungsverlauf öffnen\nRechtsklick um 'Nicht stören' zu deaktivieren.",
|
||||
"open-notification-history-enable-dnd": "Benachrichtigungsverlauf öffnen\nRechtsklick um 'Nicht stören' zu aktivieren.",
|
||||
"open-settings": "Einstellungen öffnen",
|
||||
|
||||
@@ -1773,6 +1773,7 @@
|
||||
"night-light-forced": "Night light is forced.\nLeft click to cycle mode.\nRight click to access settings.",
|
||||
"night-light-not-installed": "Night light is not available.\nwlsunset is not installed.",
|
||||
"open-control-center": "Open control center",
|
||||
"open-tray-dropdown": "Open tray dropdown",
|
||||
"open-notification-history-disable-dnd": "Open notification history\nRight-click to disable \"Do not disturb\".",
|
||||
"open-notification-history-enable-dnd": "Open notification history\nRight-click to enable \"Do not disturb\".",
|
||||
"open-settings": "Open settings",
|
||||
|
||||
@@ -1773,6 +1773,7 @@
|
||||
"night-light-forced": "Luz nocturna forzada.\nClic izquierdo para cambiar de modo.\nClic derecho para acceder a la configuración.",
|
||||
"night-light-not-installed": "Luz nocturna no disponible.\nwlsunset no está instalado.",
|
||||
"open-control-center": "Abrir el centro de control",
|
||||
"open-tray-dropdown": "Abrir menú desplegable de bandeja",
|
||||
"open-notification-history-disable-dnd": "Abrir historial de notificaciones\nClic derecho para desactivar \"No molestar\".",
|
||||
"open-notification-history-enable-dnd": "Abrir historial de notificaciones\nClic derecho para activar \"No molestar\".",
|
||||
"open-settings": "Abrir configuración",
|
||||
|
||||
@@ -1773,6 +1773,7 @@
|
||||
"night-light-forced": "L'éclairage nocturne est forcé.\nClic gauche pour changer de mode.\nClic droit pour accéder aux paramètres.",
|
||||
"night-light-not-installed": "L'éclairage nocturne n'est pas disponible.\nwlsunset n'est pas installé.",
|
||||
"open-control-center": "Ouvrir le centre de contrôle",
|
||||
"open-tray-dropdown": "Ouvrir le menu déroulant de la barre d'état",
|
||||
"open-notification-history-disable-dnd": "Ouvrir l'historique des notifications\nClic droit pour désactiver \"Ne pas déranger\".",
|
||||
"open-notification-history-enable-dnd": "Ouvrir l'historique des notifications\nClic droit pour activer \"Ne pas déranger\".",
|
||||
"open-settings": "Ouvrir les paramètres",
|
||||
|
||||
@@ -1773,6 +1773,7 @@
|
||||
"night-light-forced": "Luz noturna forçada.\nClique esquerdo para alternar o modo.\nClique direito para acessar as configurações.",
|
||||
"night-light-not-installed": "Luz noturna não disponível.\nwlsunset não está instalado.",
|
||||
"open-control-center": "Abrir central de controle",
|
||||
"open-tray-dropdown": "Abrir menu suspenso da bandeja",
|
||||
"open-notification-history-disable-dnd": "Abrir histórico de notificações\nClique direito para desativar \"Não perturbe\".",
|
||||
"open-notification-history-enable-dnd": "Abrir histórico de notificações\nClique direito para ativar \"Não perturbe\".",
|
||||
"open-settings": "Abrir configurações",
|
||||
|
||||
@@ -1773,6 +1773,7 @@
|
||||
"night-light-forced": "Gece ışığı zorla.\nMod arasında geçiş yapmak için sol tık.\nAyarlara erişmek için sağ tık.",
|
||||
"night-light-not-installed": "Gece ışığı mevcut değil.\nwlsunset yüklü değil.",
|
||||
"open-control-center": "Kontrol merkezini aç",
|
||||
"open-tray-dropdown": "Tepsi açılır menüsünü aç",
|
||||
"open-notification-history-disable-dnd": "Bildirim geçmişini aç\n\"Rahatsız etmeyi\" devre dışı bırakmak için sağ tık.",
|
||||
"open-notification-history-enable-dnd": "Bildirim geçmişini aç\n\"Rahatsız etmeyi\" etkinleştirmek için sağ tık.",
|
||||
"open-settings": "Ayarları aç",
|
||||
|
||||
@@ -1773,6 +1773,7 @@
|
||||
"night-light-forced": "Нічне світло примусово.\nЛівий клік для циклічного режиму.\nПравий клік для доступу до налаштувань.",
|
||||
"night-light-not-installed": "Нічне світло недоступне.\nwlsunset не встановлено.",
|
||||
"open-control-center": "Відкрити центр керування",
|
||||
"open-tray-dropdown": "Відкрити спадне меню трею",
|
||||
"open-notification-history-disable-dnd": "Відкрити історію сповіщень\nПравий клік для вимкнення \"Не турбувати\".",
|
||||
"open-notification-history-enable-dnd": "Відкрити історію сповіщень\nПравий клік для увімкнення \"Не турбувати\".",
|
||||
"open-settings": "Відкрити налаштування",
|
||||
|
||||
@@ -1773,6 +1773,7 @@
|
||||
"night-light-forced": "夜间模式已强制启用。\n左键点击循环模式。\n右键点击访问设置。",
|
||||
"night-light-not-installed": "夜间模式不可用。\nwlsunset 未安装。",
|
||||
"open-control-center": "打开控制中心",
|
||||
"open-tray-dropdown": "打开系统托盘下拉菜单",
|
||||
"open-notification-history-disable-dnd": "打开通知历史记录\n右键点击禁用\"勿扰模式\"。",
|
||||
"open-notification-history-enable-dnd": "打开通知历史记录\n右键点击启用\"勿扰模式\"。",
|
||||
"open-settings": "打开设置",
|
||||
|
||||
@@ -20,21 +20,24 @@ NPanel {
|
||||
// Trigger refresh when settings change
|
||||
property int settingsVersion: 0
|
||||
|
||||
// Read favorites directly from settings for reactivity
|
||||
readonly property var favoritesList: {
|
||||
// Read widget settings for reactivity
|
||||
readonly property var widgetSettings: {
|
||||
// Reference settingsVersion to force recalculation when it changes
|
||||
var _ = root.settingsVersion
|
||||
if (widgetSection === "" || widgetIndex < 0)
|
||||
return []
|
||||
return {}
|
||||
var widgets = Settings.data.bar.widgets[widgetSection]
|
||||
if (!widgets || widgetIndex >= widgets.length)
|
||||
return []
|
||||
var widgetSettings = widgets[widgetIndex]
|
||||
if (!widgetSettings || widgetSettings.id !== "Tray")
|
||||
return []
|
||||
return widgetSettings.favorites || []
|
||||
return {}
|
||||
var settings = widgets[widgetIndex]
|
||||
if (!settings || settings.id !== "Tray")
|
||||
return {}
|
||||
return settings
|
||||
}
|
||||
|
||||
// Read favorites directly from settings for reactivity
|
||||
readonly property var favoritesList: widgetSettings.favorites || []
|
||||
|
||||
function wildCardMatch(str, rule) {
|
||||
if (!str || !rule)
|
||||
return false
|
||||
@@ -126,7 +129,7 @@ NPanel {
|
||||
return icon
|
||||
}
|
||||
|
||||
layer.enabled: true
|
||||
layer.enabled: root.widgetSettings.colorizeIcons !== false
|
||||
layer.effect: ShaderEffect {
|
||||
property color targetColor: Settings.data.colorSchemes.darkMode ? Color.mOnSurface : Color.mSurfaceVariant
|
||||
property real colorizeMode: 1.0
|
||||
|
||||
@@ -303,17 +303,18 @@ Rectangle {
|
||||
}
|
||||
}
|
||||
|
||||
// Dropdown opener - wrapped in Item for proper alignment
|
||||
// Dropdown opener - simple icon with hover effect
|
||||
Item {
|
||||
id: dropdownButton
|
||||
visible: dropdownItems.length > 0
|
||||
width: itemSize
|
||||
height: itemSize
|
||||
|
||||
NIconButton {
|
||||
id: dropdownButton
|
||||
property bool hovered: false
|
||||
|
||||
NIcon {
|
||||
id: chevronIcon
|
||||
anchors.centerIn: parent
|
||||
width: itemSize
|
||||
height: itemSize
|
||||
icon: {
|
||||
if (barPosition === "top")
|
||||
return "chevron-down"
|
||||
@@ -326,13 +327,36 @@ Rectangle {
|
||||
else
|
||||
return "chevron-down" // default fallback
|
||||
}
|
||||
tooltipText: I18n.tr("open-control-center") // reuse generic tooltip text
|
||||
pointSize: Math.round(itemSize * 0.65)
|
||||
color: dropdownButton.hovered ? Color.mPrimary : Color.mOnSurface
|
||||
|
||||
Behavior on color {
|
||||
ColorAnimation {
|
||||
duration: Style.animationFast
|
||||
easing.type: Easing.InOutQuad
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
hoverEnabled: true
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
onEntered: {
|
||||
dropdownButton.hovered = true
|
||||
TooltipService.show(Screen, dropdownButton, I18n.tr("tooltips.open-tray-dropdown"), BarService.getTooltipDirection())
|
||||
}
|
||||
onExited: {
|
||||
dropdownButton.hovered = false
|
||||
TooltipService.hide()
|
||||
}
|
||||
onClicked: {
|
||||
TooltipService.hideImmediately()
|
||||
const panel = PanelService.getPanel("trayDropdownPanel", root.screen)
|
||||
if (panel) {
|
||||
panel.widgetSection = root.section
|
||||
panel.widgetIndex = root.sectionWidgetIndex
|
||||
panel.toggle(this)
|
||||
panel.toggle(dropdownButton)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user