[gtk+] gtkplacesview: rotate server list icon on toggled
- From: Carlos Soriano Sánchez <csoriano src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] gtkplacesview: rotate server list icon on toggled
- Date: Thu, 15 Oct 2015 17:25:12 +0000 (UTC)
commit f9b6c07c8a425ea9359111c49c2aadfaf452a844
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 43bc9c2..df50fb9 100644
--- a/gtk/theme/Adwaita/_common.scss
+++ b/gtk/theme/Adwaita/_common.scss
@@ -2913,6 +2913,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 1f195d9..8d8deec 100644
--- a/gtk/theme/Adwaita/gtk-contained-dark.css
+++ b/gtk/theme/Adwaita/gtk-contained-dark.css
@@ -3966,6 +3966,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 e3684a6..0a5a44f 100644
--- a/gtk/theme/Adwaita/gtk-contained.css
+++ b/gtk/theme/Adwaita/gtk-contained.css
@@ -4138,6 +4138,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]