frauzufall / ofxGuiExtended

ofParameter based GUI addon for openFrameworks; derived from the core OF ofxGui addon and ofxDOM.
MIT License
112 stars 29 forks source link

Panel height not minimizing after group->minimize() #41

Closed transat closed 8 years ago

transat commented 8 years ago

I've noticed that if I minimize a group's contents, the panel's background keeps the same full-height as the minimized group use to have, pushing any subsequent elements down. It might be easier to illustrate what I mean with an image sequence:

screen shot 2016-05-25 at 12 18 56 i open the effects panel screen shot 2016-05-25 at 12 16 04 I open the transform group screen shot 2016-05-25 at 12 16 19 and close it... but the panel height is not minimized screen shot 2016-05-25 at 12 17 15 and if i open the post processing group screen shot 2016-05-25 at 12 17 25 and then minimize it... the transformer group is no longer visible (pushed off screen) screen shot 2016-05-25 at 12 17 55 But it can be recovered by minimizing the effects panel... screen shot 2016-05-25 at 12 18 07 and then reopening it... screen shot 2016-05-25 at 12 18 13

frauzufall commented 8 years ago

Yes that shouldn't happen, I could reproduce it with your deBug code and I will have a look at it.

frauzufall commented 8 years ago

It's got to do with your group theme. At least it works (the app that you gave me access to) when I change this line:

ofJson groupTheme = {{"flex-direction", "row"}, {"flex-wrap", "wrap"}, {"width", 320}, {"align-content", "space-between"}};

to

ofJson groupTheme = {{"width", 320}, {"align-content", "space-between"}};

Check if this line is still the same in your code. You are not trying to create a row layout there, are you?

transat commented 8 years ago

Yep. Working now. Cheers!

transat commented 8 years ago

Actually... removing {"flex-direction", "row"}, {"flex-wrap", "wrap"} fixes the vertical spacing issue but causes the group to once again no longer display the 10% width toggle on the same row as the 45% width sliders. I'm sure it's something to do with my theme but flexbox is still a bit confusing for me! I've uploaded a cleaned-up version of my deBug code if you have the time to peak inside.

transat commented 8 years ago

And another thing that confuses me is that "show-name": false doesn't seem to work for me in the json file but if i do "show-name", false as inline json it does work.

frauzufall commented 8 years ago

Yes, I had some similar issues. Will work on it. I also understand now why you used {"flex-direction", "row"}, {"flex-wrap", "wrap"} and it should actually do what you expected it to do, I will try to fix that.

Can you tell me for which class type "show-name" did not work from the theme?

transat commented 8 years ago

Cool. Show-name hadn't worked for toggles but I think I also tried on sliders without success.

On 28 May 2016, at 1:43 AM, Deborah Schmidt notifications@github.com wrote:

Yes, I had some similar issues. Will work on it. I also understand now why you used {"flex-direction", "row"}, {"flex-wrap", "wrap"} and it should actually do what you expected it to do, I will try to fix that.

Can you tell me for which class type "show-name" did not work from the theme?

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub, or mute the thread.

frauzufall commented 8 years ago

Update.

transat commented 8 years ago

All appears to be working now! Cheers! Only two issues I'm noticing... If I show the headers (Settings/Panels/Unlock Panels in the debug app) the panel shifts to the right of the header. I'm guessing this has to do with the "flex-direction": "row" on the group but will investigate. Also, I'm getting 3 warnings in the console that I can't figure out...

[warning] Adding another parameter with same name '' to group 'Camera'
[warning] Adding another parameter with same name '' to group 'menubar'
[warning] Adding another parameter with same name '' to group 'Scenes Menu'
frauzufall commented 8 years ago

The warnings are due to the fact that you initialize the parameters in line 114 after creating the gui. That means that in the moment you add them to the panel, they have no name yet and will therefore throw this warning.