[libadwaita/wip/exalm/status-page: 4/4] status-page: Add .compact style class
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libadwaita/wip/exalm/status-page: 4/4] status-page: Add .compact style class
- Date: Wed, 4 Aug 2021 12:40:42 +0000 (UTC)
commit 8014b17994c1545fad7f5594f1dcdbf0bfc16293
Author: Alexander Mikhaylenko <alexm gnome org>
Date: Wed Aug 4 00:17:23 2021 +0500
status-page: Add .compact style class
src/adw-status-page.c | 3 +++
src/stylesheet/widgets/_misc.scss | 36 ++++++++++++++++++++++++------------
2 files changed, 27 insertions(+), 12 deletions(-)
---
diff --git a/src/adw-status-page.c b/src/adw-status-page.c
index 9d5a441e..4aaa3c63 100644
--- a/src/adw-status-page.c
+++ b/src/adw-status-page.c
@@ -20,6 +20,9 @@
*
* `AdwStatusPage` has a main CSS node with name `statuspage`.
*
+ * `AdwStatusPage` can use the `.compact` style class for when it needs to fit
+ * into a small space such a sidebar or a popover.
+ *
* Since: 1.0
*/
diff --git a/src/stylesheet/widgets/_misc.scss b/src/stylesheet/widgets/_misc.scss
index 7600d0cb..9d925a0e 100644
--- a/src/stylesheet/widgets/_misc.scss
+++ b/src/stylesheet/widgets/_misc.scss
@@ -67,23 +67,35 @@ statusbar {
* AdwStatusPage *
*****************/
-statuspage > scrolledwindow > viewport > box {
- margin: 36px 12px;
- border-spacing: 36px;
+statuspage {
+ > scrolledwindow > viewport > box {
+ margin: 36px 12px;
+ border-spacing: 36px;
- > clamp > box {
- border-spacing: 12px;
+ > clamp > box {
+ border-spacing: 12px;
- > .icon {
- -gtk-icon-size: 128px;
+ > .icon {
+ -gtk-icon-size: 128px;
- @if $contrast == 'normal' {
- color: gtkalpha(currentColor, 0.5);
- }
+ @if $contrast == 'normal' {
+ color: gtkalpha(currentColor, 0.5);
+ }
- &:not(:last-child) {
- margin-bottom: 24px;
+ &:not(:last-child) {
+ margin-bottom: 24px;
+ }
}
}
}
+
+ &.compact > scrolledwindow > viewport > box > clamp > box {
+ > .icon {
+ -gtk-icon-size: 96px;
+ }
+
+ > .title {
+ font-size: 18pt;
+ }
+ }
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]