[libadwaita/wip/exalm/common-classes: 2/2] stylesheet: Add and use .numeric
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libadwaita/wip/exalm/common-classes: 2/2] stylesheet: Add and use .numeric
- Date: Wed, 4 Aug 2021 12:22:33 +0000 (UTC)
commit a0df7d51a9112ecde1be0498606daceeede75d77
Author: Alexander Mikhaylenko <alexm gnome org>
Date: Wed Aug 4 16:50:42 2021 +0500
stylesheet: Add and use .numeric
Have an easy way to apply tnum to labels.
src/adw-indicator-bin.c | 1 +
src/stylesheet/widgets/_labels.scss | 4 ++++
src/stylesheet/widgets/_progress-bar.scss | 2 +-
src/stylesheet/widgets/_scale.scss | 4 ++--
src/stylesheet/widgets/_spin-button.scss | 3 +--
src/stylesheet/widgets/_view-switcher.scss | 1 -
6 files changed, 9 insertions(+), 6 deletions(-)
---
diff --git a/src/adw-indicator-bin.c b/src/adw-indicator-bin.c
index b3284768..050edfce 100644
--- a/src/adw-indicator-bin.c
+++ b/src/adw-indicator-bin.c
@@ -343,6 +343,7 @@ adw_indicator_bin_init (AdwIndicatorBin *self)
self->label = gtk_label_new (NULL);
gtk_widget_set_visible (self->label, FALSE);
gtk_widget_set_parent (self->label, self->indicator);
+ gtk_widget_add_css_class (self->label, "numeric");
}
static void
diff --git a/src/stylesheet/widgets/_labels.scss b/src/stylesheet/widgets/_labels.scss
index d4699954..e0186c92 100644
--- a/src/stylesheet/widgets/_labels.scss
+++ b/src/stylesheet/widgets/_labels.scss
@@ -73,6 +73,10 @@ label {
font-family: monospace;
}
+.numeric {
+ font-feature-settings: "tnum";
+}
+
/*******************
* Editable Labels *
*******************/
diff --git a/src/stylesheet/widgets/_progress-bar.scss b/src/stylesheet/widgets/_progress-bar.scss
index 9a758bdd..8cbd0c81 100644
--- a/src/stylesheet/widgets/_progress-bar.scss
+++ b/src/stylesheet/widgets/_progress-bar.scss
@@ -16,8 +16,8 @@ progressbar {
> text {
@extend .dim-label;
+ @extend .numeric;
font-size: smaller;
- font-feature-settings: "tnum";
}
&:disabled {
diff --git a/src/stylesheet/widgets/_scale.scss b/src/stylesheet/widgets/_scale.scss
index dd790b70..d722f826 100644
--- a/src/stylesheet/widgets/_scale.scss
+++ b/src/stylesheet/widgets/_scale.scss
@@ -108,8 +108,8 @@ scale {
}
> value {
- color: gtkalpha(currentColor, 0.55);
- font-feature-settings: "tnum";
+ @extend .dim-label;
+ @extend .numeric;
}
&.marks-before:not(.marks-after),
diff --git a/src/stylesheet/widgets/_spin-button.scss b/src/stylesheet/widgets/_spin-button.scss
index ddcb5620..9a2c5457 100644
--- a/src/stylesheet/widgets/_spin-button.scss
+++ b/src/stylesheet/widgets/_spin-button.scss
@@ -1,5 +1,6 @@
spinbutton {
@extend %entry;
+ @extend .numeric;
padding: 0;
border-spacing: 0;
@@ -80,6 +81,4 @@ spinbutton {
padding: 1px 2px;
}
}
-
- font-feature-settings: "tnum";
}
diff --git a/src/stylesheet/widgets/_view-switcher.scss b/src/stylesheet/widgets/_view-switcher.scss
index afbeff44..c690dd31 100644
--- a/src/stylesheet/widgets/_view-switcher.scss
+++ b/src/stylesheet/widgets/_view-switcher.scss
@@ -81,7 +81,6 @@ indicatorbin {
font-weight: bold;
padding: 1px 4px;
color: white;
- font-feature-settings: "tnum";
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]