Page 1 of 1
					
				screenresolution
				Posted: Tue Jun 18, 2024 9:20 am
				by ludoke
				I have a screen with many gadgets and a drawing on canvas gadget created for a resolution of 1360x768, how can I rescale this to a resolution of 1920x1080.
Do I have to calculate the size, position and text for each gadget, or is there an easier way?
			 
			
					
				Re: screenresolution
				Posted: Tue Jun 18, 2024 11:52 am
				by jacdelad
				If you use the dialog library, the gadgets can resize themselves automatically based on the size of the window.
			 
			
					
				Re: screenresolution
				Posted: Tue Jun 18, 2024 11:56 am
				by spikey
				ludoke wrote: Tue Jun 18, 2024 9:20 am
Do I have to calculate the size, position and text for each gadget
 
Yes.
ludoke wrote: Tue Jun 18, 2024 9:20 am
or is there an easier way?
 
There are 
other ways to do it but they don't necessarily merit the adjective 
easier unfortunately.  There are a couple of examples of resize handlers elsewhere on the forum, see 
https://www.purebasic.fr/english/viewtopic.php?t=82349 or 
https://www.purebasic.fr/english/viewto ... 0&p=544901, for example.
The dialog library creates user interfaces with automatic layout characteristics, see 
https://www.purebasic.com/documentation ... index.html. However, converting a large interface over from the window library to the dialog library instead is not a trivial task.
 
			 
			
					
				Re: screenresolution
				Posted: Tue Jun 18, 2024 12:16 pm
				by mk-soft
				Module from me with font and image scaling ...
Link: 
Module ScaleGadgets 
			 
			
					
				Re: screenresolution
				Posted: Tue Jun 18, 2024 7:26 pm
				by ludoke
				thanks,
it seems more complicated than I thought.
Maybe better to make 2 layout for 2 screen resolutions