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 613522 - button_layout conf setting should be part of theme engine
button_layout conf setting should be part of theme engine
Status: RESOLVED WONTFIX
Product: metacity
Classification: Other
Component: themes
trunk
Other Linux
: Normal normal
: ---
Assigned To: Metacity maintainers list
Metacity maintainers list
: 612906 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2010-03-21 20:25 UTC by Ori Avtalion
Modified: 2020-02-09 11:53 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Ori Avtalion 2010-03-21 20:25:51 UTC
The conf setting /apps/metacity/general/button_layout which specifies the buttons in the window decoration and their position should be part of a theme and not a "global" configuration setting.

Some reasons:
1) Some themes assume a specific button layout and craft the button images accordingly.
For example, as used in the new Ubuntu 10.04 default theme, and in the Radiance Chrome Theme based on it [1].

If the button_layout value is different than the assumed one, this may result in an unaesthetic image with wrong shadows, etc.

[1] http://gnome-look.org/content/show.php/Radiance+Chrome+Theme?content=121276

2) If an inexperienced user tries the Radiance theme, which, say, was provided with a script to change the conf setting, doesn't like it, and then wants to revert to the older theme, it will have the buttons in the wrong position, and the user will be stuck with the new button layout.

For backwards compatibility, I suggest having the theme button layout setting override the button_layout key.

I'm willing to implement this if the idea is accepted.
Comment 1 Oded Arbel 2010-03-21 21:34:25 UTC
Sounds like a good idea - it would be a benefit to GNOME users and theme developers if a theme could override the GNOME global button configuration.

The problem is that if a theme overrides the global configuration, and then a user would like to override the theme setting - how would they go about doing that? Editing the theme is not really an option. I think it would be a good idea to also add a UI for configuring the button to the theme customization dialog.
Comment 2 Ori Avtalion 2010-03-21 22:10:50 UTC
(In reply to comment #1)
> The problem is that if a theme overrides the global configuration, and then a
> user would like to override the theme setting - how would they go about doing
> that? Editing the theme is not really an option. I think it would be a good
> idea to also add a UI for configuring the button to the theme customization
> dialog.

How is that a problem? This is a pretty esoteric feature, and I think it is a choice that should be made by a theme author and not end-users.

Should themes be super customizable using friendly GUI-controlled overrides? Where do you draw the line on what should be customizable via the "Customize" button in gnome-appearance-properties?

The best way to customize a theme IMO is to "fork" it to ~/.themes/ and make the changes. That's what I did when the Ubuntu Human theme replaced the menu button's app icon with a static image.
Comment 3 Ori Avtalion 2010-03-21 22:11:55 UTC
For the record, Thomas Thurman has written about this issue in the Metacity blog: 
http://blogs.gnome.org/metacity/2010/03/21/theme-based-button-layouts/
Comment 4 Oded Arbel 2010-03-22 07:38:00 UTC
The problem is not the lack of UI - its the lack of any kind of customizability: 

currently, if I hate the order of buttons in Ubuntu, I can go into gconf and change it. Its not very user-friendly but a non-coder can do it rather easily and gconf-editor is very friendly compared to alternatives in other OSs. 

If the theme always overrides gconf, then the only way for a person to override the theme is to clone the theme and edit some source file - which is much harder even for knowledgeable users.

A UI would still be nice though :-) My main problem with current GNOME theme UI is that there /is/ a UI for customization, and it does let you choose some things, but conspicuously does not let you choose other things of the same or more importance.
Comment 5 Christian Persch 2010-03-22 13:17:58 UTC
*** Bug 612906 has been marked as a duplicate of this bug. ***
Comment 6 Paul Sladen 2010-03-22 13:23:28 UTC
Copy over Launchpad links from duped bug:

Forwarded from:

  https://bugs.launchpad.net/ubuntu/+source/metacity/+bug/533758

this has cropped up as in some Ubuntu pre-10.04 "lucid" the default theme has
tested a move of the WM buttons... this alteration has then affected all other
themes.

----

Given the change of default button layout in Lucid, I feel that this should be
part of theme rather a part of a separate gconf entity.

(I realise that might be a contentious request - but note I'm not asking to
undo the new default button layout, just to associate it with the new themes
rather than laying it down whatever theme people have).

I'm referencing this from
https://bugs.launchpad.net/ubuntu/+source/gnome-control-center/+bug/532754
which is the fact that the appearance dialog doesn't match the new reality.
Comment 7 Andrew Starr-Bochicchio 2010-03-22 22:45:54 UTC
Patch by Kevin <https://edge.launchpad.net/~campbell-kc> attached to Launchpad bug.

From https://bugs.edge.launchpad.net/ubuntu/+source/metacity/+bug/533758/comments/3
"If something like this would be a reasonable solution, I'm happy to put more work into cleaning it up and integrating as a patch to the metacity package, as well as implementing it in compiz."

From https://bugs.edge.launchpad.net/ubuntu/+source/metacity/+bug/533758/comments/4
"I worked on cleaning up that patch a bit and I've attached the results. The button layout theme feature is now a part of a version 3 metacity theme only, so as not to break backward/forward compatibility. Right-to-left languages should also work now. I also looked into how compiz draws metacity themes and I believe it should pick up the patch as well, since it just uses metacity's theme.h header. I was unable to test this though as it would require recompiling compiz against the modified metacity, and I'm not very well set up to do that. Also I'm not sure how Gnome's Appearance applet searches for themes, but it may or may not need to be updated or built against the new metacity to pick up version 3 theme files."

From https://bugs.edge.launchpad.net/ubuntu/+source/metacity/+bug/533758/comments/5
"After installing the patched package, all that would be required would be to add a version 3 theme xml file to the Ambiance and Radiance metacity themes specifying the button layout, and the left button layout would only apply to those themes."

http://launchpadlibrarian.net/41656895/12_add_theme_button_layout.patch
Comment 8 Ori Avtalion 2010-03-26 21:57:08 UTC
Whatever solution is chosen, the theme "widgets" which are used in the theme chooser would also have to be updated. At their current version, they don't respect the current button layout at all and show a default layout.
Comment 9 Lapo Calamandrei 2010-08-28 15:13:44 UTC
The possibility to force button_layout in the theme would be a nice addition, any news on this one?