After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 720059 - use headerbars in dialogs
use headerbars in dialogs
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: Other
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks: 722072 722119
 
 
Reported: 2013-12-08 12:43 UTC by William Jon McCann
Modified: 2014-01-28 09:33 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
about-dialog: Use headerbar (17.03 KB, patch)
2013-12-08 12:43 UTC, William Jon McCann
none Details | Review
dialog: use headerbar (8.43 KB, patch)
2013-12-08 17:19 UTC, William Jon McCann
none Details | Review
dialog: mark alternate button order as deprecated (2.19 KB, patch)
2013-12-08 17:20 UTC, William Jon McCann
none Details | Review
about-dialog: Use headerbar (17.04 KB, patch)
2013-12-08 17:20 UTC, William Jon McCann
none Details | Review
font-dialog: use headerbar (5.11 KB, patch)
2013-12-08 17:20 UTC, William Jon McCann
none Details | Review
color dialog: use headerbar (5.26 KB, patch)
2013-12-08 17:20 UTC, William Jon McCann
none Details | Review
app chooser: use headerbar (4.55 KB, patch)
2013-12-08 17:20 UTC, William Jon McCann
none Details | Review
print dialog: use headerbar (7.11 KB, patch)
2013-12-08 17:20 UTC, William Jon McCann
none Details | Review
page setup: use headerbar (5.38 KB, patch)
2013-12-08 17:20 UTC, William Jon McCann
none Details | Review
custom page dialog: don't add a close button (988 bytes, patch)
2013-12-08 17:20 UTC, William Jon McCann
none Details | Review
dialog: use headerbar (8.93 KB, patch)
2013-12-09 09:14 UTC, William Jon McCann
none Details | Review
dialog: add an accessor function for header bar (1.45 KB, patch)
2013-12-09 09:14 UTC, William Jon McCann
reviewed Details | Review
dialog: mark alternate button order as deprecated (2.19 KB, patch)
2013-12-09 09:14 UTC, William Jon McCann
reviewed Details | Review
message dialog: use headerbar (2.22 KB, patch)
2013-12-09 09:14 UTC, William Jon McCann
none Details | Review
about-dialog: Use headerbar (17.04 KB, patch)
2013-12-09 09:14 UTC, William Jon McCann
none Details | Review
font-dialog: use headerbar (5.11 KB, patch)
2013-12-09 09:14 UTC, William Jon McCann
none Details | Review
color dialog: use headerbar (5.26 KB, patch)
2013-12-09 09:14 UTC, William Jon McCann
none Details | Review
app chooser: use headerbar (4.55 KB, patch)
2013-12-09 09:14 UTC, William Jon McCann
none Details | Review
print dialog: use headerbar (7.11 KB, patch)
2013-12-09 09:14 UTC, William Jon McCann
none Details | Review
page setup: use headerbar (5.38 KB, patch)
2013-12-09 09:14 UTC, William Jon McCann
none Details | Review
custom page dialog: don't add a close button (988 bytes, patch)
2013-12-09 09:14 UTC, William Jon McCann
none Details | Review
Set a minimum size on the headerbar title label (1.36 KB, patch)
2014-01-13 02:48 UTC, William Jon McCann
none Details | Review
Allow unsetting custom titlebar (1.05 KB, patch)
2014-01-13 02:48 UTC, William Jon McCann
none Details | Review
Add an expand button box type (3.89 KB, patch)
2014-01-13 02:48 UTC, William Jon McCann
committed Details | Review
dialog: use headerbar (18.47 KB, patch)
2014-01-13 02:48 UTC, William Jon McCann
none Details | Review
message dialog: use headerbar (2.22 KB, patch)
2014-01-13 02:48 UTC, William Jon McCann
none Details | Review
about-dialog: Use headerbar (17.43 KB, patch)
2014-01-13 02:48 UTC, William Jon McCann
none Details | Review
font-dialog: use headerbar (5.64 KB, patch)
2014-01-13 02:48 UTC, William Jon McCann
none Details | Review
color dialog: use headerbar (5.79 KB, patch)
2014-01-13 02:50 UTC, William Jon McCann
none Details | Review
app chooser: use headerbar (5.37 KB, patch)
2014-01-13 02:50 UTC, William Jon McCann
none Details | Review
print dialog: use headerbar (7.64 KB, patch)
2014-01-13 02:50 UTC, William Jon McCann
none Details | Review
page setup: use headerbar (5.87 KB, patch)
2014-01-13 02:51 UTC, William Jon McCann
none Details | Review
custom page dialog: don't add a close button (1.34 KB, patch)
2014-01-13 02:51 UTC, William Jon McCann
none Details | Review
Don't use a headerbar on message dialogs (789 bytes, patch)
2014-01-13 02:51 UTC, William Jon McCann
none Details | Review
Use header bar on file chooser dialogs (783 bytes, patch)
2014-01-13 02:51 UTC, William Jon McCann
none Details | Review
Use header bar on recent chooser dialogs (875 bytes, patch)
2014-01-13 02:51 UTC, William Jon McCann
none Details | Review
Allow button box to extend to edge of dialog (6.71 KB, patch)
2014-01-13 02:51 UTC, William Jon McCann
none Details | Review
demo: add two buttons to the message dialog (1.09 KB, patch)
2014-01-13 02:51 UTC, William Jon McCann
none Details | Review
demo: add new button box layouts (2.56 KB, patch)
2014-01-13 02:52 UTC, William Jon McCann
none Details | Review
Don't show images in message dialogs (1.45 KB, patch)
2014-01-13 02:52 UTC, William Jon McCann
none Details | Review
Fix order of print buttons (2.56 KB, patch)
2014-01-13 03:12 UTC, William Jon McCann
none Details | Review
Center headerbar buttons added by dialog (1.44 KB, patch)
2014-01-13 16:29 UTC, William Jon McCann
none Details | Review
Center message dialog text (1.86 KB, patch)
2014-01-13 21:24 UTC, William Jon McCann
none Details | Review

