diff options
author | Florian Bruhin <me@the-compiler.org> | 2020-05-29 20:58:21 +0200 |
---|---|---|
committer | Florian Bruhin <me@the-compiler.org> | 2020-05-29 20:58:21 +0200 |
commit | ec017f3aa3b58e2d8839b2fd98ea36428d001bb9 (patch) | |
tree | 72af405ec9e59144b35eb022823a5796ca9032fe | |
parent | 6aeb3d81859a53b3ac779b881d6ab0e8035939fa (diff) | |
download | qutebrowser-ec017f3aa3b58e2d8839b2fd98ea36428d001bb9.tar.gz qutebrowser-ec017f3aa3b58e2d8839b2fd98ea36428d001bb9.zip |
backendproblem: Deduplicate text
-rw-r--r-- | qutebrowser/misc/backendproblem.py | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/qutebrowser/misc/backendproblem.py b/qutebrowser/misc/backendproblem.py index 73044cd99..01cfc988a 100644 --- a/qutebrowser/misc/backendproblem.py +++ b/qutebrowser/misc/backendproblem.py @@ -165,6 +165,14 @@ class _BackendProblemChecker: """Check for various backend-specific issues.""" + SOFTWARE_RENDERING_TEXT = ( + "<p><b>Forcing software rendering</b></p>" + "<p>This allows you to use the newer QtWebEngine backend (based on " + "Chromium) but could have noticeable performance impact (depending on " + "your hardware). This sets the <i>qt.force_software_rendering = " + "'chromium'</i> option (if you have a <i>config.py</i> file, you'll " + "need to set this manually).</p>") + def __init__(self, *, no_err_windows: bool, save_manager: savemanager.SaveManager) -> None: @@ -238,14 +246,8 @@ class _BackendProblemChecker: self._show_dialog( backend=usertypes.Backend.QtWebEngine, because="you're using Nouveau graphics", - text=("<p>There are two ways to fix this:</p>" - "<p><b>Forcing software rendering</b></p>" - "<p>This allows you to use the newer QtWebEngine backend " - "(based on Chromium) but could have noticeable performance " - "impact (depending on your hardware). This sets the " - "<i>qt.force_software_rendering = 'chromium'</i> option " - "(if you have a <i>config.py</i> file, you'll need to set " - "this manually).</p>"), + text=("<p>There are two ways to fix this:</p>" + + self.SOFTWARE_RENDERING_TEXT), buttons=[button], ) @@ -290,13 +292,7 @@ class _BackendProblemChecker: buttons.append(_Button("Force software rendering", 'qt.force_software_rendering', 'chromium')) - text += ("<p><b>Forcing software rendering</b></p>" - "<p>This allows you to use the newer QtWebEngine backend " - "(based on Chromium) but could have noticeable " - "performance impact (depending on your hardware). This " - "sets the <i>qt.force_software_rendering = " - "'chromium'</i> option (if you have a <i>config.py</i> " - "file, you'll need to set this manually).</p>") + text += self.SOFTWARE_RENDERING_TEXT self._show_dialog(backend=usertypes.Backend.QtWebEngine, because="you're using Wayland", |