[gnome-software/wip/aday/text-styles] Apply standard text styles



commit 7393ae6eb906b62468872a4a93324fa913b8df74
Author: Allan Day <allanpday gmail com>
Date:   Wed May 8 16:49:35 2019 +0100

    Apply standard text styles
    
    Experiment to use standardised text styles.
    
    https://gitlab.gnome.org/GNOME/gtk/issues/1808

 src/gs-app-row.ui            |  8 ++++----
 src/gs-app-tile.ui           |  8 +-------
 src/gs-category-page.ui      |  2 +-
 src/gs-details-page.ui       |  8 ++++----
 src/gs-installed-page.c      |  2 +-
 src/gs-origin-popover-row.ui | 12 ++++++------
 src/gs-overview-page.ui      |  8 ++++----
 src/gs-review-row.ui         |  2 +-
 src/gs-update-dialog.c       |  2 +-
 src/gs-updates-section.c     |  1 +
 src/gtk-style.css            | 27 ---------------------------
 11 files changed, 24 insertions(+), 56 deletions(-)
---
diff --git a/src/gs-app-row.ui b/src/gs-app-row.ui
index 69da5193..ee476c03 100644
--- a/src/gs-app-row.ui
+++ b/src/gs-app-row.ui
@@ -47,9 +47,9 @@
                 <property name="ellipsize">end</property>
                 <property name="lines">3</property>
                 <property name="wrap-mode">word-char</property>
-                <attributes>
-                  <attribute name="weight" value="bold"/>
-                </attributes>
+                <style>
+                  <class name="type-heading"/>
+                </style>
               </object>
             </child>
             <child>
@@ -150,7 +150,7 @@
                         <property name="hexpand">True</property>
                         <property name="ellipsize">end</property>
                         <style>
-                          <class name="app-row-origin-text"/>
+                          <class name="type-caption"/>
                           <class name="dim-label"/>
                         </style>
                       </object>
diff --git a/src/gs-app-tile.ui b/src/gs-app-tile.ui
index 167db8a1..dd9f7d9a 100644
--- a/src/gs-app-tile.ui
+++ b/src/gs-app-tile.ui
@@ -87,11 +87,8 @@
                     <property name="visible">True</property>
                     <property name="ellipsize">end</property>
                     <property name="xalign">0.0</property>
-                    <attributes>
-                      <attribute name="weight" value="bold"/>
-                    </attributes>
                     <style>
-                      <class name="app-tile-label"/>
+                      <class name="type-heading"/>
                     </style>
                   </object>
                   <packing>
@@ -110,9 +107,6 @@
                     <property name="lines">2</property>
                     <property name="vexpand">True</property>
                     <property name="single-line-mode">True</property>
-                    <style>
-                      <class name="app-tile-label"/>
-                    </style>
                   </object>
                   <packing>
                     <property name="left-attach">1</property>
diff --git a/src/gs-category-page.ui b/src/gs-category-page.ui
index 593e1074..9ad4012d 100644
--- a/src/gs-category-page.ui
+++ b/src/gs-category-page.ui
@@ -85,7 +85,7 @@
                                   <relation target="featured_grid" type="label-for"/>
                                 </accessibility>
                                 <style>
-                                  <class name="index-title-alignment-software"/>
+                                  <class name="type-title"/>
                                 </style>
                               </object>
                             </child>
diff --git a/src/gs-details-page.ui b/src/gs-details-page.ui
index a3c4b94e..704e8756 100644
--- a/src/gs-details-page.ui
+++ b/src/gs-details-page.ui
@@ -99,7 +99,7 @@
                                     <property name="wrap">True</property>
                                     <property name="max_width_chars">20</property>
                                     <style>
-                                      <class name="application-details-title"/>
+                                      <class name="type-title"/>
                                     </style>
                                   </object>
                                 </child>
@@ -434,7 +434,7 @@
                             <property name="xalign">0</property>
                             <property name="label" translatable="yes">Details</property>
                             <style>
-                              <class name="application-details-title"/>
+                              <class name="type-heading"/>
                             </style>
                           </object>
                         </child>