Description William Jon McCann 2013-12-08 12:43:29 UTC
It would be nice to use the headerbar in the about dialog so that we can begin the process of making dialogs consistent with respect to the close button and to reduce the amount of vertical space used.
Comment 1 William Jon McCann 2013-12-08 12:43:54 UTC
Created attachment 263741 [details] [review]
about-dialog: Use headerbar

Use a GtkHeaderBar for the credits and about buttons
Comment 2 William Jon McCann 2013-12-08 17:19:59 UTC
Created attachment 263752 [details] [review]
dialog: use headerbar
Comment 3 William Jon McCann 2013-12-08 17:20:05 UTC
Created attachment 263753 [details] [review]
dialog: mark alternate button order as deprecated
Comment 4 William Jon McCann 2013-12-08 17:20:09 UTC
Created attachment 263754 [details] [review]
about-dialog: Use headerbar

Use a GtkHeaderBar for the credits and about buttons
Comment 5 William Jon McCann 2013-12-08 17:20:18 UTC
Created attachment 263755 [details] [review]
font-dialog: use headerbar
Comment 6 William Jon McCann 2013-12-08 17:20:25 UTC
Created attachment 263756 [details] [review]
color dialog: use headerbar
Comment 7 William Jon McCann 2013-12-08 17:20:31 UTC
Created attachment 263757 [details] [review]
app chooser: use headerbar
Comment 8 William Jon McCann 2013-12-08 17:20:37 UTC
Created attachment 263758 [details] [review]
print dialog: use headerbar
Comment 9 William Jon McCann 2013-12-08 17:20:43 UTC
Created attachment 263759 [details] [review]
page setup: use headerbar
Comment 10 William Jon McCann 2013-12-08 17:20:50 UTC
Created attachment 263760 [details] [review]
custom page dialog: don't add a close button
Comment 11 William Jon McCann 2013-12-09 09:14:05 UTC
Created attachment 263793 [details] [review]
dialog: use headerbar
Comment 12 William Jon McCann 2013-12-09 09:14:10 UTC
Created attachment 263794 [details] [review]
dialog: add an accessor function for header bar
Comment 13 William Jon McCann 2013-12-09 09:14:14 UTC
Created attachment 263795 [details] [review]
dialog: mark alternate button order as deprecated
Comment 14 William Jon McCann 2013-12-09 09:14:18 UTC
Created attachment 263796 [details] [review]
message dialog: use headerbar
Comment 15 William Jon McCann 2013-12-09 09:14:23 UTC
Created attachment 263797 [details] [review]
about-dialog: Use headerbar

