From bbd9ad8af7678da8c9c40705b58e838440dc25a7 Mon Sep 17 00:00:00 2001 From: ItsLemmy Date: Thu, 6 Nov 2025 10:51:40 -0500 Subject: [PATCH 1/2] translations (sorting) --- Assets/Translations/de.json | 14 +++++++------- Assets/Translations/en.json | 14 +++++++------- Assets/Translations/es.json | 14 +++++++------- Assets/Translations/fr.json | 14 +++++++------- Assets/Translations/pt.json | 14 +++++++------- Assets/Translations/tr.json | 14 +++++++------- Assets/Translations/uk-UA.json | 14 +++++++------- Assets/Translations/zh-CN.json | 14 +++++++------- 8 files changed, 56 insertions(+), 56 deletions(-) diff --git a/Assets/Translations/de.json b/Assets/Translations/de.json index f857d81e..342a033a 100644 --- a/Assets/Translations/de.json +++ b/Assets/Translations/de.json @@ -324,17 +324,17 @@ "bluetooth": { "panel": { "available-devices": "Verfügbare Geräte", + "blocked": "Blockiert", + "connect": "Verbinden", "connected-devices": "Verbundene Geräte", "disabled": "Bluetooth ist deaktiviert", + "disconnect": "Trennen", "enable-message": "Aktivieren Sie Bluetooth, um verfügbare Geräte zu sehen.", "known-devices": "Bekannte Geräte", + "pairing": "Koppeln...", "pairing-mode": "Stellen Sie sicher, dass sich Ihr Gerät im Kopplungsmodus befindet.", "scanning": "Scannen nach Geräten...", - "title": "Bluetooth", - "pairing": "Koppeln...", - "blocked": "Blockiert", - "disconnect": "Trennen", - "connect": "Verbinden" + "title": "Bluetooth" } }, "calendar": { @@ -771,14 +771,14 @@ }, "title": "Statusleiste", "tray": { + "back": "Zurück", "blacklist": { "description": "Ausschlussregeln für die Tray-Symbolleiste hinzufügen, unterstützt Platzhalter (*).", "label": "Ausschlussliste", "placeholder": "z.B., nm-applet, Fcitx*" }, "pin-application": "Anwendung anheften", - "unpin-application": "Anheftung aufheben", - "back": "Zurück" + "unpin-application": "Anheftung aufheben" }, "widgets": { "section": { diff --git a/Assets/Translations/en.json b/Assets/Translations/en.json index 5bdb06b9..ea387782 100644 --- a/Assets/Translations/en.json +++ b/Assets/Translations/en.json @@ -324,17 +324,17 @@ "bluetooth": { "panel": { "available-devices": "Available devices", + "blocked": "Blocked", + "connect": "Connect", "connected-devices": "Connected devices", "disabled": "Bluetooth is disabled", + "disconnect": "Disconnect", "enable-message": "Enable Bluetooth to see available devices.", "known-devices": "Known devices", + "pairing": "Pairing...", "pairing-mode": "Make sure your device is in pairing mode.", "scanning": "Scanning for devices...", - "title": "Bluetooth", - "pairing": "Pairing...", - "blocked": "Blocked", - "disconnect": "Disconnect", - "connect": "Connect" + "title": "Bluetooth" } }, "calendar": { @@ -771,14 +771,14 @@ }, "title": "Bar", "tray": { + "back": "Back", "blacklist": { "description": "Add tray exclusion rules, supports wildcards (*).", "label": "Blacklist", "placeholder": "e.g., nm-applet, Fcitx*" }, "pin-application": "Pin Application", - "unpin-application": "Unpin Application", - "back": "Back" + "unpin-application": "Unpin Application" }, "widgets": { "section": { diff --git a/Assets/Translations/es.json b/Assets/Translations/es.json index d2ff4d0d..d30623fa 100644 --- a/Assets/Translations/es.json +++ b/Assets/Translations/es.json @@ -324,17 +324,17 @@ "bluetooth": { "panel": { "available-devices": "Dispositivos disponibles", + "blocked": "Bloqueado", + "connect": "Conectar", "connected-devices": "Dispositivos conectados", "disabled": "Bluetooth está desactivado", + "disconnect": "Desconectar", "enable-message": "Activa Bluetooth para ver los dispositivos disponibles.", "known-devices": "Dispositivos conocidos", + "pairing": "Emparejamiento...", "pairing-mode": "Asegúrate de que tu dispositivo esté en modo de emparejamiento.", "scanning": "Buscando dispositivos...", - "title": "Bluetooth", - "pairing": "Emparejamiento...", - "blocked": "Bloqueado", - "disconnect": "Desconectar", - "connect": "Conectar" + "title": "Bluetooth" } }, "calendar": { @@ -771,14 +771,14 @@ }, "title": "Barra", "tray": { + "back": "Atrás", "blacklist": { "description": "Agregar reglas de exclusión de la bandeja, admite comodines (*).", "label": "Lista negra", "placeholder": "ej., nm-applet, Fcitx*" }, "pin-application": "Fijar Aplicación", - "unpin-application": "Desfijar Aplicación", - "back": "Atrás" + "unpin-application": "Desfijar Aplicación" }, "widgets": { "section": { diff --git a/Assets/Translations/fr.json b/Assets/Translations/fr.json index dc288d56..dc4cf968 100644 --- a/Assets/Translations/fr.json +++ b/Assets/Translations/fr.json @@ -324,17 +324,17 @@ "bluetooth": { "panel": { "available-devices": "Appareils disponibles", + "blocked": "Bloqué", + "connect": "Connecter", "connected-devices": "Appareils connectés", "disabled": "Le Bluetooth est désactivé", + "disconnect": "Déconnecter", "enable-message": "Activez le Bluetooth pour voir les appareils disponibles.", "known-devices": "Appareils connus", + "pairing": "Appairage...", "pairing-mode": "Assurez-vous que votre appareil est en mode d'appairage.", "scanning": "Recherche d'appareils en cours...", - "title": "Bluetooth", - "pairing": "Appairage...", - "blocked": "Bloqué", - "disconnect": "Déconnecter", - "connect": "Connecter" + "title": "Bluetooth" } }, "calendar": { @@ -771,14 +771,14 @@ }, "title": "Barre", "tray": { + "back": "Retour", "blacklist": { "description": "Ajouter des règles d'exclusion pour la boîte à miniatures, prend en charge les caractères génériques (*).", "label": "Liste noire", "placeholder": "ex: nm-applet, Fcitx*" }, "pin-application": "Épingler l'Application", - "unpin-application": "Désépingler l'Application", - "back": "Retour" + "unpin-application": "Désépingler l'Application" }, "widgets": { "section": { diff --git a/Assets/Translations/pt.json b/Assets/Translations/pt.json index e8dceb1d..ee2d0f7f 100644 --- a/Assets/Translations/pt.json +++ b/Assets/Translations/pt.json @@ -324,17 +324,17 @@ "bluetooth": { "panel": { "available-devices": "Dispositivos disponíveis", + "blocked": "Bloqueado", + "connect": "Conectar", "connected-devices": "Dispositivos conectados", "disabled": "O Bluetooth está desativado", + "disconnect": "Desconectar", "enable-message": "Ative o Bluetooth para ver os dispositivos disponíveis.", "known-devices": "Dispositivos conhecidos", + "pairing": "Emparelhamento...", "pairing-mode": "Certifique-se de que seu dispositivo está em modo de pareamento.", "scanning": "Procurando por dispositivos...", - "title": "Bluetooth", - "pairing": "Emparelhamento...", - "blocked": "Bloqueado", - "disconnect": "Desconectar", - "connect": "Conectar" + "title": "Bluetooth" } }, "calendar": { @@ -771,14 +771,14 @@ }, "title": "Barra", "tray": { + "back": "Voltar", "blacklist": { "description": "Adicione regras de exclusão para a bandeja do sistema, suporta curingas (*).", "label": "Lista Negra", "placeholder": "ex: nm-applet, Fcitx*" }, "pin-application": "Fixar Aplicativo", - "unpin-application": "Desfixar Aplicativo", - "back": "Voltar" + "unpin-application": "Desfixar Aplicativo" }, "widgets": { "section": { diff --git a/Assets/Translations/tr.json b/Assets/Translations/tr.json index 8f12a248..f0f2c3c0 100644 --- a/Assets/Translations/tr.json +++ b/Assets/Translations/tr.json @@ -324,17 +324,17 @@ "bluetooth": { "panel": { "available-devices": "Mevcut cihazlar", + "blocked": "Engellendi", + "connect": "Bağlan", "connected-devices": "Bağlı cihazlar", "disabled": "Bluetooth devre dışı", + "disconnect": "Bağlantıyı Kes", "enable-message": "Mevcut cihazları görmek için Bluetooth'u etkinleştirin.", "known-devices": "Bilinen cihazlar", + "pairing": "Eşleştiriliyor...", "pairing-mode": "Cihazınızın eşleştirme modunda olduğundan emin olun.", "scanning": "Cihazlar tarınıyor...", - "title": "Bluetooth", - "pairing": "Eşleştiriliyor...", - "blocked": "Engellendi", - "disconnect": "Bağlantıyı Kes", - "connect": "Bağlan" + "title": "Bluetooth" } }, "calendar": { @@ -771,14 +771,14 @@ }, "title": "Bar", "tray": { + "back": "Geri", "blacklist": { "description": "Tepsi hariç tutma kuralları ekleyin, joker karakterleri destekler (*).", "label": "Kara liste", "placeholder": "örn., nm-applet, Fcitx*" }, "pin-application": "Uygulamayı Sabitle", - "unpin-application": "Sabitlemeyi Kaldır", - "back": "Geri" + "unpin-application": "Sabitlemeyi Kaldır" }, "widgets": { "section": { diff --git a/Assets/Translations/uk-UA.json b/Assets/Translations/uk-UA.json index 0bfaa443..fe479ec4 100644 --- a/Assets/Translations/uk-UA.json +++ b/Assets/Translations/uk-UA.json @@ -324,17 +324,17 @@ "bluetooth": { "panel": { "available-devices": "Доступні пристрої", + "blocked": "Заблоковано", + "connect": "Підключити", "connected-devices": "Підключені пристрої", "disabled": "Bluetooth вимкнено", + "disconnect": "Відключити", "enable-message": "Увімкніть Bluetooth, щоб побачити доступні пристрої.", "known-devices": "Відомі пристрої", + "pairing": "Спарювання...", "pairing-mode": "Переконайтеся, що ваш пристрій у режимі з'єднання.", "scanning": "Сканування пристроїв...", - "title": "Bluetooth", - "pairing": "Спарювання...", - "blocked": "Заблоковано", - "disconnect": "Відключити", - "connect": "Підключити" + "title": "Bluetooth" } }, "calendar": { @@ -771,14 +771,14 @@ }, "title": "Панель", "tray": { + "back": "Назад", "blacklist": { "description": "Додайте правила виключення з трея, підтримує шаблони (*).", "label": "Чорний список", "placeholder": "напр., nm-applet, Fcitx*" }, "pin-application": "Закріпити Застосунок", - "unpin-application": "Відкріпити Застосунок", - "back": "Назад" + "unpin-application": "Відкріпити Застосунок" }, "widgets": { "section": { diff --git a/Assets/Translations/zh-CN.json b/Assets/Translations/zh-CN.json index 5f325884..0c42dab3 100644 --- a/Assets/Translations/zh-CN.json +++ b/Assets/Translations/zh-CN.json @@ -324,17 +324,17 @@ "bluetooth": { "panel": { "available-devices": "可用设备", + "blocked": "已阻止", + "connect": "连接", "connected-devices": "已连接设备", "disabled": "蓝牙已禁用", + "disconnect": "断开", "enable-message": "启用蓝牙以查看可用设备。", "known-devices": "已知设备", + "pairing": "配对...", "pairing-mode": "确保您的设备处于配对模式。", "scanning": "正在扫描设备...", - "title": "蓝牙", - "pairing": "配对...", - "blocked": "已阻止", - "disconnect": "断开", - "connect": "连接" + "title": "蓝牙" } }, "calendar": { @@ -771,14 +771,14 @@ }, "title": "状态栏", "tray": { + "back": "返回", "blacklist": { "description": "添加托盘排除规则,支持通配符 (*)。", "label": "黑名单", "placeholder": "例如:nm-applet, Fcitx*" }, "pin-application": "固定应用程序", - "unpin-application": "取消固定应用程序", - "back": "返回" + "unpin-application": "取消固定应用程序" }, "widgets": { "section": { From fa614facdac94f271d538505998aa24747f05ff8 Mon Sep 17 00:00:00 2001 From: ItsLemmy Date: Thu, 6 Nov 2025 10:53:40 -0500 Subject: [PATCH 2/2] NotificationHistory: panel fix --- .../NotificationHistoryPanel.qml | 376 +++++++++--------- 1 file changed, 188 insertions(+), 188 deletions(-) diff --git a/Modules/Panels/NotificationHistory/NotificationHistoryPanel.qml b/Modules/Panels/NotificationHistory/NotificationHistoryPanel.qml index 113c09c8..881ec9cd 100644 --- a/Modules/Panels/NotificationHistory/NotificationHistoryPanel.qml +++ b/Modules/Panels/NotificationHistory/NotificationHistoryPanel.qml @@ -123,221 +123,221 @@ SmartPanel { } // Notification list - // NListView { - // id: notificationList - // Layout.fillWidth: true - // Layout.fillHeight: true - // horizontalPolicy: ScrollBar.AlwaysOff - // verticalPolicy: ScrollBar.AsNeeded + NListView { + id: notificationList + Layout.fillWidth: true + Layout.fillHeight: true + horizontalPolicy: ScrollBar.AlwaysOff + verticalPolicy: ScrollBar.AsNeeded - // model: NotificationService.historyList - // spacing: Style.marginM - // clip: true - // boundsBehavior: Flickable.StopAtBounds - // visible: NotificationService.historyList.count > 0 + model: NotificationService.historyList + spacing: Style.marginM + clip: true + boundsBehavior: Flickable.StopAtBounds + visible: NotificationService.historyList.count > 0 - // // Track which notification is expanded - // property string expandedId: "" + // Track which notification is expanded + property string expandedId: "" - // delegate: Item { - // property string notificationId: model.id - // property bool isExpanded: notificationList.expandedId === notificationId + delegate: Item { + property string notificationId: model.id + property bool isExpanded: notificationList.expandedId === notificationId - // width: notificationList.width - // height: notificationLayoutWrapper.height + (Style.marginM * 2) + width: notificationList.width + height: notificationLayoutWrapper.height + (Style.marginM * 2) - // Behavior on height { - // enabled: !Settings.data.general.animationDisabled - // NumberAnimation { - // duration: Style.animationNormal - // easing.type: Easing.InOutQuad - // } - // } + Behavior on height { + enabled: !Settings.data.general.animationDisabled + NumberAnimation { + duration: Style.animationNormal + easing.type: Easing.InOutQuad + } + } - // Rectangle { - // anchors.fill: parent - // radius: Style.radiusM - // color: Color.mSurfaceVariant - // border.color: Qt.alpha(Color.mOutline, Style.opacityMedium) - // border.width: Style.borderS + Rectangle { + anchors.fill: parent + radius: Style.radiusM + color: Color.mSurfaceVariant + border.color: Qt.alpha(Color.mOutline, Style.opacityMedium) + border.width: Style.borderS - // // Smooth color transition on hover - // Behavior on color { - // enabled: !Settings.data.general.animationDisabled - // ColorAnimation { - // duration: Style.animationFast - // } - // } - // } + // Smooth color transition on hover + Behavior on color { + enabled: !Settings.data.general.animationDisabled + ColorAnimation { + duration: Style.animationFast + } + } + } - // // Click to expand/collapse - // MouseArea { - // anchors.fill: parent - // // Don't capture clicks on the delete button - // anchors.rightMargin: 48 - // enabled: (summaryText.truncated || bodyText.truncated) - // onClicked: { - // if (notificationList.expandedId === notificationId) { - // notificationList.expandedId = "" - // } else { - // notificationList.expandedId = notificationId - // } - // } - // cursorShape: enabled ? Qt.PointingHandCursor : Qt.ArrowCursor - // } + // Click to expand/collapse + MouseArea { + anchors.fill: parent + // Don't capture clicks on the delete button + anchors.rightMargin: 48 + enabled: (summaryText.truncated || bodyText.truncated) + onClicked: { + if (notificationList.expandedId === notificationId) { + notificationList.expandedId = "" + } else { + notificationList.expandedId = notificationId + } + } + cursorShape: enabled ? Qt.PointingHandCursor : Qt.ArrowCursor + } - // Item { - // id: notificationLayoutWrapper - // anchors.left: parent.left - // anchors.right: parent.right - // anchors.top: parent.top - // anchors.margins: Style.marginM - // height: notificationLayout.implicitHeight + Item { + id: notificationLayoutWrapper + anchors.left: parent.left + anchors.right: parent.right + anchors.top: parent.top + anchors.margins: Style.marginM + height: notificationLayout.implicitHeight - // RowLayout { - // id: notificationLayout - // width: parent.width - // spacing: Style.marginM + RowLayout { + id: notificationLayout + width: parent.width + spacing: Style.marginM - // // Icon column - use simple Item instead of ColumnLayout to avoid polish loop - // Item { - // Layout.preferredWidth: Math.round(40 * Style.uiScaleRatio) - // Layout.alignment: Qt.AlignTop + // Icon column - use simple Item instead of ColumnLayout to avoid polish loop + Item { + Layout.preferredWidth: Math.round(40 * Style.uiScaleRatio) + Layout.alignment: Qt.AlignTop - // NImageCircled { - // anchors.top: parent.top - // anchors.topMargin: 20 - // width: Math.round(40 * Style.uiScaleRatio) - // height: Math.round(40 * Style.uiScaleRatio) - // imagePath: model.cachedImage || model.originalImage || "" - // borderColor: Color.transparent - // borderWidth: 0 - // fallbackIcon: "bell" - // fallbackIconSize: 24 - // } - // } + NImageCircled { + anchors.top: parent.top + anchors.topMargin: 20 + width: Math.round(40 * Style.uiScaleRatio) + height: Math.round(40 * Style.uiScaleRatio) + imagePath: model.cachedImage || model.originalImage || "" + borderColor: Color.transparent + borderWidth: 0 + fallbackIcon: "bell" + fallbackIconSize: 24 + } + } - // // Notification content column - // ColumnLayout { - // Layout.fillWidth: true - // Layout.alignment: Qt.AlignTop - // spacing: Style.marginXS - // Layout.rightMargin: -(Style.marginM + Style.baseWidgetSize * 0.6) + // Notification content column + ColumnLayout { + Layout.fillWidth: true + Layout.alignment: Qt.AlignTop + spacing: Style.marginXS + Layout.rightMargin: -(Style.marginM + Style.baseWidgetSize * 0.6) - // // Header row with app name and timestamp - // RowLayout { - // Layout.fillWidth: true - // spacing: Style.marginS + // Header row with app name and timestamp + RowLayout { + Layout.fillWidth: true + spacing: Style.marginS - // // Urgency indicator - // Rectangle { - // Layout.preferredWidth: 6 - // Layout.preferredHeight: 6 - // Layout.alignment: Qt.AlignVCenter - // radius: 3 - // visible: model.urgency !== 1 - // color: { - // if (model.urgency === 2) - // return Color.mError - // else if (model.urgency === 0) - // return Color.mOnSurfaceVariant - // else - // return Color.transparent - // } - // } + // Urgency indicator + Rectangle { + Layout.preferredWidth: 6 + Layout.preferredHeight: 6 + Layout.alignment: Qt.AlignVCenter + radius: 3 + visible: model.urgency !== 1 + color: { + if (model.urgency === 2) + return Color.mError + else if (model.urgency === 0) + return Color.mOnSurfaceVariant + else + return Color.transparent + } + } - // NText { - // text: model.appName || "Unknown App" - // pointSize: Style.fontSizeXS - // color: Color.mSecondary - // } + NText { + text: model.appName || "Unknown App" + pointSize: Style.fontSizeXS + color: Color.mSecondary + } - // NText { - // text: Time.formatRelativeTime(model.timestamp) - // pointSize: Style.fontSizeXS - // color: Color.mSecondary - // } + NText { + text: Time.formatRelativeTime(model.timestamp) + pointSize: Style.fontSizeXS + color: Color.mSecondary + } - // Item { - // Layout.fillWidth: true - // } - // } + Item { + Layout.fillWidth: true + } + } - // // Summary - // NText { - // id: summaryText - // text: model.summary || I18n.tr("general.no-summary") - // pointSize: Style.fontSizeM - // font.weight: Font.Medium - // color: Color.mOnSurface - // textFormat: Text.PlainText - // wrapMode: Text.Wrap - // Layout.fillWidth: true - // maximumLineCount: isExpanded ? 999 : 2 - // elide: Text.ElideRight - // } + // Summary + NText { + id: summaryText + text: model.summary || I18n.tr("general.no-summary") + pointSize: Style.fontSizeM + font.weight: Font.Medium + color: Color.mOnSurface + textFormat: Text.PlainText + wrapMode: Text.Wrap + Layout.fillWidth: true + maximumLineCount: isExpanded ? 999 : 2 + elide: Text.ElideRight + } - // // Body - // NText { - // id: bodyText - // text: model.body || "" - // pointSize: Style.fontSizeS - // color: Color.mOnSurfaceVariant - // textFormat: Text.PlainText - // wrapMode: Text.Wrap - // Layout.fillWidth: true - // maximumLineCount: isExpanded ? 999 : 3 - // elide: Text.ElideRight - // visible: text.length > 0 - // } + // Body + NText { + id: bodyText + text: model.body || "" + pointSize: Style.fontSizeS + color: Color.mOnSurfaceVariant + textFormat: Text.PlainText + wrapMode: Text.Wrap + Layout.fillWidth: true + maximumLineCount: isExpanded ? 999 : 3 + elide: Text.ElideRight + visible: text.length > 0 + } - // // Spacer for expand indicator - // Item { - // Layout.fillWidth: true - // Layout.preferredHeight: (!isExpanded && (summaryText.truncated || bodyText.truncated)) ? (Style.marginS) : 0 - // } + // Spacer for expand indicator + Item { + Layout.fillWidth: true + Layout.preferredHeight: (!isExpanded && (summaryText.truncated || bodyText.truncated)) ? (Style.marginS) : 0 + } - // // Expand indicator - // RowLayout { - // Layout.fillWidth: true - // visible: !isExpanded && (summaryText.truncated || bodyText.truncated) - // spacing: Style.marginXS + // Expand indicator + RowLayout { + Layout.fillWidth: true + visible: !isExpanded && (summaryText.truncated || bodyText.truncated) + spacing: Style.marginXS - // Item { - // Layout.fillWidth: true - // } + Item { + Layout.fillWidth: true + } - // NText { - // text: I18n.tr("notifications.panel.click-to-expand") || "Click to expand" - // pointSize: Style.fontSizeXS - // color: Color.mPrimary - // font.weight: Font.Medium - // } + NText { + text: I18n.tr("notifications.panel.click-to-expand") || "Click to expand" + pointSize: Style.fontSizeXS + color: Color.mPrimary + font.weight: Font.Medium + } - // NIcon { - // icon: "chevron-down" - // pointSize: Style.fontSizeS - // color: Color.mPrimary - // } - // } - // } + NIcon { + icon: "chevron-down" + pointSize: Style.fontSizeS + color: Color.mPrimary + } + } + } - // // Delete button - // NIconButton { - // icon: "trash" - // tooltipText: I18n.tr("tooltips.delete-notification") - // baseSize: Style.baseWidgetSize * 0.7 - // Layout.alignment: Qt.AlignTop + // Delete button + NIconButton { + icon: "trash" + tooltipText: I18n.tr("tooltips.delete-notification") + baseSize: Style.baseWidgetSize * 0.7 + Layout.alignment: Qt.AlignTop - // onClicked: { - // // Remove from history using the service API - // NotificationService.removeFromHistory(notificationId) - // } - // } - // } - // } - // } - // } + onClicked: { + // Remove from history using the service API + NotificationService.removeFromHistory(notificationId) + } + } + } + } + } + } } } }