[fractal/multi-account] Replace AdwAvatar with a GtkImage in the "Add Login" row in the account switcher



commit 68f1d3eba7cc287d56050d7291e24392644a3eb9
Author: Alejandro Domínguez <adomu net-c com>
Date:   Mon Aug 2 18:09:57 2021 +0200

    Replace AdwAvatar with a GtkImage in the "Add Login" row in the account switcher

 data/resources/style.css     | 16 +++++++++++-----
 data/resources/ui/sidebar.ui | 30 +++++++++++++-----------------
 2 files changed, 24 insertions(+), 22 deletions(-)
---
diff --git a/data/resources/style.css b/data/resources/style.css
index 4431baaa..b6a0f67b 100644
--- a/data/resources/style.css
+++ b/data/resources/style.css
@@ -45,11 +45,8 @@ headerbar.flat {
   border-radius: 10px;
   margin-top: 3px;
   margin-bottom: 3px;
-}
-
-#account-switcher row box, #new-login box {
-  padding-top: 5px;
-  padding-bottom: 5px;
+  padding-top: 10px;
+  padding-bottom: 10px;
 }
 
 #account-switcher .selected-account avatar {
@@ -60,6 +57,15 @@ headerbar.flat {
   font-size: 12px;
 }
 
+#new-login-icon {
+  /*
+   *  2 * padding + pixel-size = size (of avatar)
+   */
+  padding: 10px;
+  background-color: lightgrey;
+  border-radius: 9999px;
+}
+
 /* Sidebar */
 .sidebar row {
   padding-left: 10px;
diff --git a/data/resources/ui/sidebar.ui b/data/resources/ui/sidebar.ui
index 7dbc621b..5f566c2a 100644
--- a/data/resources/ui/sidebar.ui
+++ b/data/resources/ui/sidebar.ui
@@ -51,25 +51,21 @@
                           <object class="GtkSeparator"></object>
                         </child>
                         <child>
-                          <object class="GtkButton" id="new_login">
+                          <object class="GtkBox">
                             <property name="name">new-login</property>
-                            <property name="action-name">app.new-login</property>
+                            <property name="orientation">horizontal</property>
+                            <property name="spacing">10</property>
                             <child>
-                              <object class="GtkBox">
-                                <property name="orientation">horizontal</property>
-                                <property name="spacing">10</property>
-                                <child>
-                                  <object class="AdwAvatar">
-                                    <property name="icon-name">list-add-symbolic</property>
-                                    <property name="size">40</property>
-                                  </object>
-                                </child>
-                                <child>
-                                  <object class="GtkLabel">
-                                    <property name="label" translatable="yes">_Add account</property>
-                                    <property name="use-underline">true</property>
-                                  </object>
-                                </child>
+                              <object class="GtkImage">
+                                <property name="name">new-login-icon</property>
+                                <property name="icon-name">list-add-symbolic</property>
+                                <property name="pixel-size">20</property>
+                              </object>
+                            </child>
+                            <child>
+                              <object class="GtkLabel">
+                                <property name="label" translatable="yes">_Add account</property>
+                                <property name="use-underline">true</property>
                               </object>
                             </child>
                           </object>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]