PureBasic Forum
https://www.purebasic.fr/english/

PureBasic 5.70 LTS is out !
https://www.purebasic.fr/english/viewtopic.php?f=14&t=70785
Page 6 of 17

Author:  Dude [ Sun Jun 03, 2018 10:05 pm ]
Post subject:  Re: PureBasic 5.70 LTS beta 1 is out !

kurzer wrote:
Simply activate "create DPI aware executable" in the compiler settings and your GUI will be automatically scaled on machines with different monitor DPI settings.

That's how I assumed it works. But it makes no difference on my PC: viewtopic.php?p=522806#p522806

Author:  kurzer [ Sun Jun 03, 2018 11:54 pm ]
Post subject:  Re: PureBasic 5.70 LTS beta 1 is out !

Dude wrote:
kurzer wrote:
Simply activate "create DPI aware executable" in the compiler settings and your GUI will be automatically scaled on machines with different monitor DPI settings.

That's how I assumed it works. But it makes no difference on my PC: viewtopic.php?p=522806#p522806

Hmm, I can't reproduce your problem.
When I compile your code, I'll get two different scaled windows.

But even, if I disable the DPI aware checkbox in the compiler settings, the text in the buttons does not fit.
So I think it's a problem with the font you chose for your desktop. Maybe the DPI awareness cannot handle different font sizes?

Here are my desktop settings:
Image

Here is the result of my test with your example code:
Image

So if this GUI was designed on a 100% scaled desktop, another user with an 125% desktop will see exact the same GUI and sizing proportions. And in both cases the Gagdets are to small for the text.

Author:  Paul [ Mon Jun 04, 2018 3:29 am ]
Post subject:  Re: PureBasic 5.70 LTS beta 1 is out !

Dude wrote:
kurzer wrote:
Simply activate "create DPI aware executable" in the compiler settings and your GUI will be automatically scaled on machines with different monitor DPI settings.

That's how I assumed it works. But it makes no difference on my PC: viewtopic.php?p=522806#p522806



You guys should be posting the version of Windows you are using.
I find Windows 7 works one way with DPI aware and Windows 10 is completely different.
I also find there are different versions of Windows 10 that give different results as well.

Author:  kurzer [ Mon Jun 04, 2018 8:06 am ]
Post subject:  Re: PureBasic 5.70 LTS beta 1 is out !

I use windows 7 (SP2) with 64 bit.

Author:  Frontier [ Mon Jun 04, 2018 3:50 pm ]
Post subject:  Re: PureBasic 5.70 LTS beta 1 is out !

Thank you very much Fred and Purebasic team for this release.
Unfortunately, I get a segmentation fault error on my Arch Linux x64 install (the dependency check script reports that all required libraries are available since I am using PB 5.62 on the same machine) upon launching the 5.70b1 Purebasic executable.

Author:  Marc56us [ Mon Jun 04, 2018 4:57 pm ]
Post subject:  Re: PureBasic 5.70 LTS beta 1 is out !

Hi all,

I don't know if it's supposed to work like this, but under XP, set to 120dpi instead of 96dpi and after rebooting (necessary for XP, Vista, Seven ?), I got this

XP 96 to 120 ppp
Image

Vista 96 to 120 ppp
Image

Windows 10 @ 125%
Image

With this code:
Code:
; Enable DPI aware

Debug "DesktopResolution (Factor x, y): " + DesktopResolutionX() + " " + DesktopResolutionY()

