FCInfo Macro

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
User avatar
GlouGlou
Posts: 1931
Joined: Sun Apr 05, 2015 9:02 am
Location: La Rochelle, France

Re: FCInfo Macro

Postby GlouGlou » Tue Jun 19, 2018 5:31 pm

UR_ wrote:
Tue Jun 19, 2018 3:12 pm
Windows user defined scaling 175%
by changing scaling, the 3D display is no more in HiRes. (with my pc)
mario52 wrote:
Tue Jun 19, 2018 10:04 am
want to test this version (without bold and with setPixelSize(11))
its look like better, but very very tiny on my screen.
Attachments
Capture.JPG
Capture.JPG (39.73 KiB) Viewed 489 times
UR_
Posts: 1153
Joined: Tue Jan 03, 2017 8:42 pm

Re: FCInfo Macro

Postby UR_ » Tue Jun 19, 2018 6:10 pm

If you are on win 10 and are using Settings->System->Display like this:

display settings win10.png
display settings win10.png (216.7 KiB) Viewed 483 times

HiRes isn't lost on FreeCAD's graphic view!
A line with line width of 1 is still exactly 1 pixel wide.
Please take a screenshot and zoom in.
mario52
Posts: 2806
Joined: Wed May 16, 2012 2:13 pm

Re: FCInfo Macro

Postby mario52 » Tue Jun 19, 2018 7:24 pm

hi

here info to High DPI Displays
GlouGlou wrote:
Tue Jun 19, 2018 5:31 pm
mario52 wrote:
Tue Jun 19, 2018 10:04 am
want to test this version (without bold and with setPixelSize(11))
its look like better, but very very tiny on my screen.
you must modify the value ex: replace 11 by 12, 13.. (line 1125)

Code: Select all

setPixelSize(12) 
waiting ! (give the results)

en attendant ! (donnez les resultats)

mario
Maybe you need a special feature, go into Macros_recipes and Code_snippets, Dialog creation. My macros on Gist.github.
UR_
Posts: 1153
Joined: Tue Jan 03, 2017 8:42 pm

Re: FCInfo Macro

Postby UR_ » Tue Jun 19, 2018 8:12 pm

setPixelSize(10).png
setPixelSize(10).png (12.69 KiB) Viewed 465 times
setPixelSize(15).png
setPixelSize(15).png (15.16 KiB) Viewed 465 times
setPixelSize(20).png
setPixelSize(20).png (17.96 KiB) Viewed 465 times

Widgets have all the same size, only fonts are scaled.
And the total size of dialog is too small.
mario52
Posts: 2806
Joined: Wed May 16, 2012 2:13 pm

Re: FCInfo Macro

Postby mario52 » Wed Jun 20, 2018 9:35 am

hi

this is normal setPixelSize() only for the text
UR_ wrote:
Tue Jun 19, 2018 3:12 pm
This only reverts settings, user defined while installing windows.
Better read out user defined scaling and insert this factor to all code lines containing hardcoded pixel values. Therefore dialog is scaled up and font will fit.
I think I'll have to adopt this method and all parametrized

can you please give a complete screenshot ( example 2736 x 1824 pixel display Windows user defined scaling 175%) of your screen with the macro to see the dimensions of the macro in relation to the screen

(my definition = 1680 x 1050 , 100%)

thanks

mario
Maybe you need a special feature, go into Macros_recipes and Code_snippets, Dialog creation. My macros on Gist.github.
UR_
Posts: 1153
Joined: Tue Jan 03, 2017 8:42 pm

Re: FCInfo Macro

Postby UR_ » Wed Jun 20, 2018 7:39 pm

Here we go:
2 different computers on win 10
screenshot full screen 2736x1824 setPixelSize(15) userscale 175%.png
screenshot full screen 2736x1824 setPixelSize(15) userscale 175%.png (393.65 KiB) Viewed 412 times
screenshot full screen 3840x2160 setPixelSize(15) userscale 150%.png
screenshot full screen 3840x2160 setPixelSize(15) userscale 150%.png (508.1 KiB) Viewed 412 times
mario52
Posts: 2806
Joined: Wed May 16, 2012 2:13 pm

Re: FCInfo Macro

Postby mario52 » Thu Jun 21, 2018 8:25 am

hi

thanks UR_

i think i configure all and save the user configuration

mario
Maybe you need a special feature, go into Macros_recipes and Code_snippets, Dialog creation. My macros on Gist.github.
User avatar
easyw-fc
Posts: 2774
Joined: Thu Jul 09, 2015 9:34 am

Re: FCInfo Macro

Postby easyw-fc » Tue Aug 14, 2018 6:11 am

mario52 wrote:
Wed Jun 20, 2018 9:35 am
I think I'll have to adopt this method and all parametrized
Hi Mario,
I'm trying to fix this issue too.. please have a look at here:
https://forum.freecadweb.org/viewtopic.php?f=3&t=30303
this code should give some more info about resolution and scaling

Code: Select all

from PySide import QtCore,QtGui;cp=QtGui.QDesktopWidget();ag=cp.availableGeometry();print(ag.size());print(cp.logicalDpiX());print(cp.logicalDpiY())
would someone mind to give feedback of this code on different user's display&platform case?
Maurice
freedman
Posts: 1143
Joined: Thu Mar 22, 2018 3:02 am
Location: Washington State, USA

Re: FCInfo Macro

Postby freedman » Tue Aug 14, 2018 10:59 pm

I got this at 125%
PySide.QtCore.QSize(1366, 768)
120
120

And this at 100%
PySide.QtCore.QSize(1366, 768)
96
96

It sure looks like there is a variance of the actual. I'm sure this is DPI, Monitor res. dependent. Looks like to code something a range test would need to be performed.
User avatar
easyw-fc
Posts: 2774
Joined: Thu Jul 09, 2015 9:34 am

Re: FCInfo Macro

Postby easyw-fc » Wed Aug 15, 2018 7:20 am

freedman wrote:
Tue Aug 14, 2018 10:59 pm
I got this at 125%
PySide.QtCore.QSize(1366, 768)
120
120

And this at 100%
PySide.QtCore.QSize(1366, 768)
96
96

It sure looks like there is a variance of the actual. I'm sure this is DPI, Monitor res. dependent. Looks like to code something a range test would need to be performed.
thx ... it is already something to work with :)
more display data feedback is welcome
M