[gitg] Use sidebar css style
- From: Jesse van den Kieboom <jessevdk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gitg] Use sidebar css style
- Date: Tue, 16 Oct 2012 19:49:51 +0000 (UTC)
commit 9d8643f4b820d3595b9136444eaf27fb4f1e5780
Author: Jesse van den Kieboom <jesse vandenkieboom epfl ch>
Date: Tue Oct 16 21:49:43 2012 +0200
Use sidebar css style
gitg/resources/ui/gitg-window.ui | 3 ++
gitg/resources/ui/style.css | 12 --------
libgitg-ext/gitg-ext-navigation-tree-view.vala | 33 ------------------------
3 files changed, 3 insertions(+), 45 deletions(-)
---
diff --git a/gitg/resources/ui/gitg-window.ui b/gitg/resources/ui/gitg-window.ui
index 701767f..b0c5427 100644
--- a/gitg/resources/ui/gitg-window.ui
+++ b/gitg/resources/ui/gitg-window.ui
@@ -93,6 +93,9 @@
<object class="GtkEventBox" id="navigation_background">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <style>
+ <class name="sidebar"/>
+ </style>
<child>
<object class="GtkGrid" id="grid_navigation">
<property name="visible">True</property>
diff --git a/gitg/resources/ui/style.css b/gitg/resources/ui/style.css
index f6292b6..5f02f4c 100644
--- a/gitg/resources/ui/style.css
+++ b/gitg/resources/ui/style.css
@@ -47,13 +47,6 @@ GtkToolbar#toolbar_subnav {
background-image: none;
}
-#tree_view_navigation {
- background-color: inherit;
- background-image: none;
- color: inherit;
- background-color: shade(@theme_bg_color, 0.9);
-}
-
#paned_main {
border-style: solid;
border-color: @borders;
@@ -63,11 +56,6 @@ GtkToolbar#toolbar_subnav {
background-color: inherit;
}
-#tree_view_navigation.view:selected {
- background-color: @theme_selected_bg_color;
- color: @theme_selected_fg_color;
-}
-
GtkLabel.title {
font-weight: bold;
font-size: 16;
diff --git a/libgitg-ext/gitg-ext-navigation-tree-view.vala b/libgitg-ext/gitg-ext-navigation-tree-view.vala
index 9b82c4f..96e99cb 100644
--- a/libgitg-ext/gitg-ext-navigation-tree-view.vala
+++ b/libgitg-ext/gitg-ext-navigation-tree-view.vala
@@ -350,11 +350,6 @@ public class NavigationRendererText : Gtk.CellRendererText
int xpad = 3;
- if (hint != Hint.HEADER)
- {
- cell_area.x -= 15;
- }
-
if (d_pixbuf == null)
{
base.render(ctx, widget, background_area, cell_area, state);
@@ -377,9 +372,6 @@ public class NavigationRendererText : Gtk.CellRendererText
public class NavigationTreeView : Gtk.TreeView
{
- private Gdk.RGBA d_header_bg;
- private Gdk.RGBA d_header_fg;
-
construct
{
var model = new NavigationTreeModel();
@@ -399,17 +391,6 @@ public class NavigationTreeView : Gtk.TreeView
Gtk.CellRendererText t = cell as Gtk.CellRendererText;
- if (hint == Hint.HEADER && (model as Gtk.TreeStore).iter_depth(iter) == 0)
- {
- t.background_rgba = d_header_bg;
- t.foreground_rgba = d_header_fg;
- }
- else
- {
- t.background_set = false;
- t.foreground_set = false;
- }
-
if (hint == Hint.HEADER)
{
t.weight = Pango.Weight.BOLD;
@@ -440,8 +421,6 @@ public class NavigationTreeView : Gtk.TreeView
return hint != Hint.HEADER;
});
- update_header_colors();
-
get_selection().changed.connect((sel) => {
Gtk.TreeIter iter;
@@ -452,18 +431,6 @@ public class NavigationTreeView : Gtk.TreeView
});
}
- protected override void style_updated()
- {
- base.style_updated();
- update_header_colors();
- }
-
- private void update_header_colors()
- {
- get_style_context().lookup_color("insensitive_bg_color", out d_header_bg);
- get_style_context().lookup_color("insensitive_fg_color", out d_header_fg);
- }
-
public new NavigationTreeModel model
{
get { return base.get_model() as NavigationTreeModel; }
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]