Preferences unreadable on high-DPI displays
I use a 4K monitor, and therefore have a weird DPI and larger-than-normal fonts. The current beta of FlatCAM displays the preferences in fixed-width columns, and on my display the text does not fit in these columns and is mostly unreadable.
The following fixes the issue for me (Bitbucket tells me I don’t have permission to submit this as a real pull request):
diff --git i/flatcamGUI/FlatCAMGUI.py w/flatcamGUI/FlatCAMGUI.py
index 7e6bd5d..def59da 100644
--- i/flatcamGUI/FlatCAMGUI.py
+++ w/flatcamGUI/FlatCAMGUI.py
@@ -3148,13 +3148,8 @@ class GeneralPreferencesUI(QtWidgets.QWidget):
self.setLayout(self.layout)
self.general_app_group = GeneralAppPrefGroupUI()
- self.general_app_group.setFixedWidth(290)
-
self.general_gui_group = GeneralGUIPrefGroupUI()
- self.general_gui_group.setFixedWidth(250)
-
self.general_gui_set_group = GeneralGUISetGroupUI()
- self.general_gui_set_group.setFixedWidth(250)
self.layout.addWidget(self.general_app_group)
self.layout.addWidget(self.general_gui_group)
Comments (10)
-
reporter -
Try to use:
self.general_app_group.setMinimumWidth(290)
instead of:
self.general_app_group.setFixedWidth(290)
and so on for all the groups, and see if the issue is fixed. At least in the Preferences.
I have made the change and it’s still OK for HD screens.
-
reporter That looks good to me too. I also had to make this similar change to get the tab labels to not be cut off:
- self.pref_tab_area_tabBar.setStyleSheet("QTabBar::tab{width:90px;}") + self.pref_tab_area_tabBar.setStyleSheet("QTabBar::tab{min-width:90px;}")
-
I will look in the code for other
setFixedWidth
that can be replaced withsetMinimumWidth
and will do it. Is the content readable with those changes (can you share a printscreen)? -
Hello Mike,
Can you please check the new version v 8.93 and report if everything is OK for 4k screens (or not)?
Thanks,
Marius -
reporter Hi. Apologies for the delay.
Preferences looks much better now (on the current Beta branch). The only things I still can’t read are the numbers in the plot (which I just realized were there at all, since they’re so tiny) and some of the help text in the left panel. Screenshot below.
The text in the project tree thing is also kind of tiny compared to everything else, but still readable (at least for me):
-
Probable I can make those configurable. Will that help?
-
reporter I’d say it makes sense for the axis label font size to be configurable. I’m not as concerned about the others, personally.
-
Ok Mike,
I’ve added two more parameters in the Edit → Preferences → General;
- one to configure the font size in the Notebook (the collapsible left side which include the Project and Selected tab
- one to configure the axis label font size
I’ve set the range between 8 pixels and 40 which should be enough (currently is at 8 pixels).
They will be available in the next release, which will be a maintenance build. Probably issued in a few days, I’m waiting for a few more bug reports, if any. -
- changed status to resolved
Fixed in FlatCAM beta build 8.95
- Log in to comment
After clicking around further, that’s not the only place with that problem (though it is by far the worst). My first instinct is to just blindly remove all the
setFixedWidth
calls, but I don’t know if that’ll make it look terrible on other people’s displays.