Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose default zoom in variable #110

Open
codesections opened this issue Mar 16, 2019 · 2 comments
Open

Expose default zoom in variable #110

codesections opened this issue Mar 16, 2019 · 2 comments

Comments

@codesections
Copy link

Thanks very much for webmacs! I'm strongly considering switching from qutebrowser!

Before I can do so, though, I'll need to resolve one issue: the default zoom is significantly too low (likely because I have a hdpi screen). I'd like to be able to set the default zoom level in my config file, but I cannot currently find a way to do so.

Would it be possible to expose the default zoom as one of the variables? That way, I could set it, and I'd know that it's part of the supported API.

Or, if there's a different, supported way to set the default zoom level, please let me know! Thanks again for the project.

@TLATER
Copy link

TLATER commented Mar 19, 2019

I wouldn't call it supported per-se, but it's pretty easy to do with Qt internals in your init file:

from PyQt5.QtCore import Qt
from PyQt5.QtWidgets import QApplication

QApplication.setAttribute(Qt.AA_EnableHighDpiScaling, True)

Admittedly, I think it's probably worth adding into an FAQ for workarounds or something. Either that or I get off my ass and write something to properly handle Xorg dpi settings.

@xantoz
Copy link
Contributor

xantoz commented May 5, 2019

You can also define the environment variable QT_SCALE_FACTOR.
Try:

QT_SCALE_FACTOR=1.5 webmacs

This should work for any Qt program.

See: https://doc.qt.io/qt-5/highdpi.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants