Jump to content
Joel Bodenmann

uGFX-Studio v0.20 - Beta

Recommended Posts

Thank you for your feedback :)

I've added everything that wasn't already on the list to our todo list. Stuff like the post-generation scripts and the start-up color won't be done quickly, but we're getting there. I assume that we'll have an update by next week.

 

Quote

Can I add/change gfxconf.h defines? For example, I want to add GDISP_NEED_UTF8 and GDISP_NEED_PIXELREAD and some other defines.

Those will eventually be added to the Target editor.

Share this post


Link to post
Share on other sites

Release v0.23.3 is now available for download. Changelog:

  • Cleaning the project / regenerating the project no longer removes the output directory itself but only its content
  • Fixing issue with auto-sizing images on multi-state images for widgets that take multiple images for multiple states
  • Fixing issue with image resource editor dialog
  • Adding more userfriendly messages to the image resource editor dialog
  • Fixing issue with invalid container code generation

Share this post


Link to post
Share on other sites
1 hour ago, Joel Bodenmann said:

I can't reproduce either of the two things you're mentioning.

Please provide proper instructions on how to reproduce. That's something you should always do. 

Hi.

In first case, i create new project and go to the edit default target settings. After set all parameters, i close this dialog settings.

After returning to edit default target settings in GINPUT page radio button set to "calibration dialog startup"(in previous edit i set this radio to "custom calibration value").

In second case, i create new image. After returning to edit this image, i receive dialog box with error.

I really do not like what's happening. Very similar to the problems on my computer, but the rest of the applications work fine. I use Window 7x64.

Maybe there is a problem with this?

Best regards.

Share this post


Link to post
Share on other sites

I guess you simply didn't click the Close button in the target editor dialog. I'll consider renaming that button to something like Apply or Save.

I'm completely unable to reproduce the issue with the image.

Share this post


Link to post
Share on other sites
12 minutes ago, Joel Bodenmann said:

I guess you simply didn't click the Close button in the target editor dialog. I'll consider renaming that button to something like Apply or Save.

I'm completely unable to reproduce the issue with the image.

Hi.

I click on Close button,  but the changes that were made are not saved. 

I'll try to run the same tests on another computer.

Best regards.

Share this post


Link to post
Share on other sites

Hi. I'm testing first case on my home PC. Result is  same as the video from  previous letter.

I d't have this explanation. Best regards.

Edited by AlexK17

Share this post


Link to post
Share on other sites

1. Containers are generated now in code, but coordinates X and Y are still wrong for widgets inside containers.

I.e. I have a generated code:
 

    // ahContainer_mem_0
    wi.g.show = TRUE;
    wi.g.x = 91;
    wi.g.y = 334;
    wi.g.width = 709;
    wi.g.height = 30;
    wi.g.parent = ghPageContainerPage_main;
    wi.text = "Container";
    wi.customDraw = 0;
    wi.customParam = 0;
    wi.customStyle = &black_style;
    ahContainer_mem_0 = gwinContainerCreate(0, &wi, GWIN_CONTAINER_BORDER);

    // ahLabel_mem_0_0
    wi.g.show = TRUE;
    wi.g.x = 115;
    wi.g.y = 335;
    wi.g.width = 210;
    wi.g.height = 28;
    wi.g.parent = ahContainer_mem_0;
    wi.text = "200.001 поле";
    wi.customDraw = gwinLabelDrawJustifiedLeft;
    wi.customParam = 0;
    wi.customStyle = &black_style;
    ahLabel_mem_0_0 = gwinLabelCreate(0, &wi);

It tries to place label at Y=335 inside container with height = 30. It should place it at 335 (absolute Y) - 334 (container's Y), i.e. Y for label should be 1 (or maybe something near 1, because of borders width).

2. Animated GIF changes how it looks in designer, frame by frame, each click new frame. Looks right in hardware (after adding GWIN_NEED_IMAGE_ANIMATION to my post-generation script).

3. Rendering function inside Studio is very cool feature! But I cannot use some constants, like GWIN_FLG_SYSENABLED (needed for gdispGDrawBox). Is this bug or feature? :)

4. I have my own rendering function that uses pointer to my custom parameters (initialized in my own main.c). Can I use such params in Studio? Or, maybe, I can define my own variables somewhere in Studio to use them as params?

5. Page containers created with GWIN_CONTAINER_BORDER. How to do tell Studio to do it without borders?

Edited by king2

Share this post


Link to post
Share on other sites

I have tried to investigate container's behavior deeper than before. I created container with border, and label without border and with fill color. I have container with height=30px and placed at [91,334], and label inside it (with height=26px). This is maximum height when label cannot be moved vertically inside container.

I found that:

1. I cannot place label close to container's border. Studio allow me minimal coordinates [93,336], i.e. 2 pixels more than container's coordinates. OK, 1 pixel goes to container's border, but why it does not allow me to place it closer, for example, to [92,335]? Label's (invisible) border? I have tried to make custom style with edge color assigned, but with no luck - I cannot see this label's edge in Studio. I cannot see label's edge in hardware, maybe edge are not displayed for labels at all (but inside gwin_label.c I see that it can draw border, it just cannot be set in Studio).

I have tried to repeat this with PushButton (that have visible edges), with same result - 1px empty space between container's border and button's border.

As I understand, height for container contains two pixels for its border (for example, my container have 30px height set in Studio, so it has 2 pixels for top and bottom border, and 28px area inside to be used for widgets). But why it reserves 1px empty space at top and another 1px at bottom of container?

2. OK, but now I have label 1px away from container's border, and in generated code I can see X=91 for container and X=93 for label inside it (which is wrong, because it should have X relative to container's, not to window itself, so I have corrected this in my post-generation script). So I have tried as corrected X coordinate:

  • label X - container X (resulting wi.g.x=2) - label's background start in 3 pixels away from container's visible border
  • label X - container X - 1 (resulting wi.g.x=1) - 2 pixels away
  • label X - container X - 2 (resulting wi.g.x=0) - 1 pixel away (i.e. container border pixel, than black pixel, than label's background starting)

Hmm. Why uGFX makes 1px empty space between label's background and container's border where I have set wi.g.x=0?

Maybe this information will help making Studio better.

3. Another one (unrelated) question: is there any way to bring some widget to top is case it overlaps with another widget? As I understand, possibility to change widgets order in Studio (and as a result, in gui.c initialization order) will be enough.

4. BTW, Studio changes order of widgets every time project is loaded. Load the project, than try to close Studuo, it will want to save just loaded unchanged project. After save, order of widgets inside windows will changed inside out. At next save order will be changed again, and so on. I think it is not right behavior.

5. Something strange happened with fonts. I got the problem working with my RICH_TEXT patch, with both 2.7 and 2.8. It looks like text shifted to right by 10-30px relative to label's left edge, so underlines and strikeouts not matched to characters drawn by mcufont. In Studio designer font label's text started just after label left edge, but in hardware text appear at wrong place. I tried to debug and found that mcufont apply skip_pixels, so, for example, letter 'a' with x=0 really drawn at x=30px, and next character, and so on, so on. It looks like padding-left applied to label. I have tried to replace font generated by Studio with font that I have used in 0.15, and got text at right place. Both definitions was generated from same .ttf file.

This is part of old (working) font definition:

    19, /* width */
    20, /* height */
    3, /* min x advance */
    18, /* max x advance */
    1, /* baseline x */
    16, /* baseline y */
    21, /* line height */
    0, /* flags */

and this is new (shifted to right) font definition:

    34, /* width */
    24, /* height */
    0, /* min x advance */
    21, /* max x advance */
    13, /* baseline x */
    19, /* baseline y */
    21, /* line height */
    2, /* flags */

I have tried to set baseline-x to 1, with no luck, and I have no idea what to do with this.

Edited by king2

Share this post


Link to post
Share on other sites

6. Tried to update Target properties (set endianess) - with no luck. I change value, close dialog, then open it again - and see Unknown instead of Little.

7. GDISP_NEED_ARC not added automatically to generated gfxconf.h if rounded buttons was used.

Edited by king2

Share this post


Link to post
Share on other sites

After using the Studio to design a small GUI I found it to be stable and usable. Very good work, thank you.

I did notice some minor bugs:
- the image dialog is still a bit fiddly after the last update, as others already reported
- the code generator seems to insert special characters as UTF, which arent properly rendered in my eclipse editor and on the display; e.g. ° becomes °. I removed them after code gen, I did not try to see if it is shown properly on the display if UTF support is on
- the code gen did not set "gdisp_need_complex_polygon" for the arrow buttons, similar with arc (as reported above)
 

Feature suggestions:
- undo/redo would be very helpful (not a bug I presume)
- make moving elements by dragging a bit harder (e.g. ignore movements with very short times between mouse press and release). I often moved elements by 1-2 pixels when wanting to select them, very annoying with no undo.
- duplication of all elements (pages, backgrounds, sets of buttons etc) would be nice
- similarly: multiple editing of elements (e.g. changing style for 5 buttons at once)
- a check or warning in the font converter to prevent crashing when using "no filtering" on fonts. I crashed the studio by trying to convert Arial with no char limits :)
- I find right click to edit elements (images, fonts, styles) a bit counter intuitive (maybe use double click to open for these, or have an edit button in the property editor column)

Edited by fractal

Share this post


Link to post
Share on other sites

Thank you for your feedback, much appreciated!

I'm working on fixing the issue with the code generator regarding containers that @king2 mentioned right now.
After that I'll tackle the image editor dialog. I know that it needs some work, I just don't know how to improve it exactly. Any kind of tipps would be welcomed.

Share this post


Link to post
Share on other sites

With the image dialog I think the remaining issues are

- if you already copied the desired image to the resources folder (as I did) it will complain it is already there
- if you want to replace the image (as I did multiple times when fiddling with transparency) it will complain it is already there
- when it complains it's already there you can only get rid of the dialog by pressing ESC on the keyboard. Not intuitive.

I would suggest you
- do not try to copy an image to the resources folder when the user points the dialog to that folder
- if the user selects an image outside of the resources folder which already exists in the folder ask to overwrite
- in that case, give the user a cancel button which closes the dialog (maybe Overwrite? Yes/No/Cancel where only No returns to the dialog)

Do you understand what I mean?

 

Unrelated: I think I found a bug with renaming elements. When trying to rename many elements I now several times had the issue that it would not let me edit. Neither double click nor F2 work. After clicking around a bit it works again. Unfortunately I am not sure how to reproduce it or how to reliably stop the behavor...

Edit: seems to only occur with many elements on one page. When that is the case selecting can take seconds (from clicking in the list on the left to the GUI selection updating). Clicking many times (in the list) eventually works. Maybe an issue with slow/hanging element selection so the clicks/F2-presses do not get registered right? CPU usage stays normal (very low) throughout.

Edited by fractal

Share this post


Link to post
Share on other sites

Okay, I feel like adding a "Would you like to overwrite?" dialog is the most sensible solution here.
I'll add that tonight.

So far the following things were done for the new release:

  • Adding the ability to change the page container's widget style
  • Fixing issues with relative coordinates of widgets in a container (in the generated code)
  • Adding static text item to background editor (95% done)

Share this post


Link to post
Share on other sites

Just released v0.24. Changelog:

  • Fixing issue with relative child coordinates in generated code
  • Improving image editor (fixing various file copying bugs)
  • Adding the ability to change a display page's widget style
  • Adding missing configuration options for some of the widgets (eg. GDISP_NEED_CONVEX_POLYGON for buttons with arrow rendering method)
  • Adding post-generation script option to target editor

The post-generation script stuff will be improved in the next release. Right now it can just launch an OS-native script with no parameters. If you want to run a Python script or anything like that you need to create a standard script for Windows (a *.bat file) and launch your Python script from t here.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...