diff --git a/Assets/Translations/de.json b/Assets/Translations/de.json index 82bff890..fe0aaa3c 100644 --- a/Assets/Translations/de.json +++ b/Assets/Translations/de.json @@ -1392,20 +1392,13 @@ }, "session-menu": { "title": "Sitzungsmenü", - "click-again": "Erneut klicken für sofortige Ausführung", "action-in-seconds": "{action} in {seconds} Sekunden...", "lock": "Sperren", - "lock-subtitle": "Sitzung sperren", "lock-and-suspend": "Sperren und Ruhezustand", - "lock-and-suspend-subtitle": "Sitzung sperren und System in den Ruhezustand versetzen", "suspend": "Ruhezustand", "reboot": "Neu starten", "logout": "Abmelden", - "logout-subtitle": "Sitzung beenden", - "shutdown": "Herunterfahren", - "reboot-subtitle": "Starten Sie Ihren Computer neu.", - "shutdown-subtitle": "Schalte deinen Computer aus.", - "suspend-subtitle": "System in den Ruhezustand versetzen" + "shutdown": "Herunterfahren" }, "plugins": { "applications": "Anwendungen", diff --git a/Assets/Translations/en.json b/Assets/Translations/en.json index 7bf2adb1..c64321c6 100644 --- a/Assets/Translations/en.json +++ b/Assets/Translations/en.json @@ -1376,20 +1376,13 @@ }, "session-menu": { "title": "Session Menu", - "click-again": "Click again to execute immediately", "action-in-seconds": "{action} in {seconds} seconds...", "lock": "Lock", - "lock-subtitle": "Lock your session", "lock-and-suspend": "Lock and Suspend", - "lock-and-suspend-subtitle": "Lock session and put system to sleep", "suspend": "Suspend", - "suspend-subtitle": "Put system to sleep", "reboot": "Reboot", - "reboot-subtitle": "Restart your computer", "logout": "Logout", - "logout-subtitle": "End your session", - "shutdown": "Shutdown", - "shutdown-subtitle": "Turn off your computer" + "shutdown": "Shutdown" }, "plugins": { "applications": "Applications", diff --git a/Assets/Translations/es.json b/Assets/Translations/es.json index d5e30bc1..27e0bb8c 100644 --- a/Assets/Translations/es.json +++ b/Assets/Translations/es.json @@ -1375,20 +1375,13 @@ }, "session-menu": { "title": "Menú de sesión", - "click-again": "Haz clic de nuevo para ejecutar inmediatamente", "action-in-seconds": "{action} en {seconds} segundos...", "lock": "Bloquear", - "lock-subtitle": "Bloquea tu sesión", "lock-and-suspend": "Bloquear y Suspender", - "lock-and-suspend-subtitle": "Bloquear sesión y poner el sistema en suspensión", "suspend": "Suspender", "reboot": "Reiniciar", "logout": "Cerrar sesión", - "logout-subtitle": "Finaliza tu sesión", - "shutdown": "Apagar", - "reboot-subtitle": "Reinicia tu computadora.", - "shutdown-subtitle": "Apaga tu computadora.", - "suspend-subtitle": "Poner el sistema en reposo" + "shutdown": "Apagar" }, "plugins": { "applications": "Aplicaciones", diff --git a/Assets/Translations/fr.json b/Assets/Translations/fr.json index 9c9d5491..dcb8b330 100644 --- a/Assets/Translations/fr.json +++ b/Assets/Translations/fr.json @@ -1375,20 +1375,13 @@ }, "session-menu": { "title": "Menu de session", - "click-again": "Cliquez à nouveau pour exécuter immédiatement", "action-in-seconds": "{action} dans {seconds} secondes...", "lock": "Verrouiller", - "lock-subtitle": "Verrouiller votre session", "lock-and-suspend": "Verrouiller et Mettre en veille", - "lock-and-suspend-subtitle": "Verrouiller la session et mettre le système en veille", "suspend": "Mettre en veille", "reboot": "Redémarrer", "logout": "Déconnexion", - "logout-subtitle": "Terminer votre session", - "shutdown": "Éteindre", - "reboot-subtitle": "Redémarrez votre ordinateur.", - "shutdown-subtitle": "Éteignez votre ordinateur.", - "suspend-subtitle": "Mettre le système en veille" + "shutdown": "Éteindre" }, "plugins": { "applications": "Applications", diff --git a/Assets/Translations/pt.json b/Assets/Translations/pt.json index a4d968ae..d96dc0ce 100644 --- a/Assets/Translations/pt.json +++ b/Assets/Translations/pt.json @@ -1375,20 +1375,13 @@ }, "session-menu": { "title": "Menu da Sessão", - "click-again": "Clique novamente para executar imediatamente", "action-in-seconds": "{action} em {seconds} segundos...", "lock": "Bloquear", - "lock-subtitle": "Bloqueie sua sessão", "lock-and-suspend": "Bloquear e Suspender", - "lock-and-suspend-subtitle": "Bloquear sessão e colocar o sistema em suspensão", "suspend": "Suspender", "reboot": "Reiniciar", "logout": "Sair", - "logout-subtitle": "Encerre sua sessão", - "shutdown": "Desligar", - "reboot-subtitle": "Reinicie o seu computador.", - "shutdown-subtitle": "Desligue o seu computador.", - "suspend-subtitle": "Colocar o sistema em suspensão." + "shutdown": "Desligar" }, "plugins": { "applications": "Aplicativos", diff --git a/Assets/Translations/zh-CN.json b/Assets/Translations/zh-CN.json index 213be9cd..4fb29ae1 100644 --- a/Assets/Translations/zh-CN.json +++ b/Assets/Translations/zh-CN.json @@ -1375,20 +1375,13 @@ }, "session-menu": { "title": "会话菜单", - "click-again": "再次点击立即执行", - "action-in-seconds": "{seconds} 秒后{action}...", + "action-in-seconds": "{action} in {seconds} seconds...", "lock": "锁定", - "lock-subtitle": "锁定您的会话", "lock-and-suspend": "锁定并挂起", - "lock-and-suspend-subtitle": "锁定会话并使系统进入睡眠状态", "suspend": "挂起", - "suspend-subtitle": "使系统进入睡眠状态", "reboot": "重启", - "reboot-subtitle": "重新启动计算机", "logout": "注销", - "logout-subtitle": "结束您的会话", - "shutdown": "关机", - "shutdown-subtitle": "关闭计算机" + "shutdown": "关机" }, "plugins": { "applications": "应用程序", diff --git a/Modules/SessionMenu/SessionMenu.qml b/Modules/SessionMenu/SessionMenu.qml index 034a362c..7bdbf22c 100644 --- a/Modules/SessionMenu/SessionMenu.qml +++ b/Modules/SessionMenu/SessionMenu.qml @@ -13,8 +13,8 @@ import qs.Widgets NPanel { id: root - preferredWidth: 380 * Style.uiScaleRatio - preferredHeight: 440 * Style.uiScaleRatio + preferredWidth: 320 * Style.uiScaleRatio + preferredHeight: 360 * Style.uiScaleRatio panelAnchorHorizontalCenter: true panelAnchorVerticalCenter: true panelKeyboardFocus: true @@ -30,33 +30,27 @@ NPanel { readonly property var powerOptions: [{ "action": "lock", "icon": "lock", - "title": I18n.tr("session-menu.lock"), - "subtitle": I18n.tr("session-menu.lock-subtitle") + "title": I18n.tr("session-menu.lock") }, { "action": "lockAndSuspend", "icon": "lock-pause", - "title": I18n.tr("session-menu.lock-and-suspend"), - "subtitle": I18n.tr("session-menu.lock-and-suspend-subtitle") + "title": I18n.tr("session-menu.lock-and-suspend") }, { "action": "suspend", "icon": "suspend", - "title": I18n.tr("session-menu.suspend"), - "subtitle": I18n.tr("session-menu.suspend-subtitle") + "title": I18n.tr("session-menu.suspend") }, { "action": "reboot", "icon": "reboot", - "title": I18n.tr("session-menu.reboot"), - "subtitle": I18n.tr("session-menu.reboot-subtitle") + "title": I18n.tr("session-menu.reboot") }, { "action": "logout", "icon": "logout", - "title": I18n.tr("session-menu.logout"), - "subtitle": I18n.tr("session-menu.logout-subtitle") + "title": I18n.tr("session-menu.logout") }, { "action": "shutdown", "icon": "shutdown", "title": I18n.tr("session-menu.shutdown"), - "subtitle": I18n.tr("session-menu.shutdown-subtitle"), "isShutdown": true }] @@ -259,16 +253,16 @@ NPanel { ColumnLayout { anchors.fill: parent - anchors.topMargin: Style.marginL - anchors.leftMargin: Style.marginL - anchors.rightMargin: Style.marginL - anchors.bottomMargin: Style.marginM - spacing: Style.marginS + anchors.topMargin: Style.marginM + anchors.leftMargin: Style.marginM + anchors.rightMargin: Style.marginM + anchors.bottomMargin: Style.marginS + spacing: Style.marginXS // Header with title and close button RowLayout { Layout.fillWidth: true - Layout.preferredHeight: Style.baseWidgetSize * 0.8 + Layout.preferredHeight: Style.baseWidgetSize * 0.6 NText { text: timerActive ? I18n.tr("session-menu.action-in-seconds", { @@ -276,7 +270,7 @@ NPanel { "seconds": Math.ceil(timeRemaining / 1000) }) : I18n.tr("session-menu.title") font.weight: Style.fontWeightBold - pointSize: Style.fontSizeL + pointSize: Style.fontSizeM color: timerActive ? Color.mPrimary : Color.mOnSurface Layout.alignment: Qt.AlignVCenter verticalAlignment: Text.AlignVCenter @@ -310,7 +304,7 @@ NPanel { // Power options ColumnLayout { Layout.fillWidth: true - spacing: Style.marginM + spacing: Style.marginS Repeater { model: powerOptions @@ -318,7 +312,6 @@ NPanel { Layout.fillWidth: true icon: modelData.icon title: modelData.title - subtitle: modelData.subtitle isShutdown: modelData.isShutdown || false isSelected: index === selectedIndex onClicked: { @@ -338,14 +331,13 @@ NPanel { property string icon: "" property string title: "" - property string subtitle: "" property bool pending: false property bool isShutdown: false property bool isSelected: false signal clicked - height: Style.baseWidgetSize * 1.6 * Style.uiScaleRatio + height: Style.baseWidgetSize * 1.2 * Style.uiScaleRatio radius: Style.radiusS color: { if (pending) { @@ -368,7 +360,7 @@ NPanel { Item { anchors.fill: parent - anchors.margins: Style.marginL + anchors.margins: Style.marginM // Icon on the left NIcon { @@ -385,8 +377,8 @@ NPanel { return Color.mOnTertiary return Color.mOnSurface } - pointSize: Style.fontSizeXXXL - width: Style.baseWidgetSize * 0.6 + pointSize: Style.fontSizeXXL + width: Style.baseWidgetSize * 0.5 horizontalAlignment: Text.AlignHCenter verticalAlignment: Text.AlignVCenter @@ -402,14 +394,14 @@ NPanel { anchors.left: iconElement.right anchors.right: pendingIndicator.visible ? pendingIndicator.left : parent.right anchors.verticalCenter: parent.verticalCenter - anchors.leftMargin: Style.marginXL + anchors.leftMargin: Style.marginL anchors.rightMargin: pendingIndicator.visible ? Style.marginM : 0 spacing: 0 NText { text: buttonRoot.title font.weight: Style.fontWeightMedium - pointSize: Style.fontSizeM + pointSize: Style.fontSizeS color: { if (buttonRoot.pending) return Color.mPrimary @@ -426,28 +418,6 @@ NPanel { } } } - - NText { - text: { - if (buttonRoot.pending) { - return I18n.tr("session-menu.click-again") - } - return buttonRoot.subtitle - } - pointSize: Style.fontSizeXS - color: { - if (buttonRoot.pending) - return Color.mPrimary - if (buttonRoot.isShutdown && !buttonRoot.isSelected && !mouseArea.containsMouse) - return Color.mError - if (buttonRoot.isSelected || mouseArea.containsMouse) - return Color.mOnTertiary - return Color.mOnSurfaceVariant - } - opacity: Style.opacityHeavy - wrapMode: Text.NoWrap - elide: Text.ElideRight - } } // Pending indicator on the right @@ -455,8 +425,8 @@ NPanel { id: pendingIndicator anchors.right: parent.right anchors.verticalCenter: parent.verticalCenter - width: 24 - height: 24 + width: 20 + height: 20 radius: width * 0.5 color: Color.mPrimary visible: buttonRoot.pending @@ -464,7 +434,7 @@ NPanel { NText { anchors.centerIn: parent text: Math.ceil(timeRemaining / 1000) - pointSize: Style.fontSizeS + pointSize: Style.fontSizeXS font.weight: Style.fontWeightBold color: Color.mOnPrimary }