[dconf-editor] Make sidebar (min) width grow with font size.
- From: Arnaud Bonatti <arnaudb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [dconf-editor] Make sidebar (min) width grow with font size.
- Date: Fri, 11 Mar 2016 15:09:00 +0000 (UTC)
commit 9f4be9ae792b842058b96a7459281b41987ffc56
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date: Fri Mar 11 16:07:53 2016 +0100
Make sidebar (min) width grow with font size.
editor/dconf-editor.css | 20 ++++++++++++++++++++
editor/dconf-editor.gresource.xml | 1 +
editor/dconf-editor.ui | 4 +++-
editor/dconf-editor.vala | 4 ++++
4 files changed, 28 insertions(+), 1 deletions(-)
---
diff --git a/editor/dconf-editor.css b/editor/dconf-editor.css
new file mode 100644
index 0000000..8a286e9
--- /dev/null
+++ b/editor/dconf-editor.css
@@ -0,0 +1,20 @@
+/*
+ This file is part of Dconf Editor
+
+ Dconf Editor is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Dconf Editor is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Dconf Editor. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+scrolledwindow.sidebar {
+ min-width:15em;
+}
diff --git a/editor/dconf-editor.gresource.xml b/editor/dconf-editor.gresource.xml
index d2bc774..005978a 100644
--- a/editor/dconf-editor.gresource.xml
+++ b/editor/dconf-editor.gresource.xml
@@ -3,6 +3,7 @@
<gresource prefix="/ca/desrt/dconf-editor/ui">
<file preprocess="xml-stripblanks">bookmark.ui</file>
<file preprocess="xml-stripblanks">bookmarks.ui</file>
+ <file>dconf-editor.css</file>
<file preprocess="xml-stripblanks">dconf-editor.ui</file>
<file preprocess="xml-stripblanks">key-list-box-row.ui</file>
<file preprocess="xml-stripblanks">key-editor.ui</file>
diff --git a/editor/dconf-editor.ui b/editor/dconf-editor.ui
index e3eed95..b735799 100644
--- a/editor/dconf-editor.ui
+++ b/editor/dconf-editor.ui
@@ -143,7 +143,9 @@
<object class="GtkScrolledWindow">
<property name="visible">True</property>
<property name="hscrollbar-policy">never</property>
- <property name="width-request">222</property>
+ <style>
+ <class name="sidebar"/>
+ </style>
<child>
<object class="GtkTreeView" id="dir_tree_view">
<property name="visible">True</property>
diff --git a/editor/dconf-editor.vala b/editor/dconf-editor.vala
index 82a5f8c..856f83d 100644
--- a/editor/dconf-editor.vala
+++ b/editor/dconf-editor.vala
@@ -75,6 +75,10 @@ class ConfigurationEditor : Gtk.Application
add_action_entries (action_entries, this);
+ Gtk.CssProvider css_provider = new Gtk.CssProvider ();
+ css_provider.load_from_resource ("/ca/desrt/dconf-editor/ui/dconf-editor.css");
+ Gtk.StyleContext.add_provider_for_screen (Gdk.Screen.get_default (), css_provider,
Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION);
+
add_window (new DConfWindow ());
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]