GNOME Bugzilla – Bug 763750
Glade allows users to use CSD in dialogs
Last modified: 2018-03-26 15:53:28 UTC
I current Glade master, Glade's inherited editor (from GtkWindow editor) allows the user to enable client side window decorations for a GtkDialog. This is however incorrect, as GTK+ "owns" the client side window decorations slot (i.e. the window's titlebar, gtk_window_set_titlebar()) for a GtkDialog class. Glade needs to remove access to this for GtkDialog.
Apart from, that Glade doesn't support the 'action' child of GtkDialog and the "use-header-bar" property. My ideas on how to fix "use-header-bar" and "use-csd": Add the "use-header-bar" property to the window editor and only show it when the window actually is a dialog (and vice-versa for the "use-csd" property). No idea on how to deal with the action child, since it isn't an actual (i.e. embedded in the dialog) child and the order matters, so we can't just have something like the image widgets of buttons.
Right. The dialog situation has been a bit of a mess since CSD was introduced, quite possibly the API contract has changed more than once. I think before we can even start to address this in Glade, we need to know for sure: o Can a Dialog be designed in such a way that the same .ui file can be used with or without CSD I.e. can I use the same layout on one desktop where CSD is inappropriate and another where it is expected ? o At one point action area widgets were being shoved into the header area, resulting in a backwards UX where dialogs read with the answer buttons *preceding* the question. Can we be sure this will never happen again ? We could at least have a plan if we know the answers to these. If it's the case that CSD layouts are exclusive (cant reuse same dialog on non-CSD), then it may just make sense to have Glade provide 2 separate dialog UIs completely, or else Glade will have to provide an undo-able UX when the user is designing a dialog with action button or widgets in the action area, and later decides to toggle the CSD switch.
Created attachment 346182 [details] test ui file
Created attachment 346183 [details] test python script to run the ui file
By changing <property name="use-header-bar">-1</property> to 1 or 0, the dialog can have header bars. > I think before we can even start to address this in Glade, we need to know > for sure: > > o Can a Dialog be designed in such a way that the same .ui file can > be used with or without CSD Yes, see the attaches files. > o At one point action area widgets were being shoved into the header > area, resulting in a backwards UX where dialogs read with the answer > buttons *preceding* the question. Uh, oh, isn't that always the case with CSD-style dialogs?
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/glade/issues/233.