[gtk+/gtk-3-18] gtkplacesview: rotate server list icon on toggled
- From: Carlos Soriano Sánchez <csoriano src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-3-18] gtkplacesview: rotate server list icon on toggled
- Date: Thu, 15 Oct 2015 18:10:10 +0000 (UTC)
commit 8bb36ed031b407a8183cca746754af46dc8a00fd
Author: Carlos Soriano <csoriano gnome org>
Date: Thu Sep 24 11:04:39 2015 +0200
gtkplacesview: rotate server list icon on toggled
Disclosure triangles are usually used pointing down, however
in this case the popover spawns in the upper direction, which
makes it odd looking.
Instead of pointing always down or up, point down when not toggled and
animate a rotation when toggled.
https://bugzilla.gnome.org/show_bug.cgi?id=756568
gtk/theme/Adwaita/_common.scss | 16 ++++++++++++++++
gtk/theme/Adwaita/gtk-contained-dark.css | 10 ++++++++++
gtk/theme/Adwaita/gtk-contained.css | 10 ++++++++++
gtk/ui/gtkplacesview.ui | 5 ++++-
4 files changed, 40 insertions(+), 1 deletions(-)
---
diff --git a/gtk/theme/Adwaita/_common.scss b/gtk/theme/Adwaita/_common.scss
index bc2e38e..a20d633 100644
--- a/gtk/theme/Adwaita/_common.scss
+++ b/gtk/theme/Adwaita/_common.scss
@@ -2953,6 +2953,22 @@ GtkPlacesSidebar.sidebar {
}
}
+/****************
+ * File chooser *
+ ****************/
+
+GtkPlacesView {
+ .server-list-button > GtkImage {
+ transition: 200ms $ease-out-quad;
+ -gtk-icon-transform: rotate(0turn);
+ }
+
+ .server-list-button:checked > GtkImage {
+ transition: 200ms $ease-out-quad;
+ -gtk-icon-transform: rotate(-0.5turn);
+ }
+}
+
/*********
* Paned *
*********/
diff --git a/gtk/theme/Adwaita/gtk-contained-dark.css b/gtk/theme/Adwaita/gtk-contained-dark.css
index faae2c9..2866465 100644
--- a/gtk/theme/Adwaita/gtk-contained-dark.css
+++ b/gtk/theme/Adwaita/gtk-contained-dark.css
@@ -3914,6 +3914,16 @@ GtkPlacesSidebar.sidebar .sidebar-new-bookmark-row {
.sidebar-item.needs-attention > .label {
background-size: 6px 6px, 0 0; }
+/****************
+ * File chooser *
+ ****************/
+GtkPlacesView .server-list-button > GtkImage {
+ transition: 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
+ -gtk-icon-transform: rotate(0turn); }
+GtkPlacesView .server-list-button:checked > GtkImage {
+ transition: 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
+ -gtk-icon-transform: rotate(-0.5turn); }
+
/*********
* Paned *
*********/
diff --git a/gtk/theme/Adwaita/gtk-contained.css b/gtk/theme/Adwaita/gtk-contained.css
index 3997f23..d631822 100644
--- a/gtk/theme/Adwaita/gtk-contained.css
+++ b/gtk/theme/Adwaita/gtk-contained.css
@@ -4086,6 +4086,16 @@ GtkPlacesSidebar.sidebar .sidebar-new-bookmark-row {
.sidebar-item.needs-attention > .label {
background-size: 6px 6px, 0 0; }
+/****************
+ * File chooser *
+ ****************/
+GtkPlacesView .server-list-button > GtkImage {
+ transition: 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
+ -gtk-icon-transform: rotate(0turn); }
+GtkPlacesView .server-list-button:checked > GtkImage {
+ transition: 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
+ -gtk-icon-transform: rotate(-0.5turn); }
+
/*********
* Paned *
*********/
diff --git a/gtk/ui/gtkplacesview.ui b/gtk/ui/gtkplacesview.ui
index d554c28..6978255 100644
--- a/gtk/ui/gtkplacesview.ui
+++ b/gtk/ui/gtkplacesview.ui
@@ -256,10 +256,13 @@
<property name="receives_default">1</property>
<property name="direction">up</property>
<property name="popover">recent_servers_popover</property>
+ <style>
+ <class name="server-list-button"/>
+ </style>
<child>
<object class="GtkImage">
<property name="visible">1</property>
- <property name="icon_name">pan-up-symbolic</property>
+ <property name="icon_name">pan-down-symbolic</property>
</object>
</child>
</object>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]