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 666604 - [WEB] Make Back/Forward linked buttons
[WEB] Make Back/Forward linked buttons
Status: RESOLVED FIXED
Product: epiphany
Classification: Core
Component: General
git master
Other Linux
: Normal normal
: ---
Assigned To: Epiphany Maintainers
Epiphany Maintainers
Depends on:
Blocks:
 
 
Reported: 2011-12-20 17:17 UTC by Xan Lopez
Modified: 2012-01-16 19:31 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
linkedbuttons.diff (9.37 KB, patch)
2012-01-03 11:44 UTC, Xan Lopez
none Details | Review

Description Xan Lopez 2011-12-20 17:17:44 UTC
As seen in the new design: https://github.com/gnome-design-team/gnome-mockups/raw/master/web/web-url-entry.png

The way to do this is probably to create a special action with a tool item that contains both buttons.
Comment 1 Diego Escalante Urrelo (not reading bugmail) 2011-12-20 17:44:08 UTC
Will they have the right click menu that Back/Fwd have in 3.2?
Comment 2 Diego Escalante Urrelo (not reading bugmail) 2011-12-21 06:43:37 UTC
From the mockup this seems to be like the buttons in the toolbars of gnome-control-center. 

I'm trying my luck with theming, but it seems I'm doing it wrong. Perhaps we should ask the people that were doing control-center and that.

But anyway, if we want some special behavior we should go for our own special action.
No idea if the design will require something special.
Comment 3 Xan Lopez 2011-12-21 12:41:05 UTC
This is basically raised+linked theming for the buttons. I'm already taking care of it :)
Comment 4 Xan Lopez 2012-01-03 11:44:38 UTC
Created attachment 204491 [details] [review]
linkedbuttons.diff

WIP patch. The theming is wrong because I'm using GtkToolButtons inside a box with linked+raised style classes. Change them to normal GtkButtons and you'd get this: http://i.imgur.com/JqQuj.png (almost there). I'll CC the theme people to see what they want to do exactly.
Comment 5 Xan Lopez 2012-01-03 11:45:51 UTC
CCing usual suspects, please read comment #4!
Comment 6 Jakub Steiner 2012-01-03 12:45:45 UTC
I suggest tweaking the horizontal padding to make the buttons appear square (similar to the mockup).
Comment 7 Xan Lopez 2012-01-03 12:50:31 UTC
(In reply to comment #6)
> I suggest tweaking the horizontal padding to make the buttons appear square
> (similar to the mockup).

I think my main question is:

Do you want Adwaita to take care of this automatically given the layout in the patch (box with raised/linked class with row of GtkToolButtons) or do you want me to do it all inside Epiphany? It seems Adwaita is almost there, so it would just need some tweaking. I can open a bug in gnome-themes-standard about it.
Comment 8 Jakub Steiner 2012-01-04 12:03:41 UTC
Makes sense to not having to deal with this individually app per app. Let's do it in Adwaita.
Comment 9 Lapo Calamandrei 2012-01-06 14:42:23 UTC
Should be done in adwaita in a generic way with a style class so that this pattern  will be reusable in other apps. Dealing with apps one by one with custom stuff in adwaita is not the way to go. Now with the core apps designs basically done we need to sit down a choose the patterns we want to use generally and provide ways to have them implemented which are not custom all the time.
Comment 10 Xan Lopez 2012-01-06 18:01:33 UTC
(In reply to comment #9)
> Should be done in adwaita in a generic way with a style class so that this
> pattern  will be reusable in other apps. Dealing with apps one by one with
> custom stuff in adwaita is not the way to go. Now with the core apps designs
> basically done we need to sit down a choose the patterns we want to use
> generally and provide ways to have them implemented which are not custom all
> the time.

One suggestion is to create three CSS style classes, "linked-left", "linked-middle", "linked-right", that you can attach to any button. This would make it really easy for apps to get the desired look and feel. For instance it would not require a custom container for the buttons, which is a bit of a pain when using GtkUIManager and GtkActions. How does that sound?
Comment 11 Cosimo Cecchi 2012-01-10 17:19:10 UTC
(In reply to comment #10)

> One suggestion is to create three CSS style classes, "linked-left",
> "linked-middle", "linked-right", that you can attach to any button. This would
> make it really easy for apps to get the desired look and feel. For instance it
> would not require a custom container for the buttons, which is a bit of a pain
> when using GtkUIManager and GtkActions. How does that sound?

I don't think that's the right approach. IMO "linked" should be a style property of the container, not of the single buttons; also, there's no need for special containers for this to work, since it works already on a GtkBox.

I think there are two problems here:
- The use of GtkUIManager to link actions and toolbar items: GTK is trying to move away from GtkUIManager using GActions/GtkApplication and GtkActionable to associate those actions to a GtkButton or a GtkToolButton (and to menu items using the GMenu stuff).
- GtkToolbar's way of handling contained children; in particular, you cannot group GtkToolItems, which is what you're trying to achieve here; also, I don't think GtkUIManager's XML syntax allows grouping of items at all

The two problems are orthogonal and we still need to fix the second one in GTK, but I would recommend to move away from GtkUIManager anyway while transitioning to GMenu.
Comment 12 Xan Lopez 2012-01-16 19:31:07 UTC
This has happened in git master now.