[gnome-builder/wip/chergert/layout] project-tree: style things similar to the mockup
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/chergert/layout] project-tree: style things similar to the mockup
- Date: Wed, 5 Jul 2017 14:07:50 +0000 (UTC)
commit 9e24d34fad66d48ca899e54fa38dd34de174ccb2
Author: Christian Hergert <chergert redhat com>
Date: Wed Jul 5 07:07:38 2017 -0700
project-tree: style things similar to the mockup
While we will still likely use the DzlStackList for the default
implementation of the project-tree, or GtkTreeView based version can still
be rather sleek if we tweak some CSS and properties.
This removes the expander column since all of our expansions look like
folders anyway. We tweak the spacing and use level-indentation to get
the same indentation effect per-level.
plugins/project-tree/gb-project-tree-addin.c | 2 ++
plugins/project-tree/gb-project-tree.gresource.xml | 1 +
plugins/project-tree/themes/shared.css | 12 ++++++++++++
3 files changed, 15 insertions(+), 0 deletions(-)
---
diff --git a/plugins/project-tree/gb-project-tree-addin.c b/plugins/project-tree/gb-project-tree-addin.c
index b39b3e2..f485aed 100644
--- a/plugins/project-tree/gb-project-tree-addin.c
+++ b/plugins/project-tree/gb-project-tree-addin.c
@@ -73,12 +73,14 @@ gb_project_tree_addin_load (IdeWorkbenchAddin *addin,
self->tree = g_object_new (GB_TYPE_PROJECT_TREE,
"headers-visible", FALSE,
+ "level-indentation", 22,
"visible", TRUE,
NULL);
g_signal_connect (self->tree,
"destroy",
G_CALLBACK (gtk_widget_destroyed),
&self->tree);
+ dzl_gtk_widget_add_style_class (GTK_WIDGET (self->tree), "project-tree");
gtk_container_add (GTK_CONTAINER (scroller), GTK_WIDGET (self->tree));
ide_editor_sidebar_add_section (sidebar,
diff --git a/plugins/project-tree/gb-project-tree.gresource.xml
b/plugins/project-tree/gb-project-tree.gresource.xml
index c6dbf30..f7d3512 100644
--- a/plugins/project-tree/gb-project-tree.gresource.xml
+++ b/plugins/project-tree/gb-project-tree.gresource.xml
@@ -4,5 +4,6 @@
<file>gb-new-file-popover.ui</file>
<file>gb-rename-file-popover.ui</file>
<file>gtk/menus.ui</file>
+ <file>themes/shared.css</file>
</gresource>
</gresources>
diff --git a/plugins/project-tree/themes/shared.css b/plugins/project-tree/themes/shared.css
new file mode 100644
index 0000000..e0b89f5
--- /dev/null
+++ b/plugins/project-tree/themes/shared.css
@@ -0,0 +1,12 @@
+ideeditorsidebar treeview.project-tree:not(:selected) {
+ -GtkTreeView-expander-size: 0;
+ -GtkTreeView-horizontal-separator: 0;
+ -GtkTreeView-vertical-separator: 6;
+ -gtk-icon-source: none;
+ background: transparent;
+ color: @theme_fg_color;
+ padding-left: 6px;
+}
+ideeditorsidebar treeview.project-tree:not(:selected):backdrop {
+ color: @theme_unfocused_fg_color;
+}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]