Injecting GTK colors into Google Chrome/Chromium
- From: "Elliot Glaysher (Chromium)" <erg chromium org>
- To: gnome-themes-list gnome org
- Cc: Chromium-dev <chromium-dev chromium org>, Evan Martin <evan chromium org>
- Subject: Injecting GTK colors into Google Chrome/Chromium
- Date: Mon, 22 Nov 2010 16:27:40 -0800
Hi,
My name is Elliot and I work on the GTK+ version of the Google Chrome
interface. The first version of the GTK+ integration code (around the
Hardy Heron days) used several heuristics to determine the custom
frame color, and these heuristics don't often do a good job anymore
(i.e. Ambiance on Maverick using bright orange). Our previous plan was
to wait for client side decoration system to be enabled by default,
and then use that to draw the chrome window. From the outside, it
looks less and less likely that CSD will happen, so we've very
recently added explicit control of many of chrome's colors from gtk
themes through style properties.
These style properties are documented at
http://code.google.com/p/chromium/wiki/LinuxGtkThemeIntegration .
Chrome will still fallback on its previous heuristics if these style
properties aren't set. I'd love if people pointed out missing things
or problems with that interface.
These properties should work on the current dev channel of chrome. I
believe 9.0.587.0 was the first version with the new system.
I've gone and created some sample usage of these style properties. All
these samples were created by taking screenshots of a normal window
and getting colors with the eyedrop tool. The appropriate shade(0.XX,
@name) statements would look better but I don't understand metacity's
executable XML. (These may not be optimal, but are examples to show
off what's possible.)
Clearlooks:
----------------
style "chrome-hacks"
{
# All colors picked with the eyedropper from screenshots of Clearlooks.
ChromeGtkFrame::frame-color = "#79a0d1"
ChromeGtkFrame::inactive-frame-color = "#d4d2d0"
ChromeGtkFrame::frame-gradient-size = 12
ChromeGtkFrame::frame-gradient-color = "#97b9e2"
ChromeGtkFrmae::inactive-frame-gradient-color = "#ebeae9"
# The scrollbar selections are good enough.
}
class "ChromeGtkFrame" style "chrome-hacks"
Dust:
--------
style "chrome-hacks"
{
ChromeGtkFrame::frame-color = "#32302e"
ChromeGtkFrame::inactive-frame-color = "#2f2e2c"
ChromeGtkFrame::frame-gradient-size = 8
ChromeGtkFrame::frame-gradient-color = "#524a45"
ChromeGtkFrame::inactive-frame-gradient-color = "#2f2e2c"
ChromeGtkFrame::scrollbar-slider-normal = "#938a7e"
ChromeGtkFrame::scrollbar-trough-color = "#e2ded8"
}
class "ChromeGtkFrame" style "chrome-hacks"
Ambiance:
----------------
style "chrome-hacks"
{
ChromeGtkFrame::frame-color = @fg_color
ChromeGtkFrame::inactive-frame-color = @fg_color
ChromeGtkFrame::frame-gradient-size = 16
ChromeGtkFrame::frame-gradient-color = "#5c5b56"
ChromeGtkFrame::scrollbar-trough-color = @bg_color
ChromeGtkFrame::scrollbar-slider-prelight-color = "#F8F6F2"
ChromeGtkFrame::scrollbar-slider-normal-color = "#E7E0D3"
}
class "ChromeGtkFrame" style "chrome-hacks"
-- Elliot Glaysher <erg chromium org>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]