You are not logged in.

#1 2013-09-13 16:23:05

orschiro
Member
Registered: 2009-06-04
Posts: 2,136
Website

Setting the GTK theme for Chromium

Hello,

Apparently my Chromium installation does not correctly follow my GTK theme settings although it should according to the Chromium settings. There I defined that Chromium should use my GTK theme.

Screenshot of the settings in Chromium and Gnome Tweak Tool: http://i.imgur.com/LK1a4fd.png

Screenshot of how Chromium looks like: http://i.imgur.com/xL6Qi3y.png

Look at the buttons of the context menu for example. They do not look like as if they would follow the GTK theme.

Any ideas are appreciated.

Offline

#2 2013-09-13 16:55:47

nbvcxz
Member
From: Poland
Registered: 2007-12-29
Posts: 202

Re: Setting the GTK theme for Chromium

Have you tried set up GTK2 theme with eg. gtk-chtheme ? I don't use Gnome but in LXDE I need use this program to have all themes displayed correctly.

Last edited by nbvcxz (2013-09-13 16:57:44)


Lenovo G50 | LXQT-git | compton | conky

Offline

#3 2013-09-16 06:57:56

orschiro
Member
Registered: 2009-06-04
Posts: 2,136
Website

Re: Setting the GTK theme for Chromium

I used `gtk2_prefs` to set the theme settings accordingly: http://i.imgur.com/LvJOOYi.png

Does Chromium use GTK3 or still GTK2?

Could you show me a screenshot how the theme settings in Chromium look on your system?

Offline

#4 2013-09-16 22:16:58

nbvcxz
Member
From: Poland
Registered: 2007-12-29
Posts: 202

Re: Setting the GTK theme for Chromium

15ppb8g_th.jpg
Seems that themes are set ok (match system wide) - both gtk and icon theme. AFAIK Chromium uses GTK2. Could you cat your ~/.gtkrc-2.0 ~/.gtkrc.mine and ls ~/.config/gtk-2.0 ?


Lenovo G50 | LXQT-git | compton | conky

Offline

#5 2013-09-17 03:36:55

anonymous_user
Member
Registered: 2009-08-28
Posts: 3,059

Re: Setting the GTK theme for Chromium

Try changing Chromium back to classic theme and then change to GTK theme again.

Offline

#6 2013-09-17 05:32:34

cris9288
Member
Registered: 2013-01-07
Posts: 348

Re: Setting the GTK theme for Chromium

edit ~/.gtkrc-2.0 and add this line

gtk-theme-name="Theme Name"

chromium should have the new theme after a restart

Offline

#7 2013-09-17 05:56:54

orschiro
Member
Registered: 2009-06-04
Posts: 2,136
Website

Re: Setting the GTK theme for Chromium

Toggling between classic and GTK theme does not make any difference.

[orschiro@thinkpad ~]$ cat ~/.gtkrc-2.0
# DO NOT EDIT! This file will be overwritten by LXAppearance.
# Any customization should be done in ~/.gtkrc-2.0.mine instead.

gtk-theme-name="Zukitwo"
gtk-icon-theme-name="Faenza-Dark"
gtk-font-name="Droid Sans 10"
gtk-cursor-theme-name="Adwaita"
gtk-cursor-theme-size=24
gtk-toolbar-style=GTK_TOOLBAR_BOTH_HORIZ
gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR
gtk-button-images=1
gtk-menu-images=1
gtk-enable-event-sounds=0
gtk-enable-input-feedback-sounds=0
gtk-xft-antialias=1
gtk-xft-hinting=1
gtk-xft-hintstyle="hintfull"
gtk-xft-rgba="rgb"
gtk-color-scheme="tooltip_fg_color:#000000\nlink_color:#08c\nbase_color:#F7F7F7\nselected_fg_color:#f5f5f5\ntext_color:#2c2c2c\nbg_color_dark:#3f3f3f\ntext_color_dark:#FFF\nbg_color:#d4d4d4\ntooltip_bg_color:#F5F5B5\nselected_bg_color:#6699CC\nfg_color:#2c2c2c\n"
include "/home/orschiro/.gtkrc-2.0.mine"
[orschiro@thinkpad ~]$ cat ~/.gtkrc.mine
cat: /home/orschiro/.gtkrc.mine: No such file or directory

Why does it not exist? Is it not created by one of the theme choosing apps?

[orschiro@thinkpad ~]$ ls ~/.config/gtk-2.0
total 4
-rw-r--r-- 1 orschiro users 292 Sep 16 19:06 gtkfilechooser.ini

Offline

#8 2013-09-17 09:14:35

nbvcxz
Member
From: Poland
Registered: 2007-12-29
Posts: 202

Re: Setting the GTK theme for Chromium

1. ~/.gtkrc.mine is optional - no problem it doesn't exist
2. Please look at my ~/.gtkrc-2.0 (created with LXAppearance and gtk-chtheme)

# -- THEME AUTO-WRITTEN DO NOT EDIT
include "/usr/share/themes/Numix-Grey/gtk-2.0/gtkrc"

style "user-font" {
	font_name = "Sans 10"
}

widget_class "*" style "user-font"

gtk-font-name="Sans 10"

include "/home/marina/.gtkrc.mine"

# -- THEME AUTO-WRITTEN DO NOT EDIT

So first line is most important - include "/full/path/to/theme/gtk-2.0/gtkrc"


Lenovo G50 | LXQT-git | compton | conky

Offline

#9 2013-09-17 13:14:37

orschiro
Member
Registered: 2009-06-04
Posts: 2,136
Website

Re: Setting the GTK theme for Chromium

I just found out how I can actually influence the theme settings in Chromium. They change if I change the 'GTK+' theme with Gnome Tweak Tool. So, is that really GTK2 or not GTK3 that Chromium is using?

Yet I still believe that my Chromium installation does not fully consider the theme settings. For example I selected the Adwaita theme but when you look at the zoom buttons, then they miss borders.

Screenshot: http://i.imgur.com/gPibWOv.png

Offline

#10 2022-08-18 22:24:14

tjbo
Member
Registered: 2022-08-18
Posts: 1

Re: Setting the GTK theme for Chromium

Toggling the setting in Chromium worked for me:

Settings -> Theme -> Use Classic / Use GTK+

Offline

#11 2022-08-18 22:26:25

2ManyDogs
Forum Fellow
Registered: 2012-01-15
Posts: 4,648

Re: Setting the GTK theme for Chromium

This thread is nine years old. Please do not necrobump.

Closing.

Offline

Board footer

Powered by FluxBB