Advertisement
Guest User

Adwaita gtkrc for gtk2

a guest
Apr 12th, 2011
2,423
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.65 KB | None | 0 0
  1.  
  2. # Please keep this gtkrc in sync with the other ones from Clearlooks
  3. based themes.
  4. gtk_color_scheme =
  5. "fg_color:#E6E6E6\nbg_color:#222222\nbase_color:#333333\ntext_color:#D3D7CF\nselected_bg_color:#3F403D\nselected_fg_color:#7AA3CC\ntooltip_bg_color:#EDDE5C\ntooltip_fg_color:#000000"
  6. gtk-auto-mnemonics = 1
  7.  
  8. style "default" {
  9. xthickness = 1
  10. ythickness = 1
  11.  
  12. #######################
  13. # Style Properties
  14. #######################
  15. GtkButton::child-displacement-x = 1
  16. GtkButton::child-displacement-y = 1
  17. GtkButton::default-border = { 0, 0, 0, 0 }
  18. GtkButton::image-spacing = 4
  19. GtkToolButton::icon-spacing = 4
  20.  
  21. GtkCheckButton::indicator-size = 14
  22.  
  23. GtkEntry::invisible-char = 0x2022
  24.  
  25. GtkPaned::handle-size = 6
  26.  
  27. GtkRange::trough-border = 0
  28. GtkRange::slider-width = 15
  29. GtkRange::stepper-size = 15
  30.  
  31. GtkScale::slider-length = 23
  32. GtkScale::trough-side-details = 1
  33.  
  34. GtkScrollbar::min-slider-length = 30
  35. GtkMenuBar::internal-padding = 0
  36. GtkExpander::expander-size = 16
  37. GtkToolbar::internal-padding = 1
  38. GtkTreeView::expander-size = 14
  39. GtkTreeView::vertical-separator = 0
  40.  
  41. GtkMenu::horizontal-padding = 0
  42. GtkMenu::vertical-padding = 0
  43.  
  44. WnckTasklist::fade-overlay-rect = 0
  45. # The following line hints to gecko (and possibly other
  46. appliations)
  47. # that the entry should be drawn transparently on the canvas.
  48. # Without this, gecko will fill in the background of the entry.
  49. GtkEntry::honors-transparent-bg-hint = 1
  50.  
  51. GtkEntry::progress-border = { 2, 2, 2, 2 }
  52.  
  53. ####################
  54. # Color Definitions
  55. ####################
  56. bg[NORMAL] = @bg_color
  57. bg[PRELIGHT] = shade (1.02, @bg_color)
  58. bg[SELECTED] = @selected_bg_color
  59. bg[INSENSITIVE] = @bg_color
  60. bg[ACTIVE] = shade (0.9, @bg_color)
  61.  
  62. fg[NORMAL] = @fg_color
  63. fg[PRELIGHT] = @fg_color
  64. fg[SELECTED] = @selected_fg_color
  65. fg[INSENSITIVE] = darker (@bg_color)
  66. fg[ACTIVE] = @fg_color
  67.  
  68. text[NORMAL] = @text_color
  69. text[PRELIGHT] = @text_color
  70. text[SELECTED] = @selected_fg_color
  71. text[INSENSITIVE] = darker (@bg_color)
  72. text[ACTIVE] = @selected_fg_color
  73.  
  74. base[NORMAL] = @base_color
  75. base[PRELIGHT] = shade (0.95, @bg_color)
  76. base[SELECTED] = @selected_bg_color
  77. base[INSENSITIVE] = @bg_color
  78. base[ACTIVE] = shade (0.9, @selected_bg_color)
  79.  
  80. engine "clearlooks" {
  81. colorize_scrollbar = TRUE
  82. reliefstyle = 1
  83. menubarstyle = 2
  84. toolbarstyle = 0
  85. animation = FALSE
  86. radius = 3.0
  87. style = GUMMY
  88.  
  89. # Set a hint to disable backward compatibility
  90. fallbacks.
  91. hint = "use-hints"
  92. }
  93. }
  94.  
  95. style "wide" {
  96. xthickness = 2
  97. ythickness = 2
  98. }
  99.  
  100. style "wider" {
  101. xthickness = 3
  102. ythickness = 3
  103. }
  104.  
  105. style "entry" {
  106. xthickness = 3
  107. ythickness = 3
  108.  
  109. bg[SELECTED] = mix (0.4, @selected_bg_color, @base_color)
  110. fg[SELECTED] = @text_color
  111.  
  112. engine "clearlooks" {
  113. focus_color = shade (0.65, @selected_bg_color)
  114. }
  115. }
  116.  
  117. style "spinbutton" {
  118.  
  119. engine "clearlooks" {
  120. hint = "spinbutton"
  121. }
  122. }
  123.  
  124. style "scale" {
  125. xthickness = 2
  126. ythickness = 2
  127.  
  128. engine "clearlooks" {
  129. hint = "scale"
  130. }
  131. }
  132.  
  133. style "vscale" {
  134.  
  135. engine "clearlooks" {
  136. hint = "vscale"
  137. }
  138. }
  139.  
  140. style "hscale" {
  141.  
  142. engine "clearlooks" {
  143. hint = "hscale"
  144. }
  145. }
  146.  
  147. style "scrollbar" {
  148. xthickness = 2
  149. ythickness = 2
  150.  
  151. engine "clearlooks" {
  152. hint = "scrollbar"
  153. }
  154. }
  155.  
  156. style "hscrollbar" {
  157.  
  158. engine "clearlooks" {
  159. hint = "hscrollbar"
  160. }
  161. }
  162.  
  163. style "vscrollbar" {
  164.  
  165. engine "clearlooks" {
  166. hint = "vscrollbar"
  167. }
  168. }
  169.  
  170. style "notebook_bg" {
  171.  
  172. bg[NORMAL] = shade (1.02, @bg_color)
  173. }
  174.  
  175. style "button" {
  176. xthickness = 3
  177. ythickness = 3
  178.  
  179. bg[NORMAL] = shade (1.04, @bg_color)
  180. bg[PRELIGHT] = shade (1.06, @bg_color)
  181. bg[ACTIVE] = shade (0.85, @bg_color)
  182. }
  183.  
  184. # The color is changed by the notebook_bg style, this style
  185. # changes the x/ythickness
  186. style "notebook" {
  187. xthickness = 3
  188. ythickness = 3
  189. }
  190.  
  191. style "statusbar" {
  192.  
  193. engine "clearlooks" {
  194. hint = "statusbar"
  195. }
  196. }
  197.  
  198. style "comboboxentry" {
  199.  
  200. engine "clearlooks" {
  201. # Note:
  202. # If you set the appears-as-list option on comboboxes in
  203. the theme,
  204. # then you should set this hint on the combobox instead.
  205. hint = "comboboxentry"
  206. }
  207. }
  208.  
  209. style "menubar" {
  210.  
  211. GtkWidget::window-dragging = 1
  212.  
  213. engine "clearlooks" {
  214. hint = "menubar"
  215. }
  216. }
  217.  
  218. style "menu" {
  219. xthickness = 0
  220. ythickness = 0
  221.  
  222. bg[NORMAL] = shade (1.08, @bg_color)
  223.  
  224. engine "clearlooks" {
  225. radius = 0.0
  226. }
  227. }
  228.  
  229. style "menu_item" {
  230. xthickness = 2
  231. ythickness = 3
  232.  
  233. fg[PRELIGHT] = @selected_fg_color
  234. }
  235.  
  236. # This style is there to modify the separator menu items. The goals are:
  237. # 1. Get a specific height.
  238. # 2. The line should go to the edges (ie. no border at the left/right)
  239. style "separator_menu_item" {
  240. xthickness = 1
  241. ythickness = 0
  242.  
  243. GtkSeparatorMenuItem::horizontal-padding = 0
  244. GtkWidget::wide-separators = 1
  245. GtkWidget::separator-width = 1
  246. GtkWidget::separator-height = 7
  247. }
  248.  
  249. style "frame_title" {
  250.  
  251. fg[NORMAL] = lighter (@fg_color)
  252. }
  253.  
  254. style "treeview" {
  255.  
  256. engine "clearlooks" {
  257. hint = "treeview"
  258. }
  259. }
  260.  
  261. # The almost useless progress bar style
  262. style "progressbar" {
  263. xthickness = 1
  264. ythickness = 1
  265.  
  266. fg[PRELIGHT] = @selected_fg_color
  267.  
  268. engine "clearlooks" {
  269. # Explicitly set the radius for the progress bars inside
  270. menu items.
  271. radius = 3.0
  272.  
  273. hint = "progressbar"
  274. }
  275. }
  276.  
  277. # This style is based on the default style, so that the colors from the
  278. button
  279. # style are overriden again.
  280. style "treeview_header" = "default" {
  281. xthickness = 2
  282. ythickness = 1
  283.  
  284. engine "clearlooks" {
  285. hint = "treeview-header"
  286. }
  287. }
  288.  
  289. style "tooltips" {
  290. xthickness = 8
  291. ythickness = 4
  292.  
  293. GtkWidget::new-tooltip-style = 1
  294.  
  295. bg[NORMAL] = @tooltip_bg_color
  296. fg[NORMAL] = @tooltip_fg_color
  297. }
  298.  
  299. style "nautilus_location" {
  300.  
  301. bg[NORMAL] = mix (0.60, shade (1.05, @bg_color),
  302. @selected_bg_color)
  303. }
  304.  
  305. # Wrokaroudn style for places where the text color is used instead of
  306. the fg color.
  307. style "text_is_fg_color_workaround" {
  308.  
  309. text[NORMAL] = @fg_color
  310. text[PRELIGHT] = @fg_color
  311. text[SELECTED] = @selected_fg_color
  312. text[ACTIVE] = @fg_color
  313. text[INSENSITIVE] = darker (@bg_color)
  314. }
  315.  
  316. # Workaround style for menus where the text color is used instead of the
  317. fg color.
  318. style "menuitem_text_is_fg_color_workaround" {
  319.  
  320. text[NORMAL] = @fg_color
  321. text[PRELIGHT] = @selected_fg_color
  322. text[SELECTED] = @selected_fg_color
  323. text[ACTIVE] = @fg_color
  324. text[INSENSITIVE] = darker (@bg_color)
  325. }
  326.  
  327. # Workaround style for places where the fg color is used instead of the
  328. text color.
  329. style "fg_is_text_color_workaround" {
  330.  
  331. fg[NORMAL] = @text_color
  332. fg[PRELIGHT] = @text_color
  333. fg[SELECTED] = @selected_fg_color
  334. fg[ACTIVE] = @selected_fg_color
  335. fg[INSENSITIVE] = darker (@bg_color)
  336. }
  337.  
  338. # Style to set the toolbar to use a flat style. This is because the
  339. "New" button in
  340. # Evolution is not drawn transparent. So if there is a gradient in the
  341. background it will
  342. # look really wrong.
  343. # See http://bugzilla.gnome.org/show_bug.cgi?id=446953.
  344. style "evo_new_button_workaround" {
  345.  
  346. engine "clearlooks" {
  347. toolbarstyle = 0
  348. }
  349. }
  350.  
  351.  
  352. ###############################################################################
  353. # The following part of the gtkrc applies the different styles to the
  354. widgets.
  355. ###############################################################################
  356.  
  357. # The default style is applied to every widget
  358. class "GtkWidget" style "default"
  359.  
  360. class "GtkSeparator" style "wide"
  361. class "GtkFrame" style "wide"
  362. class "GtkCalendar" style "wide"
  363. class "GtkEntry" style "entry"
  364.  
  365. class "GtkSpinButton" style "spinbutton"
  366. class "GtkScale" style "scale"
  367. class "GtkVScale" style "vscale"
  368. class "GtkHScale" style "hscale"
  369. class "GtkScrollbar" style "scrollbar"
  370. class "GtkHScrollbar" style "hscrollbar"
  371. class "GtkVScrollbar" style "vscrollbar"
  372.  
  373. # General matching follows. The order is choosen so that the right
  374. styles override
  375. # each other. EG. progressbar needs to be more important than the menu
  376. match.
  377. widget_class "*<GtkNotebook>" style "notebook_bg"
  378. # This is not perfect, it could be done better.
  379. # (That is modify *every* widget in the notebook, and change those back
  380. that
  381. # we really don't want changed)
  382. widget_class "*<GtkNotebook>*<GtkEventBox>" style "notebook_bg"
  383. widget_class "*<GtkNotebook>*<GtkDrawingArea>" style "notebook_bg"
  384. widget_class "*<GtkNotebook>*<GtkLayout>" style "notebook_bg"
  385. widget_class "*<GtkNotebook>*<GtkViewport>" style "notebook_bg"
  386. widget_class "*<GtkNotebook>*<GtkScrolledWindow>" style "notebook_bg"
  387.  
  388. widget_class "*<GtkButton>" style "button"
  389. widget_class "*<GtkNotebook>" style "notebook"
  390. widget_class "*<GtkStatusbar>*" style "statusbar"
  391.  
  392. widget_class "*<GtkComboBoxEntry>*" style "comboboxentry"
  393. widget_class "*<GtkCombo>*" style "comboboxentry"
  394.  
  395. widget_class "*<GtkMenuBar>*" style "menubar"
  396. widget_class "*<GtkMenu>*" style "menu"
  397. widget_class "*<GtkMenuItem>*" style "menu_item"
  398. widget_class "*<GtkSeparatorMenuItem>*" style "separator_menu_item"
  399.  
  400. widget_class "*.<GtkFrame>.<GtkLabel>" style "frame_title"
  401. widget_class "*.<GtkTreeView>*" style "treeview"
  402.  
  403. widget_class "*<GtkProgress>" style "progressbar"
  404.  
  405. # Treeview headers (and similar stock GTK+ widgets)
  406. widget_class "*.<GtkTreeView>.<GtkButton>" style "treeview_header"
  407. widget_class "*.<GtkCTree>.<GtkButton>" style "treeview_header"
  408. widget_class "*.<GtkList>.<GtkButton>" style "treeview_header"
  409. widget_class "*.<GtkCList>.<GtkButton>" style "treeview_header"
  410.  
  411. # The window of the tooltip is called "gtk-tooltip"
  412. ##################################################################
  413. # FIXME:
  414. # This will not work if one embeds eg. a button into the tooltip.
  415. # As far as I can tell right now we will need to rework the theme
  416. # quite a bit to get this working correctly.
  417. # (It will involve setting different priorities, etc.)
  418. ##################################################################
  419. widget "gtk-tooltip*" style "tooltips"
  420.  
  421. ##########################################################################
  422. # Following are special cases and workarounds for issues in
  423. applications.
  424. ##########################################################################
  425.  
  426. # Workaround for the evolution ETable (bug #527532)
  427. widget_class "*.ETable.ECanvas" style "treeview_header"
  428. # Workaround for the evolution ETree
  429. widget_class "*.ETree.ECanvas" style "treeview_header"
  430.  
  431. # Special case the nautilus-extra-view-widget
  432. # ToDo: A more generic approach for all applications that have a widget
  433. like this.
  434. widget "*.nautilus-extra-view-widget" style : highest
  435. "nautilus_location"
  436.  
  437. # Work around for http://bugzilla.gnome.org/show_bug.cgi?id=382646
  438. # Note that this work around assumes that the combobox is _not_ in
  439. appears-as-list mode.
  440. widget_class "*.<GtkComboBox>.<GtkCellView>" style
  441. "text_is_fg_color_workaround"
  442. # This is the part of the workaround that fixes the menus
  443. widget "*.gtk-combobox-popup-menu.*" style
  444. "menuitem_text_is_fg_color_workaround"
  445.  
  446. # Work around the usage of GtkLabel inside GtkListItems to display text.
  447. # This breaks because the label is shown on a background that is based
  448. on the base color.
  449. widget_class "*<GtkListItem>*" style "fg_is_text_color_workaround"
  450. # GtkCList also uses the fg color to draw text on top of the base
  451. colors.
  452. widget_class "*<GtkCList>" style "fg_is_text_color_workaround"
  453. # Nautilus when renaming files, and maybe other places.
  454. widget_class "*<EelEditableLabel>" style "fg_is_text_color_workaround"
  455.  
  456. # See the documentation of the style.
  457. widget_class
  458. "EShellWindow.GtkVBox.BonoboDock.BonoboDockBand.BonoboDockItem*" style
  459. "evo_new_button_workaround"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement