[gnome-tour/wip/cdavis/fix-styles] Remove redundant and empty style classes




commit e6c3101dd0c799c10ab1d6612aaece7503adfd53
Author: Christopher Davis <christopherdavis gnome org>
Date:   Fri Dec 10 00:09:52 2021 -0800

    Remove redundant and empty style classes
    
    * .page-body is indistinguishable from the default body style
    * libadwaita uses .title-1, so .page-title can be swapped out
    * .large-title was unused
    * Other empty styles removed

 data/resources/style.css     | 16 ----------------
 src/widgets/pages/image.rs   |  3 +--
 src/widgets/pages/welcome.rs |  2 +-
 3 files changed, 2 insertions(+), 19 deletions(-)
---
diff --git a/data/resources/style.css b/data/resources/style.css
index 87a7ad6..bad70ea 100644
--- a/data/resources/style.css
+++ b/data/resources/style.css
@@ -1,16 +1,3 @@
-.large-title {
-   font-weight: 300;
-   font-size: 24pt;
-   letter-spacing: 0.2rem;
-}
-.page-title {
-   font-weight: 600;
-   font-size: 20pt;
-}
-.page-body {
-   font-weight: 400;
-   font-size: 12pt;
-}
 .video {
   opacity: 0;
 }
@@ -63,6 +50,3 @@ window .titlebar button {
     animation: left-and-right 2s ease-in-out infinite alternate;
     }
   .last-page { }
-  .last-page .page-title, .last-page .page-body { }
-
-
diff --git a/src/widgets/pages/image.rs b/src/widgets/pages/image.rs
index c4b7b3b..085c1ec 100644
--- a/src/widgets/pages/image.rs
+++ b/src/widgets/pages/image.rs
@@ -48,7 +48,7 @@ impl ImagePageWidget {
             .valign(gtk::Align::Center)
             .margin_top(36)
             .build();
-        head_label.add_css_class("page-title");
+        head_label.add_css_class("title-1");
         container.append(&head_label);
 
         let body_label = gtk::Label::builder()
@@ -59,7 +59,6 @@ impl ImagePageWidget {
             .valign(gtk::Align::Center)
             .margin_top(12)
             .build();
-        body_label.add_css_class("page-body");
         container.append(&body_label);
 
         self.widget.append(&clamp);
diff --git a/src/widgets/pages/welcome.rs b/src/widgets/pages/welcome.rs
index 504f874..9b8d09d 100644
--- a/src/widgets/pages/welcome.rs
+++ b/src/widgets/pages/welcome.rs
@@ -158,7 +158,7 @@ impl WelcomePageWidget {
 
         let title = gtk::Label::new(Some(&gettext("Start the Tour")));
         title.set_margin_top(36);
-        title.add_css_class("page-title");
+        title.add_css_class("title-1");
         container.append(&title);
 
         let name = glib::os_info("NAME").unwrap_or_else(|| "GNOME".into());


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