@@ -993,7 +993,7 @@
                                     <property name="xalign">0</property>
                                     <property name="label" translatable="yes">Add-ons</property>
                                     <style>
-                                      <class name="application-details-title"/>
+                                      <class name="type-heading"/>
                                     </style>
                                   </object>
                                 </child>
@@ -1043,7 +1043,7 @@
                                 <property name="xalign">0</property>
                                 <property name="label" translatable="yes" comments="Translators: Header of 
the section with other users&apos; opinions about the app.">Reviews</property>
                                 <style>
-                                  <class name="application-details-title"/>
+                                  <class name="type-heading"/>
                                 </style>
                               </object>
                             </child>
diff --git a/src/gs-installed-page.c b/src/gs-installed-page.c
index 8b46e358..9321d944 100644
--- a/src/gs-installed-page.c
+++ b/src/gs-installed-page.c
@@ -483,7 +483,7 @@ gs_installed_page_get_section_header (GsInstalledPageSection section)
                GtkStyleContext *context = gtk_widget_get_style_context (header);
                gtk_label_set_xalign (GTK_LABEL (header), 0.0);
                gtk_style_context_add_class (context, "app-listbox-header");
-               gtk_style_context_add_class (context, "app-listbox-header-title");
+               gtk_style_context_add_class (context, "type-heading");
        }
        return header;
 }
diff --git a/src/gs-origin-popover-row.ui b/src/gs-origin-popover-row.ui
index 7cb4fe69..321f508b 100644
--- a/src/gs-origin-popover-row.ui
+++ b/src/gs-origin-popover-row.ui
@@ -34,7 +34,7 @@
                     <property name="xalign">0</property>
                     <property name="label" translatable="yes">URL</property>
                     <style>
-                      <class name="app-row-origin-text"/>
+                      <class name="type-caption"/>
                       <class name="dim-label"/>
                     </style>
                   </object>
@@ -45,7 +45,7 @@
                     <property name="halign">start</property>
                     <property name="ellipsize">end</property>
                     <style>
-                      <class name="app-row-origin-text"/>
+                      <class name="type-caption"/>
                     </style>
                   </object>
                 </child>
@@ -63,7 +63,7 @@
                     <property name="xalign">0</property>
                     <property name="label" translatable="yes" comments="Translators: The packaging format of 
the app being installed, e.g. 'RPM' or 'Flatpak'">Format</property>
                     <style>
-                      <class name="app-row-origin-text"/>
+                      <class name="type-caption"/>
                       <class name="dim-label"/>
                     </style>
                   </object>
@@ -74,7 +74,7 @@
                     <property name="halign">start</property>
                     <property name="ellipsize">end</property>
                     <style>
-                      <class name="app-row-origin-text"/>
+                      <class name="type-caption"/>
                     </style>
                   </object>
                 </child>
@@ -92,7 +92,7 @@
                     <property name="xalign">0</property>
                     <property name="label" translatable="yes" comments="Translators: The installation 
location for flatpaks, e.g. 'user' or 'system'">Installation</property>
                     <style>
-                      <class name="app-row-origin-text"/>
+                      <class name="type-caption"/>
                       <class name="dim-label"/>
                     </style>
                   </object>
@@ -103,7 +103,7 @@
                     <property name="halign">start</property>
                     <property name="ellipsize">end</property>
                     <style>
-                      <class name="app-row-origin-text"/>
+                      <class name="type-caption"/>
                     </style>
                   </object>
                 </child>
diff --git a/src/gs-overview-page.ui b/src/gs-overview-page.ui
index 21a19952..15a4a9ea 100644
--- a/src/gs-overview-page.ui
+++ b/src/gs-overview-page.ui
@@ -87,7 +87,7 @@
                               <relation target="flowbox_categories" type="label-for"/>
                             </accessibility>
                             <style>
-                              <class name="index-title-alignment-software"/>
+                              <class name="type-title"/>
                             </style>
                           </object>
                         </child>
@@ -120,7 +120,7 @@
                               <relation target="flowbox_categories" type="label-for"/>
                             </accessibility>
                             <style>
