spesmilo / electrum-docs

Documentation for Electrum Bitcoin Wallet
https://docs.electrum.org/
MIT License
126 stars 146 forks source link

Update of FAQ related to characters size #140

Open ser opened 2 years ago

ser commented 2 years ago

That receipt should work on most of GNU/Linux distributions.

SomberNight commented 2 years ago

Thanks. Documenting the issue is one approach, but ideally we should try to fix the software so that it works out of the box.

Could you open an issue in the main repo with some screenshots of how the application looks for you, and also, could you try with this patch?

diff --git a/electrum/gui/qt/__init__.py b/electrum/gui/qt/__init__.py
index 3290833019..a922da9074 100644
--- a/electrum/gui/qt/__init__.py
+++ b/electrum/gui/qt/__init__.py
@@ -124,6 +124,8 @@ class ElectrumGui(BaseElectrumGui, Logger):
             QtCore.QCoreApplication.setAttribute(QtCore.Qt.AA_ShareOpenGLContexts)
         if hasattr(QGuiApplication, 'setDesktopFileName'):
             QGuiApplication.setDesktopFileName('electrum.desktop')
+        if hasattr(QtCore.Qt, "AA_EnableHighDpiScaling"):
+            QtCore.QCoreApplication.setAttribute(Qt.AA_EnableHighDpiScaling)
         self.gui_thread = threading.current_thread()
         self.windows = []  # type: List[ElectrumWindow]
         self.efilter = OpenFileEventFilter(self.windows)

(I guess it is similar to setting the QT_AUTO_SCREEN_SCALE_FACTOR=1 env var?)

ser commented 2 years ago

The patch works correctly setting QT_AUTO_SCREEN_SCALE_FACTOR.

But how to change font size if it's not ideal? I mean QT_FONT_DPI - maybe we can leave that part in the FAQ - as current patch will satisfy 90% of users.