[gnome-software/wip/aday/text-styles: 1/2] Apply standard text styles
- From: Allan Day <allanday src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/wip/aday/text-styles: 1/2] Apply standard text styles
- Date: Wed, 29 May 2019 11:50:40 +0000 (UTC)
commit 191715414238ba2f8f891b3d3bac2515a60ea963
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-update-dialog.ui | 10 ++++++----
src/gs-updates-section.c | 1 +
src/gs-upgrade-banner.ui | 14 +++++++-------
src/gtk-style.css | 27 ---------------------------
13 files changed, 37 insertions(+), 67 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..09fa04df 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-1"/>
</style>
</object>
</child>
diff --git a/src/gs-details-page.ui b/src/gs-details-page.ui
index a3c4b94e..3cc41ecb 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-1"/>
</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-title-2"/>
</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-title-2"/>
</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' opinions about the app.">Reviews</property>
<style>
- <class name="application-details-title"/>
+ <class name="type-title-2"/>
</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..d3fb2ee8 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-1"/>
</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-1"/>
</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-1"/>
</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-1"/>
</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..69c814ff 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-1");
/* success */
return header;
diff --git a/src/gs-update-dialog.ui b/src/gs-update-dialog.ui
index a83b0260..b88e9b2b 100644
--- a/src/gs-update-dialog.ui
+++ b/src/gs-update-dialog.ui
@@ -145,10 +145,9 @@
<property name="wrap">True</property>
<property name="max_width_chars">50</property>
<property name="width_chars">50</property>
- <attributes>
- <attribute name="weight" value="bold"/>
- <attribute name="scale" value="1.3999999999999999"/>
- </attributes>
+ <style>
+ <class name="type-title-1"/>
+ </style>
</object>
</child>
<child>
@@ -160,6 +159,9 @@
<property name="wrap">True</property>
<property name="max_width_chars">50</property>
<property name="width_chars">50</property>
+ <style>
+ <class name="type-caption"/>
+ </style>
</object>
</child>
</object>
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/gs-upgrade-banner.ui b/src/gs-upgrade-banner.ui
index b69c3bda..4ceaae14 100644
--- a/src/gs-upgrade-banner.ui
+++ b/src/gs-upgrade-banner.ui
@@ -16,21 +16,21 @@
<object class="GtkLabel" id="label_upgrades_title">
<property name="visible">True</property>
<property name="margin-top">66</property>
- <property name="margin_bottom">26</property>
+ <property name="margin_bottom">16</property>
<!-- Just a placeholder; actual label text is set in code -->
<property name="label">GNOME 3.20 Now Available</property>
- <attributes>
- <attribute name="scale" value="1.8"/>
- </attributes>
+ <style>
+ <class name="type-large-title"/>
+ </style>
</object>
</child>
<child>
<object class="GtkLabel" id="label_upgrades_summary">
<property name="visible">True</property>
<property name="label" translatable="yes">A major upgrade, with new features and added
polish.</property>
- <attributes>
- <attribute name="scale" value="1.2"/>
- </attributes>
+ <style>
+ <class name="type-title-1"/>
+ </style>
</object>
</child>
<child>
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]