Calibre interface size
Posted: 2018-10-08 | Author: slackalaxy | Filed under: desktop, system | Tags: calibre, large icons, large menus, large toolbars, qt5 |1 CommentI have Calibre version 3.31 installed from SBo. On my laptop it looks and works just fine. Howevere, my desktop computer has some issues with its QT5 interface. Icons, menus and address bars are way too big. I googled a bit and found that other users have had the same complaints.
So, my menubar looks like this:
So, I used the solution proposed in the link above. I opened:
/usr/lib64/calibre/calibre/gui2/__init__.py
Then, I searched for QApplication.setAttribute(Qt.AA_EnableHighDpiScaling, True)
and commented out the line:
def setup_hidpi(): # This requires Qt >= 5.6 has_env_setting = False env_vars = ('QT_AUTO_SCREEN_SCALE_FACTOR', 'QT_SCALE_FACTOR', 'QT_SCREEN_SCALE_FACTORS', 'QT_DEVICE_PIXEL_RATIO') for v in env_vars: if os.environ.get(v): has_env_setting = True break hidpi = gprefs['hidpi'] if hidpi == 'on' or (hidpi == 'auto' and not has_env_setting): if DEBUG: prints('Turning on automatic hidpi scaling') #QApplication.setAttribute(Qt.AA_EnableHighDpiScaling, True) elif hidpi == 'off': if DEBUG: prints('Turning off automatic hidpi scaling') QApplication.setAttribute(Qt.AA_EnableHighDpiScaling, False) for p in env_vars: os.environ.pop(p, None) elif DEBUG: prints('Not controlling automatic hidpi scaling')
Now things look fine.
[…] Calibre interface size → […]