refactor(settings): hard-disable chrome toggle without GPU, terser note
User feedback: a long explanatory note plus an interactive toggle
that the runtime silently overrides is confusing. The right shape is
"you literally cannot turn this on without a GPU" — hard-disable the
toggle when HW accel is off, and let the note be a one-liner.
Changes:
- Toggle's `disabled` prop now also depends on `!isHardwareAccelEnabled()`.
Combined with the existing `hideTitleBar || useSystemTitleBar`
guards, the user simply can't flip the toggle in CPU mode. The
visual reads as "available only when conditions are met."
- Toggle's `enabled` prop is also gated so the visual state matches
the effective state, not the stored preference, when HW accel is
off. The stored preference is still preserved on disk and
reactivates the next time HW accel is on.
- i18n note shortened to a single line across all five locales:
"Available only with GPU acceleration." (and equivalents).
cc
This commit is contained in:
6 files changed
+7
-7
No files matched your search
@@ -4834,12 +4834,12 @@
|
||||
{/if}
|
||||
</div>
|
||||
<Toggle
|
||||
enabled={matchSystemWindowChromeState}
|
||||
enabled={matchSystemWindowChromeState && isHardwareAccelEnabled()}
|
||||
onchange={(v) => {
|
||||
setMatchSystemWindowChrome(v);
|
||||
showToast($t('settings.appearance.matchSystemChromeRestart'), 'info');
|
||||
}}
|
||||
disabled={hideTitleBar || useSystemTitleBar}
|
||||
disabled={hideTitleBar || useSystemTitleBar || !isHardwareAccelEnabled()}
|
||||
/>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
@@ -2292,7 +2292,7 @@
|
||||
"useSystemTitleBarDesc": "QBZ-eigene Titelleiste durch die native Fensterdekoration des Systems ersetzen. Änderung startet die App neu.",
|
||||
"hideTitleBar": "Titelleiste ausblenden",
|
||||
"hideTitleBarDesc": "Titelleiste komplett ausblenden (für Tiling-Window-Manager-Nutzer)",
|
||||
"matchSystemChromeCpuOverride": "Derzeit deaktiviert, weil die Hardwarebeschleunigung ausgeschaltet ist. Das transparente Chrome zwingt GTK, die Fensterdekorationen in jedem Frame neu zu zeichnen, was unter CPU-Rendering Frames verliert. Deine Einstellung bleibt erhalten und aktiviert sich automatisch wieder, sobald die Hardwarebeschleunigung wieder eingeschaltet wird.",
|
||||
"matchSystemChromeCpuOverride": "Nur mit GPU-Beschleunigung verfügbar.",
|
||||
"searchInTitleBar": "Suche in Titelleiste",
|
||||
"searchInTitleBarDesc": "Suchfeld in der Titelleiste statt in der Seitenleiste anzeigen",
|
||||
"navInTitleBar": "Navigation in Titelleiste",
|
||||
|
||||
@@ -2325,7 +2325,7 @@
|
||||
"matchSystemChrome": "Match system window chrome",
|
||||
"matchSystemChromeDesc": "Round the window corners and add a subtle edge so QBZ blends with your desktop theme. Takes effect after restarting the app (the window is rebuilt transparent so the corners don't show white).",
|
||||
"matchSystemChromeRestart": "Restart QBZ to apply the window chrome change.",
|
||||
"matchSystemChromeCpuOverride": "Currently disabled because hardware acceleration is off. The transparent chrome forces GTK to repaint window decorations on every frame, which drops frames under CPU rendering. Your preference is saved and reactivates automatically when hardware acceleration comes back on.",
|
||||
"matchSystemChromeCpuOverride": "Available only with GPU acceleration.",
|
||||
"windowControlsColorPresetCustom": "Custom",
|
||||
"windowControlsCustomColors": "Custom colors",
|
||||
"windowControlsClose": "Close",
|
||||
|
||||
@@ -2325,7 +2325,7 @@
|
||||
"matchSystemChrome": "Integrar con el tema del sistema",
|
||||
"matchSystemChromeDesc": "Redondea las esquinas de la ventana y agrega un borde sutil para que QBZ se integre con el tema del escritorio. Requiere reiniciar la app (la ventana se reconstruye transparente para que las esquinas no se vean blancas).",
|
||||
"matchSystemChromeRestart": "Reinicia QBZ para aplicar el cambio del chrome.",
|
||||
"matchSystemChromeCpuOverride": "Actualmente deshabilitado porque la aceleración por hardware está apagada. El chrome transparente obliga a GTK a repintar las decoraciones de la ventana en cada frame, lo cual tira frames bajo renderizado por CPU. Tu preferencia se guarda y se reactiva automáticamente cuando vuelvas a encender la aceleración por hardware.",
|
||||
"matchSystemChromeCpuOverride": "Disponible sólo con aceleración por GPU.",
|
||||
"windowControlsColorPresetCustom": "Personalizado",
|
||||
"windowControlsCustomColors": "Colores personalizados",
|
||||
"windowControlsClose": "Cerrar",
|
||||
|
||||
@@ -2292,7 +2292,7 @@
|
||||
"useSystemTitleBarDesc": "Remplacer la barre de titre personnalisée de QBZ par les décorations natives de votre système. Ce changement redémarrera l'application.",
|
||||
"hideTitleBar": "Masquer la barre de titre",
|
||||
"hideTitleBarDesc": "Masquer complètement la barre de titre (pour les utilisateurs de gestionnaires de fenêtres en mosaïque)",
|
||||
"matchSystemChromeCpuOverride": "Actuellement désactivé parce que l'accélération matérielle est éteinte. Le chrome transparent force GTK à repeindre les décorations de fenêtre à chaque image, ce qui fait perdre des images en rendu CPU. Votre préférence est sauvegardée et se réactive automatiquement quand l'accélération matérielle est réactivée.",
|
||||
"matchSystemChromeCpuOverride": "Disponible uniquement avec l'accélération GPU.",
|
||||
"searchInTitleBar": "Recherche dans la barre de titre",
|
||||
"searchInTitleBarDesc": "Afficher le champ de recherche dans la barre de titre au lieu de la barre latérale",
|
||||
"navInTitleBar": "Navigation dans la barre de titre",
|
||||
|
||||
@@ -2292,7 +2292,7 @@
|
||||
"useSystemTitleBarDesc": "Substituir a barra de título personalizada do QBZ pelas decorações de janela nativas do seu sistema. Alterar isso reiniciará o app.",
|
||||
"hideTitleBar": "Ocultar barra de título",
|
||||
"hideTitleBarDesc": "Ocultar completamente a barra de título (para usuários de gerenciadores de janela tiling)",
|
||||
"matchSystemChromeCpuOverride": "Atualmente desativado porque a aceleração de hardware está desligada. O chrome transparente força o GTK a redesenhar as decorações de janela em cada quadro, o que perde quadros sob renderização de CPU. Sua preferência é salva e reativa automaticamente quando a aceleração de hardware voltar.",
|
||||
"matchSystemChromeCpuOverride": "Disponível apenas com aceleração GPU.",
|
||||
"searchInTitleBar": "Busca na barra de título",
|
||||
"searchInTitleBarDesc": "Mostrar o campo de busca na barra de título em vez da barra lateral",
|
||||
"navInTitleBar": "Navegação na barra de título",
|
||||
|
||||
Reference in new issue
Block a user