[libadwaita/wip/exalm/monospace] stylesheet: Support .monospace for entry rows
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libadwaita/wip/exalm/monospace] stylesheet: Support .monospace for entry rows
- Date: Wed, 27 Apr 2022 09:19:15 +0000 (UTC)
commit 142c94930797adc47ff64fd171b45b807f9b05b5
Author: Alexander Mikhaylenko <alexm gnome org>
Date: Wed Apr 27 13:17:23 2022 +0400
stylesheet: Support .monospace for entry rows
Fixes https://gitlab.gnome.org/GNOME/libadwaita/-/issues/464
doc/style-classes.md | 4 ++++
src/stylesheet/widgets/_lists.scss | 8 ++++++++
2 files changed, 12 insertions(+)
---
diff --git a/doc/style-classes.md b/doc/style-classes.md
index 5e1153e9..776ee2fc 100644
--- a/doc/style-classes.md
+++ b/doc/style-classes.md
@@ -298,6 +298,10 @@ the regular body style.
The `.monospace` style class makes the widget use a monospace font. This can be
useful when displaying code, logs or shell commands.
+For [class@EntryRow], it only makes the editable part monospace, but not title
+or any extra widgets. To make everything in the row monospace, apply
+`.monospace` to the [class@Gtk.ListBox] around the row.
+
<picture>
<source srcset="typography-numeric-dark.png" media="(prefers-color-scheme: dark)">
<img src="typography-numeric.png" alt="typography-numeric">
diff --git a/src/stylesheet/widgets/_lists.scss b/src/stylesheet/widgets/_lists.scss
index 0bf07135..290cc398 100644
--- a/src/stylesheet/widgets/_lists.scss
+++ b/src/stylesheet/widgets/_lists.scss
@@ -136,6 +136,14 @@ row.entry {
.indicator {
opacity: $dimmer_opacity;
}
+
+ &.monospace {
+ font-family: inherit;
+
+ text {
+ font-family: monospace;
+ }
+ }
}
/***************
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]