-                              <class name="index-title-alignment-software"/>
+                              <class name="type-title"/>
                             </style>
                           </object>
                         </child>
@@ -236,7 +236,7 @@
                               <relation target="box_popular" type="label-for"/>
                             </accessibility>
                             <style>
-                              <class name="index-title-alignment-software"/>
+                              <class name="type-title"/>
                             </style>
                           </object>
                         </child>
@@ -262,7 +262,7 @@
                               <relation target="box_recent" type="label-for"/>
                             </accessibility>
                             <style>
-                              <class name="index-title-alignment-software"/>
+                              <class name="type-title"/>
                             </style>
                           </object>
                         </child>
diff --git a/src/gs-review-row.ui b/src/gs-review-row.ui
index 3ed3c4e6..a314ad83 100644
--- a/src/gs-review-row.ui
+++ b/src/gs-review-row.ui
@@ -24,7 +24,7 @@
             <property name="hexpand">True</property>
             <property name="selectable">True</property>
             <style>
-              <class name="review-summary"/>
+              <class name="type-heading"/>
             </style>
           </object>
           <packing>
diff --git a/src/gs-update-dialog.c b/src/gs-update-dialog.c
index 70b7b904..9cfcfab7 100644
--- a/src/gs-update-dialog.c
+++ b/src/gs-update-dialog.c
@@ -552,7 +552,7 @@ get_section_header (GsUpdateDialog *dialog, GsUpdateDialogSection section)
        gtk_widget_set_margin_start (label, 6);
        gtk_label_set_xalign (GTK_LABEL (label), 0.0);
        context = gtk_widget_get_style_context (label);
-       gtk_style_context_add_class (context, "app-listbox-header-title");
+       gtk_style_context_add_class (context, "text-title");
 
        /* success */
        return header;
diff --git a/src/gs-updates-section.c b/src/gs-updates-section.c
index 384b5ae2..93f3b6c3 100644
--- a/src/gs-updates-section.c
+++ b/src/gs-updates-section.c
@@ -448,6 +448,7 @@ _build_section_header (GsUpdatesSection *self)
        gtk_label_set_xalign (GTK_LABEL (label), 0.0);
        context = gtk_widget_get_style_context (label);
        gtk_style_context_add_class (context, "app-listbox-header-title");
+       gtk_style_context_add_class (context, "type-heading");
 
        /* use a stack so we can switch which buttons are showing without the
         * sizegroup resizing */
diff --git a/src/gtk-style.css b/src/gtk-style.css
index 01a260d7..d80f2a02 100644
--- a/src/gtk-style.css
+++ b/src/gtk-style.css
@@ -24,11 +24,6 @@
        color: @theme_selected_fg_color;
   }
 
-.index-title-alignment-software {
-       font-weight: bold;
-       font-size: 125%;
-}
-
 .app-row-installed-label {
        color: @theme_selected_bg_color;
        font-size: smaller;
@@ -164,10 +159,6 @@
 .screenshot-image { border-radius: 5px; }
 .screenshot-image-thumb { border-radius: 3px; }
 
-.app-tile-label {
-       font-size: 105%;
-}
-
 .app-row-tag {
        text-shadow: none;
        color: @theme_selected_fg_color;
@@ -287,11 +278,6 @@
        text-shadow: none;
 }
 
-.application-details-title {
-       font-weight: bold;
-       font-size: 125%;
-}
-
 .application-details-webapp-warning {
        font-weight: bold;
 }
@@ -312,10 +298,6 @@
 
 .install-progress:dir(rtl) { background-position: 100% bottom; }
 
-.review-summary {
-       font-weight: bold;
-}
-
 .review-listbox {
        all: unset;
 }
@@ -366,10 +348,6 @@
        padding: 0px 15px;
 }
 
-.app-row-origin-text {
-       font-size: smaller;
-}
-
 .app-listbox-header {
        padding: 6px;
        background-image: none;
@@ -385,11 +363,6 @@
        border: 1px solid darker(@theme_bg_color);
 }
 
-.app-listbox-header-title {
-       font-size: 100%;
-       font-weight: bold;
-}
-
 .image-list {
        background-color: transparent;
 }


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