-
Notifications
You must be signed in to change notification settings - Fork 112
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
HiDPI in Linux #141
Comments
Very strange. Could you post a screenshot? I'm using nvpy on 2560x1440 monitors in Linux and it all works perfectly. Could you give me steps to reproduce the issue? |
I expected interface elements such as menus and status line to match the size of the font in the window title. As you can see from the screenshot, this is not the case. I am currently using KDE Plasma 5.8, but have seen the same issue under XFCE and Gnome (on the same computer). My screen is a Dell P2815Q (3840x2160). It should be said that am not using "standard" 2:1 HiDPI scaling. In KDE, for instance, I have set window scaling to 1.5 and font DPI to 144. In Gnome I used a xrandr-based scaling method to get a resolution suiting my tastes. In XFCE I used the font DPI setting along with a custom theme. Most programs work well with all three methods. |
I assume you're happy with the font and font size in your notes list and editor window: Those are configurable following https://github.com/cpbotha/nvpy#making-nvpy-slightly-less-ugly-on-linux With regard to the font size in the controls vs the fonts in your titlebar: I had a quick look, it's probably not going to be straight-forward to fix. I can change the scaling of non-default fonts: http://stackoverflow.com/questions/34132203/scaling-of-tkinter-python-tk-gui-in-4k-38402160-resolution -- this will only help us partially. A better solution would be to change the code so that ALL controls use custom fonts, and then make the custom font scaling configurable. At least users will be able to tweak their nvpy until it looks right on their displays. See: http://stackoverflow.com/questions/4072150/how-to-change-a-widgets-font-style-without-knowing-the-widgets-font-family-siz/4073037#4073037 In the bit of nvpy time I am able to chew off from other projects, I first need to focus on the sqlite backend (SPEED!). Let's keep this issue here for later, or until someone else steps up to the task. |
It seems inefficient that any tkinter program must solve such issues on its own. Is there no way to globally change the defaults for tkinter (or Tk more generally) via configuration files or themes? |
I have not been able to find such an approach. If you do, please let me know! |
I found such a way, though it is not very clean. I simply changed the file --- fonts.tcl.bk 2016-12-02 10:40:58.313926142 +0000
+++ fonts.tcl 2016-12-02 10:44:23.591285739 +0000
@@ -131,10 +131,10 @@
set F(family) "Helvetica"
set F(fixed) "courier"
}
- set F(size) -12
- set F(ttsize) -10
- set F(capsize) -14
- set F(fixedsize) -12
+ set F(size) 10
+ set F(ttsize) 9
+ set F(capsize) 12
+ set F(fixedsize) 10
font configure TkDefaultFont -family $F(family) -size $F(size)
font configure TkTextFont -family $F(family) -size $F(size) It seems that the defaults for X are given in pixels (negative numbers) rather than points (positive numbers), which is the root of the problem. |
On my Debian stretch system with a HiDPI monitor, nvPY v0.9.7 comes up with tiny fonts in menus and other visible interface elements. Message text in dialogue boxes has normal size, but the font size of buttons inside the dialogue boxes is tiny as well.
The text was updated successfully, but these errors were encountered: