Calibre interface size

I 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.


One Comment on “Calibre interface size”

  1. […] Calibre interface size → […]


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s