[dconf-editor] Add an icon next to edited keys.
- From: Arnaud Bonatti <arnaudb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [dconf-editor] Add an icon next to edited keys.
- Date: Wed, 13 Dec 2017 18:33:59 +0000 (UTC)
commit 46f2ee84ae22f3940b3b42d8cb49a991e2c28617
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date: Tue Dec 12 16:45:39 2017 +0100
Add an icon next to edited keys.
editor/dconf-editor.css | 14 +++++++++-----
editor/key-list-box-row.vala | 11 +++++++----
2 files changed, 16 insertions(+), 9 deletions(-)
---
diff --git a/editor/dconf-editor.css b/editor/dconf-editor.css
index b413d3e..1cf1858 100644
--- a/editor/dconf-editor.css
+++ b/editor/dconf-editor.css
@@ -141,11 +141,15 @@
.small-keys-list-rows .keys-list:dir(rtl) > row > .key { background-position:calc(100%
- 0.75rem) center; }
/* icons */
-.keys-list > row > .key.delayed,
-.keys-list > row > .dconf-key.key.delayed {
background-image:-gtk-icontheme("document-open-recent-symbolic"); }
-.keys-list > row > .dconf-key.key {
background-image:-gtk-icontheme("dialog-question-symbolic"); }
-.keys-list > row > .erase.dconf-key.key.delayed { background-image:-gtk-icontheme("user-trash-symbolic"); }
-.keys-list > row > .erase.dconf-key.key {
background-image:-gtk-icontheme("action-unavailable-symbolic"); }
+.keys-list > row > .key.delayed,
+.keys-list > row > .dconf-key.key.delayed,
+.keys-list > row > .edited.gsettings-key.key.delayed {
background-image:-gtk-icontheme("document-open-recent-symbolic"); }
+
+.keys-list > row > .edited.gsettings-key.key {
background-image:-gtk-icontheme("document-edit-symbolic"); }
+
+.keys-list > row > .dconf-key.key {
background-image:-gtk-icontheme("dialog-question-symbolic"); }
+.keys-list > row > .erase.dconf-key.key.delayed {
background-image:-gtk-icontheme("user-trash-symbolic"); }
+.keys-list > row > .erase.dconf-key.key {
background-image:-gtk-icontheme("action-unavailable-symbolic"); }
/*\
* * pathbar
diff --git a/editor/key-list-box-row.vala b/editor/key-list-box-row.vala
index bca2489..5243f42 100644
--- a/editor/key-list-box-row.vala
+++ b/editor/key-list-box-row.vala
@@ -294,8 +294,7 @@ private class KeyListBoxRowEditableNoSchema : KeyListBoxRow
construct
{
- StyleContext main_context = get_style_context ();
- main_context.add_class ("dconf-key");
+ get_style_context ().add_class ("dconf-key");
if (boolean_switch != null)
((!) boolean_switch).notify ["active"].connect (() => key.value = new Variant.boolean (((!)
boolean_switch).get_active ()));
@@ -421,8 +420,7 @@ private class KeyListBoxRowEditable : KeyListBoxRow
construct
{
-// StyleContext main_context = get_style_context ();
-// main_context.add_class ("gsettings-key");
+ get_style_context ().add_class ("gsettings-key");
if (boolean_switch != null)
boolean_switch_toggled_handler = ((!) boolean_switch).notify ["active"].connect (() => {
@@ -464,13 +462,18 @@ private class KeyListBoxRowEditable : KeyListBoxRow
((!) boolean_switch).set_active (boolean);
}
}
+ StyleContext css_context = get_style_context ();
if (key.is_default)
{
+ css_context.remove_class ("edited");
+
if (name_context.has_class ("bold-label")) name_context.remove_class ("bold-label");
if (value_context.has_class ("bold-label")) value_context.remove_class ("bold-label");
}
else
{
+ css_context.add_class ("edited");
+
if (!name_context.has_class ("bold-label")) name_context.add_class ("bold-label");
if (!value_context.has_class ("bold-label")) value_context.add_class ("bold-label");
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]