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 765590 - [PATCH] Add a style class to the main window
[PATCH] Add a style class to the main window
Status: RESOLVED FIXED
Product: gnome-terminal
Classification: Core
Component: general
git master
Other Linux
: Normal enhancement
: ---
Assigned To: GNOME Terminal Maintainers
GNOME Terminal Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-04-26 09:44 UTC by Alex Smith
Modified: 2016-05-08 09:08 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add a style class to the main window (1.20 KB, patch)
2016-04-26 09:44 UTC, Alex Smith
rejected Details | Review

Description Alex Smith 2016-04-26 09:44:23 UTC
Created attachment 326744 [details] [review]
Add a style class to the main window

This patch adds a "gnome-terminal-window" style context to the main terminal window, which allows third party themes to implement custom styling for terminal windows.

This was possible prior to GTK 3.20, and was used by several themes, for example to style tabs differently: https://github.com/horst3180/vertex-theme/issues/173
Comment 1 Christian Persch 2016-04-26 18:55:36 UTC
Will this cause any problem for existing themes by not making their style apply anymore to the now renamed window ?
Comment 2 Alex Smith 2016-04-27 08:50:16 UTC
No, the terminal window didn't have it's own class previously that themes could use to style the terminal specifically. Also, if they don't override styling using this class then the default styles will be applied instead, the same as what happens without this patch.
Comment 3 Christian Persch 2016-04-27 14:59:03 UTC
Comment on attachment 326744 [details] [review]
Add a style class to the main window

Alright. Ok to push to master.
Comment 4 Alex Smith 2016-04-28 07:40:51 UTC
I don't have access to GNOME git. Would you be able to push it?
Comment 5 Egmont Koblinger 2016-04-30 20:15:54 UTC
(I guess it should be cherry-picked to 3-20 too, what do you think Christian?)
Comment 6 Christian Persch 2016-05-01 08:14:47 UTC
Sure.
Comment 7 Christian Persch 2016-05-08 08:41:13 UTC
Comment on attachment 326744 [details] [review]
Add a style class to the main window

I'll go with another approach, using gtk_widget_class_set_css_name().
Comment 8 Christian Persch 2016-05-08 08:48:13 UTC
Fixed on master and 3-20.
Comment 9 Alex Smith 2016-05-08 09:08:42 UTC
That also works, thanks for fixing.