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

Font size, left pane width and tab labels width on high DPI displays #22

Closed
vuki opened this issue Mar 4, 2016 · 8 comments
Closed

Comments

@vuki
Copy link

vuki commented Mar 4, 2016

Hello. Thank you for this useful tool. I installed it on my laptop with Windows 10, which is set to 150% scaling, 144 dpi. Unfortunately, everything was so tiny, to the point of being unreadable.

A possible reason is that you specify font sizes in absolute pixels (12px) which probably does not allow scaling on high dpi displays. I've changed font sizes to points, by replacing in pyfda_rc.py, 12px with 10pt (three occurrences). This way, the font scales well and the interface looks good both on standard display and on the high dpi one.

The second problem was that the left pane was way too narrow, most of the list box items were replaced with ellipsis. For my own purposes, I changed the pane width (pyfdax.py, line 97) to setMaximumWidth(420) and now it looks good on my display. Maybe this value should be set automatically based on screen width. Maybe this line is not even necessary.
Edit: I've just checked this on my laptop: removing this line gives a nice looking layout.

An another thing: tabs labels were not fitting in the tabs. You specify the minimum width of tab as 10ex (pdyfa_rc.py, line 165). ex is the height unit, width should be specified with em because it makes sense. Changing this to min-width: 5em; gave the result that looks very nice on my screen.

Please consider making these changes in your code.

@chipmuenk
Copy link
Owner

Thanx for the kind words and for pointing out the display issue - the pyfda_rc setup is more like a dirty hack so far tested only on 3 different displays ... Did you have to change the font size settings in the matplotlib section of pyfda_rc as well? This would have an effect inside the actual plotting canvas.

Are you familiar with qss / css settings? I have some other small display issues I haven't found a good solution for ...

I'll take a look at the issue next week, I'm travelling at the moment.

@vuki
Copy link
Author

vuki commented Mar 5, 2016

I haven't changed anything apart from what I described. I am moderately familiar with standard web CSS, but I'm not an expert.

@chipmuenk
Copy link
Owner

I can't find 3 occurences of "12px" in my pyfda_rc.py - could you give me the line numbers or (even better) make a pull request?

@vuki
Copy link
Author

vuki commented Mar 6, 2016

It was 12px for the widget font and 13px for tabs font, lines: 154, 157, 201. Sorry for being inaccurate. I've changed all of them to 10pt.

@chipmuenk
Copy link
Owner

Ok, thanx - I thought I was maybe working on an outdated or unpublished version.

@chipmuenk
Copy link
Owner

The latest commits should fix the issue - thanx once more & please test :-)

@vuki
Copy link
Author

vuki commented Mar 8, 2016

There is still 13px in pyfda_rc.py line 154, which results in truncated tab titles on a high dpi display. 10pt in this line corrects this problem.

@chipmuenk
Copy link
Owner

There is always one more ... thanx a lot, I fixed this in the latest commit, the unselected first tab now look as well.

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

2 participants