Use a GtkHeaderBar for the credits and about buttons
Comment 16 William Jon McCann 2013-12-09 09:14:27 UTC
Created attachment 263798 [details] [review]
font-dialog: use headerbar
Comment 17 William Jon McCann 2013-12-09 09:14:32 UTC
Created attachment 263799 [details] [review]
color dialog: use headerbar
Comment 18 William Jon McCann 2013-12-09 09:14:36 UTC
Created attachment 263800 [details] [review]
app chooser: use headerbar
Comment 19 William Jon McCann 2013-12-09 09:14:41 UTC
Created attachment 263801 [details] [review]
print dialog: use headerbar
Comment 20 William Jon McCann 2013-12-09 09:14:46 UTC
Created attachment 263802 [details] [review]
page setup: use headerbar
Comment 21 William Jon McCann 2013-12-09 09:14:50 UTC
Created attachment 263803 [details] [review]
custom page dialog: don't add a close button
Comment 22 Matthias Clasen 2013-12-11 04:21:18 UTC
Review of attachment 263794 [details] [review]:

::: gtk/gtkdialog.h
@@ +193,3 @@
 GDK_AVAILABLE_IN_ALL
 GtkWidget * gtk_dialog_get_content_area (GtkDialog *dialog);
+GDK_AVAILABLE_IN_3_10

3.12 by now
Comment 23 Matthias Clasen 2013-12-11 04:23:12 UTC
Review of attachment 263795 [details] [review]:

::: gtk/gtkdialog.h
@@ +169,3 @@
                                          GtkWidget *widget);
 
+GDK_DEPRECATED_IN_3_10

3.12
Comment 24 Matthias Clasen 2013-12-11 04:28:58 UTC
Looking at these dialogs I'm a little concerned about compatibility. The will work great in GNOME, but may look foreign elsewhere. Any thoughts on that ?
Comment 25 Yosef Or Boczko 2013-12-11 11:20:11 UTC
I think you need to set the valign of each button
as GTK_ALIGN_CANTER, additionally to set the
style "test-button".

