GIMP3/ CSS add some space to plug-in dialogs how? (original) (raw)
I would like to add some space between the end of the user defined widgets and the "load saved settings box.
Like for example in foggify:
What is the css class or id to use?
Is it possible at all?
JimDee2 (Jim Denney) March 9, 2025, 10:36am 2
Hi Nelo
I am sure that there is a “proper” way to do this but my cheat method that worked was to create a blank label as part of the dialog and insert it between the widgets that I wanted to separate.
So when creating the dialog I had
dialog.get_label(“blank”, “”, True, False)
and then I put “blank” in the right place in the dialog.fill() list, at the end for what you want. Of course it it just a blank line but it did what I needed.
See GimpUi.ProcedureDialog.get_label
I don’t know if we have a specific CSS attribute for the bottom of the plug-in dialogue - I can check.
In the meantime, you could get the widget and add a bottom margin like so:
spin = dialog.get_widget ("opacity", GimpUi.LabelSpin)
spin.set_margin_bottom (20) #Standard gtk_widget_set_margin_bottom ()
JimDee2 (Jim Denney) March 9, 2025, 2:10pm 4
Thanks. I will add that to my notes as the “proper” way instead of my cheat!
JimDee2
nelo March 9, 2025, 4:26pm 5
Thank you both.
Put both versions to my notes …
Both work fine.
system (system) Closed April 23, 2025, 4:27pm 6
This topic was automatically closed 45 days after the last reply. New replies are no longer allowed.