OpenWindow(0, 0, 0, 300, 200, "", #PB_Window_SystemMenu)

LoadFont(0, "Verdana", 10)
ButtonGadget(0, 10, 10, 220, 20, "This text must be scaled Down")
SetGadgetFont(0, FontID(0))

LoadFont(1, "Verdana", DesktopUnscaleX(10))
ButtonGadget(1, 10, 50, 220, 20, "This text must be scaled Down")
SetGadgetFont(1, FontID(1))

While WaitWindowEvent() <> #PB_Event_CloseWindow : Wend

The difference is that I reduce the size of the font automatically:

:!: LoadFont(1, "Verdana", DesktopUnscaleX(10))

:arrow: So from what I understand, DPI aware is necessary to activate detection, but is not enough. It is also necessary to indicate which elements should be enlarged or reduced.
DesktopScaleX(), DesktopScaleY(), DesktopUnscaleX(), DesktopUnscaleY() are only used to apply a resizing factor to certain elements (including fonts) if you want to not zoom in everything.
(For example to keep a reference size for items like a rule for example)

:wink:

Author:  Kuron [ Mon Jun 04, 2018 11:09 pm ]
Post subject:  Re: PureBasic 5.70 LTS beta 1 is out !

kurzer wrote:
I use windows 7 (SP2) with 64 bit.


This may be part of the problem, because there is no such thing as a SP2 for Windows 7. MS only released SP1.

Author:  Dude [ Tue Jun 05, 2018 1:44 am ]
Post subject:  Re: PureBasic 5.70 LTS beta 1 is out !

Kuron wrote:
there is no such thing as a SP2 for Windows 7. MS only released SP1.

He probably means this, which is Microsoft's unofficial SP2:

https://answers.microsoft.com/en-us/win ... e1e883051e

I'm on Win 7 SP1 and PureBasic's DPI is no good for me. I'll just keep using my code to do it.

Author:  netmaestro [ Tue Jun 05, 2018 3:15 am ]
Post subject:  Re: PureBasic 5.70 LTS beta 1 is out !

Thanks for the new version! And kudos to you for putting family first :mrgreen: DPI awareness is very much right on the button for these days, excellent choice of direction.

Author:  Kuron [ Tue Jun 05, 2018 3:43 am ]
Post subject:  Re: PureBasic 5.70 LTS beta 1 is out !

netmaestro wrote:
And kudos to you for putting family first :mrgreen:


+1

Author:  mikejs [ Wed Jun 06, 2018 1:18 pm ]
Post subject:  Re: PureBasic 5.70 LTS beta 1 is out !

Looks like the issue with the SQLConnect win32 api call is still present. This was reported in a couple of other threads, and is currently keeping me on 5.60 (the last version where this worked) for production code. See this thread for more detail:

https://www.purebasic.fr/english/viewtopic.php?f=4&t=69924

But, in short, when compiled with 5.60, I get references in the binary to SQLConnectW, but with 5.61 and later (including 5.70 beta1) it's just SQLConnect, and the function call doesn't work properly. I've not tested whether the workaround in that thread works with the beta.

Author:  mikejs [ Wed Jun 06, 2018 1:25 pm ]
Post subject:  Re: PureBasic 5.70 LTS beta 1 is out !

In other news though, I'm playing with the DPI-aware stuff and it works great 8-)

Author:  Fred [ Wed Jun 06, 2018 9:29 pm ]
Post subject:  Re: PureBasic 5.70 LTS beta 1 is out !

A new version has been uploaded for Linux to fix the IDE issues, feel free to give it a try !

Author:  wombats [ Wed Jun 06, 2018 11:03 pm ]
Post subject:  Re: PureBasic 5.70 LTS beta 1 is out !

Fred wrote:
A new version has been uploaded for Linux to fix the IDE issues, feel free to give it a try !

The IDE starts now.

I'm not able to get Qt to work. I installed the libs and set "qt" as the subsystem, but running the example provided by fr34k, I get the following: "QtScript.a(QtScript.o):(.qtversion[qt_version_tag]+0x0): undefined reference to `qt_version_tag'
collect2: error: ld returned 1 exit status".

Author:  kurzer [ Wed Jun 06, 2018 11:31 pm ]
Post subject:  Re: PureBasic 5.70 LTS beta 1 is out !

Dude wrote:
Kuron wrote:
there is no such thing as a SP2 for Windows 7. MS only released SP1.

He probably means this, which is Microsoft's unofficial SP2:

Exact!

Page 6 of 17 All times are UTC + 1 hour
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/