This still not perfect.
We need a way to pack the buttons in the dialog
to a single size-group with the close-button, maybe
something same to "homogeneous" property in
GtkHeaderBar.
Comment 26 Bastien Nocera 2013-12-11 11:30:16 UTC
(In reply to comment #24)
> Looking at these dialogs I'm a little concerned about compatibility. The will
> work great in GNOME, but may look foreign elsewhere. Any thoughts on that ?

I think most of those changes should happen against a GtkDialog subclass (or sibling) for now, and remove the original dialog in v4. There's loads of uses of dialogues outside of GTK+ which do all kinds of crazy things with the widgets in there, and I'm not sure every single one of them will migrate nicely.

Furthermore, is every dialogue supposed to use the headerbar's "Done" button style? What about alerts/warnings? gtk_dialog_set_default_response() might also break.
Comment 27 William Jon McCann 2014-01-13 02:48:05 UTC
Created attachment 266095 [details] [review]
Set a minimum size on the headerbar title label
Comment 28 William Jon McCann 2014-01-13 02:48:12 UTC
Created attachment 266096 [details] [review]
Allow unsetting custom titlebar
Comment 29 William Jon McCann 2014-01-13 02:48:18 UTC
Created attachment 266097 [details] [review]
Add an expand button box type
Comment 30 William Jon McCann 2014-01-13 02:48:26 UTC
Created attachment 266098 [details] [review]
dialog: use headerbar
Comment 31 William Jon McCann 2014-01-13 02:48:32 UTC
Created attachment 266099 [details] [review]
message dialog: use headerbar
Comment 32 William Jon McCann 2014-01-13 02:48:47 UTC
Created attachment 266100 [details] [review]
about-dialog: Use headerbar

Use a GtkHeaderBar for the credits and about buttons
Comment 33 William Jon McCann 2014-01-13 02:48:52 UTC
Created attachment 266101 [details] [review]
font-dialog: use headerbar
Comment 34 William Jon McCann 2014-01-13 02:50:35 UTC
Created attachment 266102 [details] [review]
color dialog: use headerbar
Comment 35 William Jon McCann 2014-01-13 02:50:42 UTC
Created attachment 266103 [details] [review]
app chooser: use headerbar
Comment 36 William Jon McCann 2014-01-13 02:50:54 UTC
Created attachment 266104 [details] [review]
print dialog: use headerbar
Comment 37 William Jon McCann 2014-01-13 02:51:05 UTC
Created attachment 266105 [details] [review]
page setup: use headerbar
Comment 38 William Jon McCann 2014-01-13 02:51:10 UTC
Created attachment 266106 [details] [review]
custom page dialog: don't add a close button
Comment 39 William Jon McCann 2014-01-13 02:51:25 UTC
Created attachment 266107 [details] [review]
Don't use a headerbar on message dialogs
Comment 40 William Jon McCann 2014-01-13 02:51:31 UTC
Created attachment 266108 [details] [review]
Use header bar on file chooser dialogs
Comment 41 William Jon McCann 2014-01-13 02:51:37 UTC
Created attachment 266109 [details] [review]
Use header bar on recent chooser dialogs
Comment 42 William Jon McCann 2014-01-13 02:51:42 UTC
Created attachment 266110 [details] [review]
Allow button box to extend to edge of dialog
Comment 43 William Jon McCann 2014-01-13 02:51:54 UTC
Created attachment 266111 [details] [review]
demo: add two buttons to the message dialog
Comment 44 William Jon McCann 2014-01-13 02:52:06 UTC
Created attachment 266112 [details] [review]
demo: add new button box layouts
Comment 45 William Jon McCann 2014-01-13 02:52:31 UTC
Created attachment 266113 [details] [review]
Don't show images in message dialogs
Comment 46 William Jon McCann 2014-01-13 02:57:23 UTC
Bug 722072 for the required style.
Comment 47 William Jon McCann 2014-01-13 03:12:53 UTC
Created attachment 266116 [details] [review]
Fix order of print buttons

We changed the packing order recently
Comment 48 Yosef Or Boczko 2014-01-13 08:49:00 UTC
I not see in what patch exactly it, but you miss add GTK_ALIGN_CANTER
to some buttons in the file dialog.
Comment 49 William Jon McCann 2014-01-13 16:29:32 UTC
Created attachment 266175 [details] [review]
Center headerbar buttons added by dialog
Comment 50 William Jon McCann 2014-01-13 21:24:59 UTC
Created attachment 266199 [details] [review]
Center message dialog text
Comment 51 Matthias Clasen 2014-01-15 12:31:15 UTC
thanks for this effort - I've pushed an elaboration of this patch set to the dialogs branch.
Comment 52 Paolo Borelli 2014-01-15 13:17:31 UTC
I think this is wrong on many levels. I'll not bother to write down why I think this is a bad idea from a design point of view since I have long given up on being able to argue a design decision, but with regard on how this design decision is implemented in gtk I see at least the following problems:


*) the change will break all the apps that currently use this api: even if technically the change is api/abi compatible, all current users of this api expect the buttons to be at the bottom both from a design point of view and from a documentation point of view

*) the change is forced directly at the base of the platform without any form of user validation

*) the change breaks cross platform usage of Gtk. How will all this dialog behave on other platforms (windows and osx). How will they behave on other linux platforms that are not gnome?

*) the deprecation of the button-order setting is a break of cross platform expectation on its own. I have always been ok with the button order picked by gnome, but I appreciate how "[open|cancel]" have the right order when the app used on windows.
Comment 53 Paolo Borelli 2014-01-15 13:56:20 UTC
I saw that in Matthias git branch, the use of the header it is conditional to a setting, which reduces some of the concerns about portability etc.

However the patch deprecating button-order is still there, and that's already a problem on windows.



I still think this whole exercise is kind of pointless: we always complain about the combinatorial explosion of options to test and yet we systematically pick to change a lot of details so that they behave different from how they work on other platforms. Even if buttons on top was better than on bottom (and I do not think it is), is this the most pressing issue in gnome design? Is it so much better to warrant introducing the inconsistency with all third party applications and toolkits? Or do we really think that ISV will rush to change a zillion of dialogs to comply with the GNOME way?
Comment 54 Matthias Clasen 2014-01-15 14:50:34 UTC
So, we're careful to preserve api and abi, and to phase things out slowly with deprecations while keeping them working, and you just throw all that away and say we break applications anyway ?

That seems a little unfair, to say the least.

I even made the default of the setting conservative.
Comment 55 Matthias Clasen 2014-01-17 23:02:38 UTC
Attachment 266097 [details] pushed as 00326d3 - Add an expand button box type