From 8b62b971d89d36163665b067ade203a027fdb72d Mon Sep 17 00:00:00 2001 From: notiant <238434866+notiant@users.noreply.github.com> Date: Thu, 15 Jan 2026 14:49:11 +0100 Subject: [PATCH] remove buttom measurement for LockScreen --- Assets/Translations/de.json | 4 +-- Assets/Translations/en.json | 2 +- Assets/Translations/es.json | 2 +- Assets/Translations/fr.json | 2 +- Assets/Translations/hu.json | 2 +- Assets/Translations/ku.json | 2 +- Assets/Translations/nl.json | 2 +- Assets/Translations/pl.json | 2 +- Assets/Translations/pt.json | 2 +- Assets/Translations/ru.json | 2 +- Assets/Translations/tr.json | 2 +- Assets/Translations/uk-UA.json | 2 +- Assets/Translations/zh-CN.json | 2 +- Modules/LockScreen/LockScreen.qml | 49 +------------------------------ 14 files changed, 15 insertions(+), 62 deletions(-) diff --git a/Assets/Translations/de.json b/Assets/Translations/de.json index 4e8c4afe5..c395df5fb 100644 --- a/Assets/Translations/de.json +++ b/Assets/Translations/de.json @@ -364,7 +364,7 @@ "download": "Herunterladen", "duration": "Dauer", "enabled": "Aktiviert", - "events": "Veranstaltungen", + "events": "Ereignisse", "execute": "Ausführen", "focus": "Fokus", "frequency": "Frequenz", @@ -749,7 +749,7 @@ "templates-filter-label": "Nach Kategorie filtern", "templates-misc-description": "Erstellen Sie Ihre eigenen Vorlagen.", "templates-misc-label": "Erweitert", - "templates-misc-user-templates-description": "Nur aktivieren, wenn Sie wissen, was Sie tun — weitere Informationen finden Sie in unserer Online-Dokumentation", + "templates-misc-user-templates-description": "Nur aktivieren, wenn Sie wissen, was Sie tun — weitere Informationen finden Sie in unserer Online-Dokumentation.", "templates-misc-user-templates-label": "Benutzer-Vorlagen aktivieren", "templates-none-detected": "Keine erkannt", "templates-write-path": "Schreibt: {filepath}", diff --git a/Assets/Translations/en.json b/Assets/Translations/en.json index e4eda379e..9ee8051d1 100644 --- a/Assets/Translations/en.json +++ b/Assets/Translations/en.json @@ -749,7 +749,7 @@ "templates-filter-label": "Filter by category", "templates-misc-description": "Create your own templates.", "templates-misc-label": "Advanced", - "templates-misc-user-templates-description": "Only enable if you know what you are doing — refer to our online documentation", + "templates-misc-user-templates-description": "Only enable if you know what you are doing — refer to our online documentation.", "templates-misc-user-templates-label": "Enable user templates", "templates-none-detected": "None detected", "templates-write-path": "Writes: {filepath}", diff --git a/Assets/Translations/es.json b/Assets/Translations/es.json index a64172340..550597b5f 100644 --- a/Assets/Translations/es.json +++ b/Assets/Translations/es.json @@ -749,7 +749,7 @@ "templates-filter-label": "Filtrar por categoría", "templates-misc-description": "Crea tus propias plantillas.", "templates-misc-label": "Avanzado", - "templates-misc-user-templates-description": "Solo habilita si sabes lo que estás haciendo — consulta nuestra documentación en línea", + "templates-misc-user-templates-description": "Solo habilita si sabes lo que estás haciendo — consulta nuestra documentación en línea.", "templates-misc-user-templates-label": "Habilitar plantillas de usuario", "templates-none-detected": "Ninguno detectado", "templates-write-path": "Escribe: {filepath}", diff --git a/Assets/Translations/fr.json b/Assets/Translations/fr.json index 9d96144ab..54ef1eb2e 100644 --- a/Assets/Translations/fr.json +++ b/Assets/Translations/fr.json @@ -749,7 +749,7 @@ "templates-filter-label": "Filtrer par catégorie", "templates-misc-description": "Créez vos propres modèles.", "templates-misc-label": "Avancé", - "templates-misc-user-templates-description": "N'activez que si vous savez ce que vous faites — consultez notre documentation en ligne", + "templates-misc-user-templates-description": "N'activez que si vous savez ce que vous faites — consultez notre documentation en ligne.", "templates-misc-user-templates-label": "Activer les modèles utilisateur", "templates-none-detected": "Aucun détecté", "templates-write-path": "Écrit : {filepath}", diff --git a/Assets/Translations/hu.json b/Assets/Translations/hu.json index a642d6acb..fc863d4a0 100644 --- a/Assets/Translations/hu.json +++ b/Assets/Translations/hu.json @@ -749,7 +749,7 @@ "templates-filter-label": "Szűrés kategória szerint", "templates-misc-description": "Hozzon létre saját sablonokat.", "templates-misc-label": "Haladó", - "templates-misc-user-templates-description": "Csak akkor engedélyezze, ha tudja, mit csinál — lásd az online dokumentációt", + "templates-misc-user-templates-description": "Csak akkor engedélyezze, ha tudja, mit csinál — lásd az online dokumentációt.", "templates-misc-user-templates-label": "Felhasználói sablonok engedélyezése", "templates-none-detected": "Nem észlelt semmit", "templates-write-path": "Írja: {filepath}", diff --git a/Assets/Translations/ku.json b/Assets/Translations/ku.json index b2b974559..becdacb9c 100644 --- a/Assets/Translations/ku.json +++ b/Assets/Translations/ku.json @@ -749,7 +749,7 @@ "templates-filter-label": "Li gorî kategoriyê parzûn bike", "templates-misc-description": "Şablonên xwe biafirîne.", "templates-misc-label": "Pêşketî", - "templates-misc-user-templates-description": "Tenê eger tu dizanî çi dikî çalak bike — serî li belgekirina me ya serhêl bide", + "templates-misc-user-templates-description": "Tenê eger tu dizanî çi dikî çalak bike — serî li belgekirina me ya serhêl bide.", "templates-misc-user-templates-label": "Şablonên bikarhêner çalak bike", "templates-none-detected": "Tiştek nehat dîtin", "templates-write-path": "Dinivîse: {filepath}", diff --git a/Assets/Translations/nl.json b/Assets/Translations/nl.json index 942b047f1..f220b5f0b 100644 --- a/Assets/Translations/nl.json +++ b/Assets/Translations/nl.json @@ -749,7 +749,7 @@ "templates-filter-label": "Filteren op categorie", "templates-misc-description": "Maak uw eigen sjablonen.", "templates-misc-label": "Geavanceerd", - "templates-misc-user-templates-description": "Alleen inschakelen als u weet wat u doet — raadpleeg onze online documentatie", + "templates-misc-user-templates-description": "Alleen inschakelen als u weet wat u doet — raadpleeg onze online documentatie.", "templates-misc-user-templates-label": "Gebruikerssjablonen inschakelen", "templates-none-detected": "Geen gedetecteerd", "templates-write-path": "Schrijft: {filepath}", diff --git a/Assets/Translations/pl.json b/Assets/Translations/pl.json index 9b29f6a55..f3319228c 100644 --- a/Assets/Translations/pl.json +++ b/Assets/Translations/pl.json @@ -749,7 +749,7 @@ "templates-filter-label": "Filtruj według kategorii", "templates-misc-description": "Twórz własne szablony.", "templates-misc-label": "Zaawansowane", - "templates-misc-user-templates-description": "Włącz tylko jeśli wiesz co robisz — zapoznaj się z dokumentacją online", + "templates-misc-user-templates-description": "Włącz tylko jeśli wiesz co robisz — zapoznaj się z dokumentacją online.", "templates-misc-user-templates-label": "Włącz szablony użytkownika", "templates-none-detected": "Nie wykryto", "templates-write-path": "Zapisuje: {filepath}", diff --git a/Assets/Translations/pt.json b/Assets/Translations/pt.json index 9f897d425..ba957e901 100644 --- a/Assets/Translations/pt.json +++ b/Assets/Translations/pt.json @@ -749,7 +749,7 @@ "templates-filter-label": "Filtrar por categoria", "templates-misc-description": "Crie seus próprios modelos.", "templates-misc-label": "Avançado", - "templates-misc-user-templates-description": "Ative apenas se souber o que está fazendo — consulte nossa documentação online", + "templates-misc-user-templates-description": "Ative apenas se souber o que está fazendo — consulte nossa documentação online.", "templates-misc-user-templates-label": "Ativar modelos do usuário", "templates-none-detected": "Nenhum detectado", "templates-write-path": "Escreve: {filepath}", diff --git a/Assets/Translations/ru.json b/Assets/Translations/ru.json index 06711c056..595f265ed 100644 --- a/Assets/Translations/ru.json +++ b/Assets/Translations/ru.json @@ -749,7 +749,7 @@ "templates-filter-label": "Фильтровать по категории", "templates-misc-description": "Создайте свои собственные шаблоны.", "templates-misc-label": "Дополнительно", - "templates-misc-user-templates-description": "Включайте только если вы знаете, что делаете — обратитесь к нашей онлайн-документации", + "templates-misc-user-templates-description": "Включайте только если вы знаете, что делаете — обратитесь к нашей онлайн-документации.", "templates-misc-user-templates-label": "Включить пользовательские шаблоны", "templates-none-detected": "Не обнаружено", "templates-write-path": "Записывает: {filepath}", diff --git a/Assets/Translations/tr.json b/Assets/Translations/tr.json index 48e45b797..33a25db0e 100644 --- a/Assets/Translations/tr.json +++ b/Assets/Translations/tr.json @@ -749,7 +749,7 @@ "templates-filter-label": "Kategoriye göre filtrele", "templates-misc-description": "Kendi şablonlarınızı oluşturun.", "templates-misc-label": "Gelişmiş", - "templates-misc-user-templates-description": "Yalnızca ne yaptığınızı biliyorsanız etkinleştirin — çevrimiçi belgelerimize bakın", + "templates-misc-user-templates-description": "Yalnızca ne yaptığınızı biliyorsanız etkinleştirin — çevrimiçi belgelerimize bakın.", "templates-misc-user-templates-label": "Kullanıcı şablonlarını etkinleştir", "templates-none-detected": "Hiçbiri algılanmadı", "templates-write-path": "Yazıyor: {filepath}", diff --git a/Assets/Translations/uk-UA.json b/Assets/Translations/uk-UA.json index 6945f3355..c7d923990 100644 --- a/Assets/Translations/uk-UA.json +++ b/Assets/Translations/uk-UA.json @@ -749,7 +749,7 @@ "templates-filter-label": "Фільтрувати за категорією", "templates-misc-description": "Створіть власні шаблони.", "templates-misc-label": "Розширено", - "templates-misc-user-templates-description": "Увімкніть лише якщо ви знаєте, що робите — зверніться до нашої онлайн-документації", + "templates-misc-user-templates-description": "Увімкніть лише якщо ви знаєте, що робите — зверніться до нашої онлайн-документації.", "templates-misc-user-templates-label": "Увімкнути користувацькі шаблони", "templates-none-detected": "Не виявлено", "templates-write-path": "Записує: {filepath}", diff --git a/Assets/Translations/zh-CN.json b/Assets/Translations/zh-CN.json index 3bb00a6f0..bb92cd9ae 100644 --- a/Assets/Translations/zh-CN.json +++ b/Assets/Translations/zh-CN.json @@ -749,7 +749,7 @@ "templates-filter-label": "按类别筛选", "templates-misc-description": "创建您自己的模板。", "templates-misc-label": "高级", - "templates-misc-user-templates-description": "仅在您知道自己在做什么时启用,请参阅我们的在线文档", + "templates-misc-user-templates-description": "仅在您知道自己在做什么时启用,请参阅我们的在线文档。", "templates-misc-user-templates-label": "启用用户模板", "templates-none-detected": "未检测到", "templates-write-path": "写入:{filepath}", diff --git a/Modules/LockScreen/LockScreen.qml b/Modules/LockScreen/LockScreen.qml index a23b39647..df7cf63e2 100644 --- a/Modules/LockScreen/LockScreen.qml +++ b/Modules/LockScreen/LockScreen.qml @@ -684,54 +684,7 @@ Loader { radius: Style.radiusL color: Color.mSurface - // Measure text widths to determine minimum button width (for container width calculation) - Item { - id: buttonRowTextMeasurer - visible: false - property real iconSize: Settings.data.general.compactLockScreen ? Style.fontSizeM : Style.fontSizeL - property real fontSize: Settings.data.general.compactLockScreen ? Style.fontSizeS : Style.fontSizeM - property real spacing: Style.marginXS - property real padding: 18 // Approximate horizontal padding per button - - // Measure all button text widths - NText { - id: logoutText - text: I18n.tr("common.logout") - font.pointSize: buttonRowTextMeasurer.fontSize - } - NText { - id: suspendText - text: I18n.tr("common.suspend") - font.pointSize: buttonRowTextMeasurer.fontSize - } - NText { - id: hibernateText - text: Settings.data.general.showHibernateOnLockScreen ? I18n.tr("common.hibernate") : "" - font.pointSize: buttonRowTextMeasurer.fontSize - } - NText { - id: rebootText - text: I18n.tr("common.reboot") - font.pointSize: buttonRowTextMeasurer.fontSize - } - NText { - id: shutdownText - text: I18n.tr("common.shutdown") - font.pointSize: buttonRowTextMeasurer.fontSize - } - - // Calculate maximum width needed - property real maxTextWidth: Math.max(logoutText.implicitWidth, Math.max(suspendText.implicitWidth, Math.max(hibernateText.implicitWidth, Math.max(rebootText.implicitWidth, shutdownText.implicitWidth)))) - property real minButtonWidth: maxTextWidth + iconSize + spacing + padding - } - - // Calculate minimum width based on button requirements - // Button row needs: margins + buttons (4 or 5 depending on hibernate visibility) + spacings + margins - // Plus ColumnLayout margins (14 on each side = 28 total) - property int buttonCount: Settings.data.general.showHibernateOnLockScreen ? 5 : 4 - property int spacingCount: buttonCount - 1 - property real minButtonRowWidth: buttonRowTextMeasurer.minButtonWidth > 0 ? (buttonCount * buttonRowTextMeasurer.minButtonWidth) + (spacingCount * 10) + (2 * Style.marginM) + 28 + (2 * Style.marginM) : 750 - width: Math.max(750, minButtonRowWidth) + width: Settings.data.general.showHibernateOnLockScreen ? 800 : 750 ColumnLayout { anchors.fill: parent