Bug on the IDE?
Bug on the IDE?
Hi
When designing a form, you define the height and width of a gadget, but that gets changed when the code is generated. For example, on the designer you define a string gadget with width of 150 and height of 30, and in the code generated it appears 100, 25.
Is this a bug?
Than You
// Moved from "Bugs - Windows" to "Coding Questions" (Kiffi)
When designing a form, you define the height and width of a gadget, but that gets changed when the code is generated. For example, on the designer you define a string gadget with width of 150 and height of 30, and in the code generated it appears 100, 25.
Is this a bug?
Than You
// Moved from "Bugs - Windows" to "Coding Questions" (Kiffi)
Re: Bug on the IDE?
Geez...
...without code there are several causes that may be responsible. So before claiming for a bug here, please provide a code, that shows the problem to YOU. After confirming the bug, a mod will move the thread to the bug section.
...without code there are several causes that may be responsible. So before claiming for a bug here, please provide a code, that shows the problem to YOU. After confirming the bug, a mod will move the thread to the bug section.
Good morning, that's a nice tnetennba!
PureBasic 6.21/Windows 11 x64/Ryzen 7900X/32GB RAM/3TB SSD
Synology DS1821+/DX517, 130.9TB+50.8TB+2TB SSD
PureBasic 6.21/Windows 11 x64/Ryzen 7900X/32GB RAM/3TB SSD
Synology DS1821+/DX517, 130.9TB+50.8TB+2TB SSD
Re: Bug on the IDE?
+1jacdelad wrote: Tue Sep 17, 2024 8:27 pmAfter confirming the bug, a mod will move the thread to the bug section.

Hygge
Re: Bug on the IDE?
I have no idea what code do you want me to send. Can't generate a code for the specifications of the gadget on de desiner. Unfortunatly can't send a picture
Re: Bug on the IDE?
Confirmed, seems to be related to DPI scaling.
Looks good if you close the IDE, change the scaling to 100% and then restart the IDE. You can then restore your default scaling.
Looks good if you close the IDE, change the scaling to 100% and then restart the IDE. You can then restore your default scaling.
Re: Bug on the IDE?
What code? The code that shows the problem.ClueLess wrote: Tue Sep 17, 2024 9:01 pm I have no idea what code do you want me to send. Can't generate a code for the specifications of the gadget on de desiner. Unfortunatly can't send a picture
How do you expect us to test it without your code? All I can say is that I don't have the problem and like ChrisR said, it's probably due to dpi settings.
Good morning, that's a nice tnetennba!
PureBasic 6.21/Windows 11 x64/Ryzen 7900X/32GB RAM/3TB SSD
Synology DS1821+/DX517, 130.9TB+50.8TB+2TB SSD
PureBasic 6.21/Windows 11 x64/Ryzen 7900X/32GB RAM/3TB SSD
Synology DS1821+/DX517, 130.9TB+50.8TB+2TB SSD
- Mindphazer
- Enthusiast
- Posts: 456
- Joined: Mon Sep 10, 2012 10:41 am
- Location: Savoie
Re: Bug on the IDE?
There is no code because, as he said, he uses Form Designer. The code generated by FD doesn't have the same size values of the gadgets than the sizes he set on FD. So the code won't help.jacdelad wrote: Wed Sep 18, 2024 1:04 amWhat code? The code that shows the problem.ClueLess wrote: Tue Sep 17, 2024 9:01 pm I have no idea what code do you want me to send. Can't generate a code for the specifications of the gadget on de desiner. Unfortunatly can't send a picture
How do you expect us to test it without your code? All I can say is that I don't have the problem and like ChrisR said, it's probably due to dpi settings.
MacBook Pro 16" M4 Pro - 24 Gb - MacOS 15.4.1 - Iphone 15 Pro Max - iPad at home
...and unfortunately... Windows at work...
...and unfortunately... Windows at work...
Re: Bug on the IDE?
Oh now I understand. So you want ot create a gadget with height 30 in the form designer, but the resulting code has height 25?
Good morning, that's a nice tnetennba!
PureBasic 6.21/Windows 11 x64/Ryzen 7900X/32GB RAM/3TB SSD
Synology DS1821+/DX517, 130.9TB+50.8TB+2TB SSD
PureBasic 6.21/Windows 11 x64/Ryzen 7900X/32GB RAM/3TB SSD
Synology DS1821+/DX517, 130.9TB+50.8TB+2TB SSD
- Mindphazer
- Enthusiast
- Posts: 456
- Joined: Mon Sep 10, 2012 10:41 am
- Location: Savoie
Re: Bug on the IDE?
Yeah it seems so
MacBook Pro 16" M4 Pro - 24 Gb - MacOS 15.4.1 - Iphone 15 Pro Max - iPad at home
...and unfortunately... Windows at work...
...and unfortunately... Windows at work...
Re: Bug on the IDE?
ClueLess wrote: Tue Sep 17, 2024 8:24 pm...on the designer you define a string gadget with width of 150 and height of 30, and in the code generated it appears 100, 25.
The Form Designer conforms to DPI awareness. So, this happens when your display is scaled.

