IceDesign GUI designer

Applications, Games, Tools, User libs and useful stuff coded in PureBasic
Bitblazer
Enthusiast
Enthusiast
Posts: 733
Joined: Mon Apr 10, 2017 6:17 pm
Location: Germany
Contact:

Re: IceDesign (New) modern GUI designer

Post by Bitblazer »

ChrisR wrote: Sun Sep 05, 2021 2:20 am
Caronte3D wrote: Sat Sep 04, 2021 9:11 pm An huge improvement would be a grid like system to get a functionallity similar to Dialogs where all the gadgets scale, spread fiting it when the window is scaled. I know It's more code than design , but... would be very nice :wink:
Nice, certainly, I note the idea but I guess it will be quite far down in the queue.
It's probably best to use DialogDesigner for this :wink:
If you add a resizing flag to each gadget, i will start implementing the resize functions as opensource gpl project. Just add a flag for each gadget how it should behave in case of resizing the window. Either "static, resize or move". In combination with the anchoring flags, that should handle all cases.

Each time the window is resized, the resize calculation will be triggered to reposition / resize all gadgets. The routines will be written in purebasic, so it should be fully crossplatform. I was already considering a GUI designer as next project just to achieve that.
webpage - discord chat links -> purebasic GPT4All
User avatar
ChrisR
Addict
Addict
Posts: 1127
Joined: Sun Jan 08, 2017 10:27 pm
Location: France

Re: IceDesign (New) modern GUI designer

Post by ChrisR »

Hi Bitblazer
Interesting
It should not be a problem to add a resizing flag to each gadget.
I would probably add it, hidden, along with the anchor flags.
Have fun with the implementation of the resizing functions :)
User avatar
ChrisR
Addict
Addict
Posts: 1127
Joined: Sun Jan 08, 2017 10:27 pm
Location: France

Re: IceDesign (New) modern GUI designer

Post by ChrisR »

the.weavster wrote: Sat Sep 04, 2021 8:01 am
Rinzwind wrote: Thu Sep 02, 2021 5:55 am I do not see a way to anchor a button to sides of the form or other control?
I also think anchoring is the big missing feature. Top, Left, Bottom & Right checkboxes to denote which edges are fixed and in which directions each gadget should stretch on a resize event.

Apart from that I really like it :D
It's coming soon, only a gif demo for now.

Image
User avatar
the.weavster
Addict
Addict
Posts: 1537
Joined: Thu Jul 03, 2003 6:53 pm
Location: England

Re: IceDesign (New) modern GUI designer

Post by the.weavster »

ChrisR wrote: Mon Sep 06, 2021 9:28 pmIt's coming soon,
Very cool 8)
User avatar
Caronte3D
Addict
Addict
Posts: 1027
Joined: Fri Jan 22, 2016 5:33 pm
Location: Some Universe

Re: IceDesign (New) modern GUI designer

Post by Caronte3D »

Nice! :D
Amitris_de
User
User
Posts: 31
Joined: Wed Jan 06, 2021 2:53 pm

Re: IceDesign (New) modern GUI designer

Post by Amitris_de »

Congratulations Chris, for completing this project. :wink:
Rinzwind
Enthusiast
Enthusiast
Posts: 636
Joined: Wed Mar 11, 2009 4:06 pm
Location: NL

Re: IceDesign (New) modern GUI designer

Post by Rinzwind »

Example of designer itself not being dpi-aware (125% Windows 10) https://ibb.co/pJwJGxr
It is scaled by Windows itself instead.

The manifest does not include dpiaware flag.

Editing it to be like this (resource hacker):

Code: Select all

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
  <assemblyIdentity
    version="1.0.0.0"
    processorArchitecture="amd64"
    name="CompanyName.ProductName.YourApp"
    type="win32" />
  <description></description>
  <dependency>
    <dependentAssembly>
      <assemblyIdentity
        type="win32"
        name="Microsoft.Windows.Common-Controls"
        version="6.0.0.0"
        processorArchitecture="amd64"
        publicKeyToken="6595b64144ccf1df"
        language="*" />
    </dependentAssembly>
  </dependency>
  <asmv3:application  xmlns:asmv3="urn:schemas-microsoft-com:asm.v3">     <asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">       <dpiAware>true</dpiAware>     </asmv3:windowsSettings>   </asmv3:application>

</assembly>
and it 'becomes' DPI aware. Not tested if everything works OK. Icons at the top don't scale for one. The preview button still shows a non-dpi demo of the designed form. A good way to test your app is set the Windows scale to 200% so it becomes obvious if something scales right or not. PB itself also still doesn't scale it toolbar buttons.
firace
Addict
Addict
Posts: 899
Joined: Wed Nov 09, 2011 8:58 am

Re: IceDesign (New) modern GUI designer

Post by firace »

Just bought a copy - keep up the good job!
A question, just to be sure - Is this a one-time payment, or will new versions require additional purchases?

A little bug report:
The code generated for ListIconGadget seems to have an incorrect value for the flags parameter - see the 130 in the below example:

ListIconGadget(#PB_Any, 160, 160, 140, 60, "ListIcon_1", 120, 130)

This prevents gadget items to be displayed properly.
User avatar
ChrisR
Addict
Addict
Posts: 1127
Joined: Sun Jan 08, 2017 10:27 pm
Location: France

Re: IceDesign (New) modern GUI designer

Post by ChrisR »

firace wrote: Wed Sep 08, 2021 10:11 am Just bought a copy - keep up the good job!
A question, just to be sure - Is this a one-time payment, or will new versions require additional purchases?
Thank you for your purchase firace, I hope it will suit your needs :)
As PB, it's a lifeTime licence. Nothing to add for future updates.

In return for the small price, you are welcome if you talk about it...
And those who wish to donate more, can do so via my Paypal account.
I have been asked twice now with a donation at the end, thank you to both of them, it is appreciated :)
The link is written on the 1st post
firace wrote: Wed Sep 08, 2021 10:11 am A little bug report:
The code generated for ListIconGadget seems to have an incorrect value for the flags parameter
Yes, I had seen, it is fixed. Thanks for reporting.


@Rinzwind (DPI)
I don't really have the time right now to talk about it but a little later if you want.

Amitris_de wrote: Wed Sep 08, 2021 8:06 am Congratulations Chris, for completing this project. :wink:
Thanks Amitris, proud enough also to have been at the end, with a good start :)
I wish you all the best for your latest "PureBasic Template Manager"
User avatar
ChrisR
Addict
Addict
Posts: 1127
Joined: Sun Jan 08, 2017 10:27 pm
Location: France

Re: IceDesign (New) modern GUI designer

Post by ChrisR »

Rinzwind wrote: Wed Sep 08, 2021 8:17 am Example of designer itself not being dpi-aware (125% Windows 10) https://ibb.co/pJwJGxr
It is scaled by Windows itself instead.

The manifest does not include dpiaware flag.
I redid some tests with 150% scaling on my windows 10, and my screen of 1980*1080

It does not work at all with Enable DPI in the compiler options

If I add the line ...<dpiAware>true</dpiAware>... in the Manifest with ResourceHacker, the toolbar images, font, the grid and added gadgets are not enlarged. It would be up to me to use enlarged images but it would be really more complicated to calculate the size and position of each Gadget created, between design and properties, based on the DPIrate.

It is better as it is now, I believe, without using DpiAware. As you say, it is scaled by Windows itself instead. The texts in the toolbar are just a little less clear but it's not too bad, at least here. The image below is shrunk, it's better in real.
I just use GadgetHeight(TempGadget, #PB_Gadget_RequiredSize) for the object in properties and in settings. And also *Dpirate for the toolbar.


Image

The result may be different with a 4K screen but I don't have one to see !
Otherwise, I also did a quick test on Windows 7 with a scale of 150%. It seems to work quite well too :)
highend
Enthusiast
Enthusiast
Posts: 123
Joined: Tue Jun 17, 2014 4:49 pm

Re: IceDesign (New) modern GUI designer

Post by highend »

I got a mail that it was updated to v1.2.0 but after downloading it again (via gumroad) it's v1.0.4?
User avatar
ChrisR
Addict
Addict
Posts: 1127
Joined: Sun Jan 08, 2017 10:27 pm
Location: France

Re: IceDesign (New) modern GUI designer

Post by ChrisR »

IceDesign has been updated in version 1.2.0

New features:
A few changes in the code generated in the Event Loop, indentation according to the containers in the interface.

Add Anchors with Lock Top, Left, Bottom & Right checkboxes. To denote which edges are fixed and in which directions each gadget should stretch on a resize event. A demo is posted in the 2nd post here

Add an option "Use Short Name for Controls" in Settings.
It allows to use the Short Name for the Controls Instead of the Full Name (ex: #Btn, #Opt,...).
Here is a list of short names:
Window,Btn,BtnImg,Calend,Canv,CanvCont,Check,Combo,Cont,Date,Edit,ExpCombo,ExpList,ExpTree,Frame,Hyper,
Img,IPAdd,ListIcon,ListView,OpenGL,Opt,Panel,Progres,Scint,ScrlArea,ScrlBar,Spin,String,Txt,Track,Tree,Web
Add an option "Rename Ctrl with Caption Name" in Settings.
It allows to auto rename the Controls Name when the Caption is Changed.
The option is only available for Buttons, CheckBoxes and Options (ex: #Btn_CaptionName)

Add support for some Windows Controls Styles.
In IceDesign, these flags are added below the PB constants.
To identify them, their names begin with # (ex: #BS_Bottom) to apply it when creating the Gadget
or with _# (ex: _#BS_Bottom used for OptionGadget) to apply it after with SetWindowLongPtr.
The styles are visible in the Designer (WYSIWYG) and written in the generated code.

It is possible to use "+#CRLF$+" (as is without space) in captions to manage multiline. in combination with multiline gadget style.
Ex: Caption = Button+#CRLF$+In 2 Lines ==> "Button" +#CRLF$+ "In 2 Lines"
Option available for Button, CheckBox, Option, Text and StringGadget (Same as editor but without going through AddGadgetItem).

Add an option "Enable DPI Aware for Preview" in Settings. It is also written at the bottom of the code created under IDE Options.

And other small things...


Quite a lot of improvement.
Thanks to blueb for the short name and auto-raname controls idea and his proposal list of short names.
And Thanks to jacdelad for his suggestion to use Windows Controls Styles in addition, with a list of starting styles. To be completed as needed.
:)


Image
Last edited by ChrisR on Thu Sep 09, 2021 4:22 pm, edited 2 times in total.
User avatar
ChrisR
Addict
Addict
Posts: 1127
Joined: Sun Jan 08, 2017 10:27 pm
Location: France

Re: IceDesign (New) modern GUI designer

Post by ChrisR »

highend wrote: Thu Sep 09, 2021 3:12 pm I got a mail that it was updated to v1.2.0 but after downloading it again (via gumroad) it's v1.0.4?
Sorry, I uploaded the file but forgot to press the "Save Change" button :oops: It's done now
Thank you for letting me know so quickly. Tell me if it's OK now
:)
highend
Enthusiast
Enthusiast
Posts: 123
Joined: Tue Jun 17, 2014 4:49 pm

Re: IceDesign (New) modern GUI designer

Post by highend »

Yeah, it's fixed now
User avatar
blueb
Addict
Addict
Posts: 1041
Joined: Sat Apr 26, 2003 2:15 pm
Location: Cuernavaca, Mexico

Re: IceDesign (New) modern GUI designer

Post by blueb »

Thanks Chris...
The Enumeration/Caption method works flawlessly.
Thanks for this.

Eliminates the need to troll through the code. I like it. :mrgreen:
- It was too lonely at the top.

System : PB 6.10 Beta 9 (x64) and Win Pro 11 (x64)
Hardware: AMD Ryzen 9 5900X w/64 gigs Ram, AMD RX 6950 XT Graphics w/16gigs Mem
Post Reply