[libadwaita/wip/exalm/stylesheet2: 82/103] stylesheet: Split level bar styles into a separate file
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libadwaita/wip/exalm/stylesheet2: 82/103] stylesheet: Split level bar styles into a separate file
- Date: Fri, 16 Apr 2021 22:38:46 +0000 (UTC)
commit 72499f3b0fe7c5aeaadd93128d8b2ee520fd4dcc
Author: Alexander Mikhaylenko <alexm gnome org>
Date: Fri Apr 9 13:33:08 2021 +0500
stylesheet: Split level bar styles into a separate file
src/stylesheet/_common.scss | 89 ----------------------------------
src/stylesheet/_widgets.scss | 1 +
src/stylesheet/meson.build | 1 +
src/stylesheet/widgets/_level-bar.scss | 83 +++++++++++++++++++++++++++++++
4 files changed, 85 insertions(+), 89 deletions(-)
---
diff --git a/src/stylesheet/_common.scss b/src/stylesheet/_common.scss
index 51067be..1e447bf 100644
--- a/src/stylesheet/_common.scss
+++ b/src/stylesheet/_common.scss
@@ -237,95 +237,6 @@ editablelabel > stack > text {
}
-/*************
- * Level Bar *
- *************/
-
-$_levelbar_size: 9px;
-$_levelbar_border_radius: 5px;
-
-levelbar {
- &.horizontal {
- trough > block {
- min-height: $_levelbar_size;
- border-radius: $_levelbar_border_radius;
-
- &:dir(rtl) {
- border-radius: 0 $_levelbar_border_radius $_levelbar_border_radius 0;
- }
-
- &:dir(ltr) {
- border-radius: $_levelbar_border_radius 0 0 $_levelbar_border_radius;
- }
-
- &.empty,
- &.full {
- border-radius: $_levelbar_border_radius;
- }
- }
-
- // segmented level bar
- &.discrete > trough > block {
- min-height: 2px;
- margin: 1px;
- min-width: 24px;
- border-radius: 0;
-
- &:first-child {
- border-radius: 2px 0 0 2px;
- }
-
- &:last-child {
- border-radius: 0 2px 2px 0;
- }
- }
- }
-
- &.vertical {
- trough > block {
- min-width: $_levelbar_size;
- border-radius: $_levelbar_border_radius;
- }
-
- &.discrete > trough > block {
- min-width: $_levelbar_size - 7px;
- margin: 1px 0;
- min-height: 32px;
- }
- }
-
- > trough {
- padding: 0;
-
- // level bar colours
- > block {
- border: 1px solid;
-
- &.low {
- border-color: $warning_color;
- background-color: $warning_color;
- }
-
- &.high,
- &:not(.empty) {
- border-color: $selected_bg_color;
- background-color: $selected_bg_color;
- }
-
- &.full {
- border-color: $success_color;
- background-color: $success_color;
- }
-
- &.empty {
- background-color: darken($bg_color, 5%);
- border-color: darken($bg_color, 5%);
- }
- }
- }
-}
-
-
/****************
* Print dialog *
*****************/
diff --git a/src/stylesheet/_widgets.scss b/src/stylesheet/_widgets.scss
index 1b2654b..7a74f55 100644
--- a/src/stylesheet/_widgets.scss
+++ b/src/stylesheet/_widgets.scss
@@ -3,6 +3,7 @@
@import 'widgets/dropdowns';
@import 'widgets/entries';
@import 'widgets/header-bar';
+@import 'widgets/level-bar';
@import 'widgets/links';
@import 'widgets/menus';
@import 'widgets/notebook';
diff --git a/src/stylesheet/meson.build b/src/stylesheet/meson.build
index 2364bac..07a7895 100644
--- a/src/stylesheet/meson.build
+++ b/src/stylesheet/meson.build
@@ -25,6 +25,7 @@ if not fs.exists('Adwaita-light.css')
'widgets/_dropdowns.scss',
'widgets/_entries.scss',
'widgets/_header-bar.scss',
+ 'widgets/_level-bar.scss',
'widgets/_links.scss',
'widgets/_menus.scss',
'widgets/_notebook.scss',
diff --git a/src/stylesheet/widgets/_level-bar.scss b/src/stylesheet/widgets/_level-bar.scss
new file mode 100644
index 0000000..512b3b3
--- /dev/null
+++ b/src/stylesheet/widgets/_level-bar.scss
@@ -0,0 +1,83 @@
+$_levelbar_size: 9px;
+$_levelbar_border_radius: 5px;
+
+levelbar {
+ &.horizontal {
+ trough > block {
+ min-height: $_levelbar_size;
+ border-radius: $_levelbar_border_radius;
+
+ &:dir(rtl) {
+ border-radius: 0 $_levelbar_border_radius $_levelbar_border_radius 0;
+ }
+
+ &:dir(ltr) {
+ border-radius: $_levelbar_border_radius 0 0 $_levelbar_border_radius;
+ }
+
+ &.empty,
+ &.full {
+ border-radius: $_levelbar_border_radius;
+ }
+ }
+
+ // segmented level bar
+ &.discrete > trough > block {
+ min-height: 2px;
+ margin: 1px;
+ min-width: 24px;
+ border-radius: 0;
+
+ &:first-child {
+ border-radius: 2px 0 0 2px;
+ }
+
+ &:last-child {
+ border-radius: 0 2px 2px 0;
+ }
+ }
+ }
+
+ &.vertical {
+ trough > block {
+ min-width: $_levelbar_size;
+ border-radius: $_levelbar_border_radius;
+ }
+
+ &.discrete > trough > block {
+ min-width: $_levelbar_size - 7px;
+ margin: 1px 0;
+ min-height: 32px;
+ }
+ }
+
+ > trough {
+ padding: 0;
+
+ // level bar colours
+ > block {
+ border: 1px solid;
+
+ &.low {
+ border-color: $warning_color;
+ background-color: $warning_color;
+ }
+
+ &.high,
+ &:not(.empty) {
+ border-color: $selected_bg_color;
+ background-color: $selected_bg_color;
+ }
+
+ &.full {
+ border-color: $success_color;
+ background-color: $success_color;
+ }
+
+ &.empty {
+ background-color: darken($bg_color, 5%);
+ border-color: darken($bg_color, 5%);
+ }
+ }
+ }
+}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]