It is currently Thu Dec 12, 2019 5:39 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 253 posts ]  Go to page Previous  1 ... 3, 4, 5, 6, 7, 8, 9 ... 17  Next
Author Message
 Post subject: Re: PureBasic 5.70 LTS beta 1 is out !
PostPosted: Sun Jun 03, 2018 10:05 pm 
Offline
Addict
Addict

Joined: Mon Feb 16, 2015 2:49 pm
Posts: 1904
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


Top
 Profile  
Reply with quote  
 Post subject: Re: PureBasic 5.70 LTS beta 1 is out !
PostPosted: Sun Jun 03, 2018 11:54 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Sun Jun 11, 2006 12:07 am
Posts: 502
Location: Germany / one of the fishheads
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.

_________________
PB 5.71 x64, OS: Windows 7 Pro x64, Desktopscaling: 125%, CPU: I7 6500, RAM: 16 GB, GPU: Intel Graphics HD 520, User age: 51y
"Happiness is a pet." | "Never run a changing system!"


Top
 Profile  
Reply with quote  
 Post subject: Re: PureBasic 5.70 LTS beta 1 is out !
PostPosted: Mon Jun 04, 2018 3:29 am 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Fri Apr 25, 2003 4:34 pm
Posts: 922
Location: Canada
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.

_________________
Image Image


Top
 Profile  
Reply with quote  
 Post subject: Re: PureBasic 5.70 LTS beta 1 is out !
PostPosted: Mon Jun 04, 2018 8:06 am 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Sun Jun 11, 2006 12:07 am
Posts: 502
Location: Germany / one of the fishheads
I use windows 7 (SP2) with 64 bit.

_________________
PB 5.71 x64, OS: Windows 7 Pro x64, Desktopscaling: 125%, CPU: I7 6500, RAM: 16 GB, GPU: Intel Graphics HD 520, User age: 51y
"Happiness is a pet." | "Never run a changing system!"


Top
 Profile  
Reply with quote  
 Post subject: Re: PureBasic 5.70 LTS beta 1 is out !
PostPosted: Mon Jun 04, 2018 3:50 pm 
Offline
User
User
User avatar

Joined: Thu Dec 22, 2005 2:43 pm
Posts: 74
Location: Chios, Greece
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.


Top
 Profile  
Reply with quote  
 Post subject: Re: PureBasic 5.70 LTS beta 1 is out !
PostPosted: Mon Jun 04, 2018 4:57 pm 
Offline
Enthusiast
Enthusiast

Joined: Sat Feb 08, 2014 3:26 pm
Posts: 718
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:

_________________
(English is not my native language, I use an online translator)
Windows 10 Family x64 + Linux (Slackware, Debian on Oracle VirtualBox 6.0) + Raspberry Pi


Top
 Profile  
Reply with quote  
 Post subject: Re: PureBasic 5.70 LTS beta 1 is out !
PostPosted: Mon Jun 04, 2018 11:09 pm 
Offline
Addict
Addict
User avatar

Joined: Sat Oct 17, 2009 10:51 pm
Posts: 1341
Location: Nashville
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.

_________________
Fangbeast for President!


Top
 Profile  
Reply with quote  
 Post subject: Re: PureBasic 5.70 LTS beta 1 is out !
PostPosted: Tue Jun 05, 2018 1:44 am 
Offline
Addict
Addict

Joined: Mon Feb 16, 2015 2:49 pm
Posts: 1904
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.


Top
 Profile  
Reply with quote  
 Post subject: Re: PureBasic 5.70 LTS beta 1 is out !
PostPosted: Tue Jun 05, 2018 3:15 am 
Offline
PureBasic Bullfrog
PureBasic Bullfrog
User avatar

Joined: Wed Jul 06, 2005 5:42 am
Posts: 8006
Location: Fort Nelson, BC, Canada
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.

_________________
Veni, vidi, vici.


Top
 Profile  
Reply with quote  
 Post subject: Re: PureBasic 5.70 LTS beta 1 is out !
PostPosted: Tue Jun 05, 2018 3:43 am 
Offline
Addict
Addict
User avatar

Joined: Sat Oct 17, 2009 10:51 pm
Posts: 1341
Location: Nashville
netmaestro wrote:
And kudos to you for putting family first :mrgreen:


+1


Top
 Profile  
Reply with quote  
 Post subject: Re: PureBasic 5.70 LTS beta 1 is out !
PostPosted: Wed Jun 06, 2018 1:18 pm 
Offline
Enthusiast
Enthusiast

Joined: Thu Oct 21, 2010 9:46 pm
Posts: 137
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.


Top
 Profile  
Reply with quote  
 Post subject: Re: PureBasic 5.70 LTS beta 1 is out !
PostPosted: Wed Jun 06, 2018 1:25 pm 
Offline
Enthusiast
Enthusiast

Joined: Thu Oct 21, 2010 9:46 pm
Posts: 137
In other news though, I'm playing with the DPI-aware stuff and it works great 8-)


Top
 Profile  
Reply with quote  
 Post subject: Re: PureBasic 5.70 LTS beta 1 is out !
PostPosted: Wed Jun 06, 2018 9:29 pm 
Offline
Administrator
Administrator

Joined: Fri May 17, 2002 4:39 pm
Posts: 13657
Location: France
A new version has been uploaded for Linux to fix the IDE issues, feel free to give it a try !


Top
 Profile  
Reply with quote  
 Post subject: Re: PureBasic 5.70 LTS beta 1 is out !
PostPosted: Wed Jun 06, 2018 11:03 pm 
Offline
Enthusiast
Enthusiast

Joined: Thu Dec 29, 2011 5:03 pm
Posts: 508
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".


Top
 Profile  
Reply with quote  
 Post subject: Re: PureBasic 5.70 LTS beta 1 is out !
PostPosted: Wed Jun 06, 2018 11:31 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Sun Jun 11, 2006 12:07 am
Posts: 502
Location: Germany / one of the fishheads
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!

_________________
PB 5.71 x64, OS: Windows 7 Pro x64, Desktopscaling: 125%, CPU: I7 6500, RAM: 16 GB, GPU: Intel Graphics HD 520, User age: 51y
"Happiness is a pet." | "Never run a changing system!"


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 253 posts ]  Go to page Previous  1 ... 3, 4, 5, 6, 7, 8, 9 ... 17  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye