Archive: nsDialogs GUI editor


nsDialogs GUI editor
Hello,
I am thinking about writing some simple nsDialogs GUI editor. Designing interface takes to long (creating controls and set its properties).
I thought, it will be much easier, if I write some simple tool, where I can drag and drop components on form and set its properties, like
position, dimensions, colours etc...

But, the first problem is dialog size... Lets say, I want to create standard 1018 custom page. This means, the page has 300u width and
140u height. The problem is that program can run on different screen resoultions with different DPI settings. However my tool will operate
on pixels, not dialog units.

My PC screen resolution is 1920x1200[px] with 96 DPI. So, the page width is 450px, height is 228px. Is there any simple way to code it,
that on every PC I got the same positions of components? I mean, if I put Label on form, lets say in position:
Left: 30px, Top: 40px (width: 100px, height: 10px) this may be displayed differently on other PC.

So, to resolve this problem, I understand I must write controls dimenstions in script with "u" sufix, like for example: 100u - this will be
then displayed the same in every PC. Problem is how to write my pixels position in "u" units (dialog units).

I got this (U = control dimension in dialog units):
U = Dialog_Unit_Max *(100*Control_Dimension_Px/Dialog_Px_Max) / 100
where:
Dialog_Unit_Max = 300 for 1018 custom page,
Control_Dimension_Px = for example left position of control - 30px (in pixels)
Dialog_Px_Max = 450 px for 1018 custom page

So, even if I design GUI in pixels, I can write it using "u" units.

Is this method OK? Or I forgot about something (like DPI conversion)... Have anyone of you though about it?
-Pawel


Originally posted by Pawel
Or I forgot about something (like DPI conversion)
and the font size too

Pawel, if I understand your question correctly, whatever intermediate coordinate system you choose, you should stick with it -- and only convert to the 'u' system when your tool saves the design work to a file.

BTW, which tool/language are you planning on using for developing your nsDialogs GUI editor?


Delphi.
And the goal is to create simple, but useful tool that will help setup controls on the custom page. Hmm, it seems to be logical. First, create controls, setup properties and then save it to generated NSIS pseudo-script with dialog units conversion. I hope my method I wrote earlier makes sense.
-Pawel


NSIS Dialog Designer
Hi Pawel,
I just released NSIS Dialog Designer, a simple IDE to graphically design nsDialog custom dialogs.

Take a look here: http://coolsoft.altervista.org/nsisdialogdesigner

Just waiting for user feedback...

PS: I started a new thread to discuss about it, but it hasn't been approved yet :confused: !


Hi,
Sounds interesting.
I will test it later. That is good that You created this, as my project is still in a concept :P
Had no time to work on it... The question is, should I continue :D
I am sure user will be happy for such useful tool.
-Pawel


The thread about NSIS Dialog Designer is here.

I'd like to hear feedback from advanced users like you to make it better.