[dconf-editor] Add "unavailable" icon for erased keys.
- From: Arnaud Bonatti <arnaudb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [dconf-editor] Add "unavailable" icon for erased keys.
- Date: Mon, 4 Dec 2017 16:31:57 +0000 (UTC)
commit 1edb0dce738528cd129975fd01fb1b222f181407
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date: Mon Dec 4 17:31:31 2017 +0100
Add "unavailable" icon for erased keys.
editor/dconf-editor.css | 13 ++++++++-----
editor/registry-search.vala | 10 ++++++++--
editor/registry-view.vala | 10 ++++++++--
3 files changed, 24 insertions(+), 9 deletions(-)
---
diff --git a/editor/dconf-editor.css b/editor/dconf-editor.css
index 62c7ea3..8897f2e 100644
--- a/editor/dconf-editor.css
+++ b/editor/dconf-editor.css
@@ -142,12 +142,15 @@
/* pending change icon */
- .keys-list > row > .key {
transition:background-position 0.3s; }
- .keys-list > row > .key.delayed {
background-image:-gtk-icontheme("document-open-recent-symbolic"); background-repeat:no-repeat; }
- .keys-list > row > .key.delayed.erase {
background-image:-gtk-icontheme("user-trash-symbolic"); }
+ .keys-list > row > .key {
transition:background-position 0.3s,
+
background-size 0.3s;
+
background-repeat:no-repeat;
+
background-size:1.5rem; }
+ .small-keys-list-rows .keys-list > row > .key {
background-size:1rem; }
- .keys-list > row > .key.delayed {
background-size:1.5rem; transition:background-size 0.3s; }
- .small-keys-list-rows .keys-list > row > .key.delayed {
background-size:1rem; }
+ .keys-list > row > .key.delayed {
background-image:-gtk-icontheme("document-open-recent-symbolic"); }
+ .keys-list > row > .key.delayed.erase {
background-image:-gtk-icontheme("user-trash-symbolic"); }
+ .keys-list > row > .key.erase {
background-image:-gtk-icontheme("action-unavailable-symbolic"); }
.keys-list:dir(ltr) > row > .key {
background-position: 0.75rem center; }
.keys-list:dir(rtl) > row > .key {
background-position:calc(100% - 0.75rem) center; }
diff --git a/editor/registry-search.vala b/editor/registry-search.vala
index 87ad7db..2a64c1a 100644
--- a/editor/registry-search.vala
+++ b/editor/registry-search.vala
@@ -202,9 +202,9 @@ class RegistrySearch : Grid, PathElement, BrowsableView
private void set_delayed_icon (ClickableListBoxRow row, Key key)
{
+ StyleContext context = row.get_style_context ();
if (key.planned_change)
{
- StyleContext context = row.get_style_context ();
context.add_class ("delayed");
if (key is DConfKey)
{
@@ -215,7 +215,13 @@ class RegistrySearch : Grid, PathElement, BrowsableView
}
}
else
- row.get_style_context ().remove_class ("delayed");
+ {
+ context.remove_class ("delayed");
+ if (key is DConfKey && ((DConfKey) key).is_ghost)
+ context.add_class ("erase");
+ else
+ context.remove_class ("erase");
+ }
}
private bool on_button_pressed (Widget widget, Gdk.EventButton event)
diff --git a/editor/registry-view.vala b/editor/registry-view.vala
index 7496e61..dabb988 100644
--- a/editor/registry-view.vala
+++ b/editor/registry-view.vala
@@ -191,9 +191,9 @@ class RegistryView : Grid, PathElement, BrowsableView
private void set_delayed_icon (ClickableListBoxRow row, Key key)
{
+ StyleContext context = row.get_style_context ();
if (key.planned_change)
{
- StyleContext context = row.get_style_context ();
context.add_class ("delayed");
if (key is DConfKey)
{
@@ -204,7 +204,13 @@ class RegistryView : Grid, PathElement, BrowsableView
}
}
else
- row.get_style_context ().remove_class ("delayed");
+ {
+ context.remove_class ("delayed");
+ if (key is DConfKey && ((DConfKey) key).is_ghost)
+ context.add_class ("erase");
+ else
+ context.remove_class ("erase");
+ }
}
private bool on_button_pressed (Widget widget, Gdk.EventButton event)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]