As @ChrisR had mentioned earlier in this thread, simply reset the scaling to 100% and the gadget metrics will revert accordingly.
ChrisR wrote: Tue Sep 17, 2024 9:39 pm...close the IDE, change the scaling to 100% and then restart the IDE. You can then restore your default scaling.
Texas Instruments TI-99/4A Home Computer: the first home computer with a 16bit processor, crammed into an 8bit architecture. Great hardware - Poor design - Wonderful BASIC engine. And it could talk too! Please visit my YouTube Channel 

Re: Bug on the IDE?
Yes, but it shouldn't be like this.
IMO, If the user enters a width of 150 for a Gadget, the width in the generated code should also be 150, whatever its scale factor.
I had a quick look to the FormDesigner source code, removing all DesktopUnscaledX(Y) from codeviewer.pb and all DesktopScaledX(Y) from opensave.pb, it seems to do the trick.
I can test it a bit more and possibly create a Pull Request on github, if it is confirmed as a bug, too.
Temporarily, If anyone would like to test it, PureBasic.exe (Windows x64)
IMO, If the user enters a width of 150 for a Gadget, the width in the generated code should also be 150, whatever its scale factor.
I had a quick look to the FormDesigner source code, removing all DesktopUnscaledX(Y) from codeviewer.pb and all DesktopScaledX(Y) from opensave.pb, it seems to do the trick.
I can test it a bit more and possibly create a Pull Request on github, if it is confirmed as a bug, too.
Temporarily, If anyone would like to test it, PureBasic.exe (Windows x64)
Re: Bug on the IDE?
I believe that this is done to preserve the visual representation of the form at design time. It is a visual designer after all.ChrisR wrote: Wed Sep 18, 2024 3:50 pmIMO, If the user enters a width of 150 for a Gadget, the width in the generated code should also be 150, whatever its scale factor.

Texas Instruments TI-99/4A Home Computer: the first home computer with a 16bit processor, crammed into an 8bit architecture. Great hardware - Poor design - Wonderful BASIC engine. And it could talk too! Please visit my YouTube Channel 

Re: Bug on the IDE?
Yes, that's an understandable point of view 
As for me, it's a bug, we should have the same values (x, y, width, height) between the grid and the generated code.
As if we were drawing to a scale of 100%. The scaling is then done according to the DPIaware compiler option, to be compatible with all possible scaling factors. That's what I do in my visual designer
Furthermore, the ScrollArea InnerWidth(Height) is not currently scaled/unscaled as for ScrollBar, ProgressBar Minimum(Maximum). It's not consistent with the other values.
My point of view, but I'm not the one who decides whether it's a bug or not.

As for me, it's a bug, we should have the same values (x, y, width, height) between the grid and the generated code.
As if we were drawing to a scale of 100%. The scaling is then done according to the DPIaware compiler option, to be compatible with all possible scaling factors. That's what I do in my visual designer

Furthermore, the ScrollArea InnerWidth(Height) is not currently scaled/unscaled as for ScrollBar, ProgressBar Minimum(Maximum). It's not consistent with the other values.
My point of view, but I'm not the one who decides whether it's a bug or not.
Re: Bug on the IDE?
At least there is one moron who sees it the same wayChrisR wrote: Wed Sep 18, 2024 5:44 pm My point of view, but I'm not the one who decides whether it's a bug or not.

{Home}.:|:.{Dialog Design0R}.:|:.{Codes}.:|:.{History Viewer Online}.:|:.{Send a Beer}
Re: Bug on the IDE?
It seems that someone understood what I mean