It is currently Mon Dec 16, 2019 5:46 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: [Done] Bug in WindowBounds with #PB_Ignore and DPI awareness
PostPosted: Thu Mar 07, 2019 11:18 am 
Offline
Enthusiast
Enthusiast

Joined: Thu Oct 21, 2010 9:46 pm
Posts: 137
As posted in coding questions...

I have an application which has the option to show extra info at the bottom of the window, and a button to toggle this. Showing extra info means the window needs to get taller, and the minimum window height needs to change.

With DPI awareness, on a device using >100% scaling, this stopped working and instead caused the window to shrink to a very narrow width (as well as changing height correctly). After some debugging, I tracked this down to the WindowBounds() call.

This causes the problem:

Code:
WindowBounds(#w_main, #PB_Ignore, minheight, #PB_Ignore, #PB_Ignore)


But it can be worked around by providing all the min and max values as real values, and avoiding the use of #PB_Ignore:

Code:
WindowBounds(#w_main, minwidth, minheight, maxwidth, maxheight)


(Where only minheight has actually changed from when this was called initially when the window was created.)

Even with DPI awareness turned on, the problem only happens on devices that are using >100% scaling. So it looks like #PB_Ignore is not being handled correctly in that case (Guess: maybe the scaling factor is being applied before the check for whether a particular constant has been passed?)


Top
 Profile  
Reply with quote  
 Post subject: Re: Bug in WindowBounds with #PB_Ignore and DPI awareness?
PostPosted: Wed Apr 10, 2019 8:01 pm 
Offline
Administrator
Administrator

Joined: Fri May 17, 2002 4:39 pm
Posts: 13663
Location: France
Fixed.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

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:  

 


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