[libadwaita/wip/exalm/stylesheet2: 89/103] stylesheet: Split view styles into a separate file
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libadwaita/wip/exalm/stylesheet2: 89/103] stylesheet: Split view styles into a separate file
- Date: Fri, 16 Apr 2021 22:38:46 +0000 (UTC)
commit d056bd39a0bf3a7c5e589f5abab2dc3523f71fd9
Author: Alexander Mikhaylenko <alexm gnome org>
Date: Fri Apr 9 14:01:31 2021 +0500
stylesheet: Split view styles into a separate file
src/stylesheet/_common.scss | 94 --------------------------------------
src/stylesheet/_widgets.scss | 1 +
src/stylesheet/meson.build | 1 +
src/stylesheet/widgets/_views.scss | 94 ++++++++++++++++++++++++++++++++++++++
4 files changed, 96 insertions(+), 94 deletions(-)
---
diff --git a/src/stylesheet/_common.scss b/src/stylesheet/_common.scss
index c2edc76..e3f8ac2 100644
--- a/src/stylesheet/_common.scss
+++ b/src/stylesheet/_common.scss
@@ -37,97 +37,6 @@ dnd {
-gtk-icon-size: 32px;
}
-.view,
-%view {
- color: $text_color;
- background-color: $base_color;
-
- &:disabled {
- color: $insensitive_fg_color;
- background-color: $insensitive_bg_color;
- }
-
- &:selected {
- &:focus, & {
- @extend %selected_items;
-
- border-radius: 3px;
- }
- }
-}
-
-textview {
- > text {
- @extend %view;
-
- > selection { &:focus, & { @extend %selected_items; }}
- }
-
- > border {
- background-color: mix($bg_color, $base_color, 50%);
- }
-
- &:drop(active) {
- caret-color: $drop_target_color;
- }
-}
-
-iconview {
- @extend .view;
-
- @include focus-ring();
-
- &:drop(active) {
- box-shadow: none;
- }
-
- > dndtarget:drop(active) {
- border-style: solid;
- border-width: 1px;
- border-color: $selected_borders_color;
- }
-}
-
-rubberband {
- border: 1px solid darken($selected_bg_color, 10%);
- background-color: transparentize(darken($selected_bg_color, 10%), 0.8);
-}
-
-flowbox {
- > flowboxchild {
- padding: 3px;
- transition: $focus_transition;
-
- @include focus-ring();
-
- &:selected {
- outline-color: $alt_focus_border_color;
-
- @extend %selected_items;
- }
- }
-}
-
-gridview {
- > child {
- padding: 3px;
- transition: $focus_transition;
-
- @include focus-ring();
-
- &:selected {
- outline-color: $alt_focus_border_color;
-
- @extend %selected_items;
- }
-
- box { //cells
- border-spacing: 8px; //label separation
- margin: 12px;
- }
- }
-}
-
label {
@include focus-ring();
@@ -478,9 +387,6 @@ tooltip {
/********
* Misc *
********/
-.content-view {
- background-color: darken($bg_color,7%);
-}
.scale-popup {
.osd & { @extend %osd; }
diff --git a/src/stylesheet/_widgets.scss b/src/stylesheet/_widgets.scss
index 7416c0f..df96ef4 100644
--- a/src/stylesheet/_widgets.scss
+++ b/src/stylesheet/_widgets.scss
@@ -21,4 +21,5 @@
@import 'widgets/switch';
@import 'widgets/toolbars';
@import 'widgets/trees';
+@import 'widgets/views';
@import 'widgets/window';
diff --git a/src/stylesheet/meson.build b/src/stylesheet/meson.build
index 48aaa2a..e220814 100644
--- a/src/stylesheet/meson.build
+++ b/src/stylesheet/meson.build
@@ -43,6 +43,7 @@ if not fs.exists('Adwaita-light.css')
'widgets/_switch.scss',
'widgets/_toolbars.scss',
'widgets/_trees.scss',
+ 'widgets/_views.scss',
'widgets/_window.scss',
])
diff --git a/src/stylesheet/widgets/_views.scss b/src/stylesheet/widgets/_views.scss
new file mode 100644
index 0000000..50167b8
--- /dev/null
+++ b/src/stylesheet/widgets/_views.scss
@@ -0,0 +1,94 @@
+.view,
+%view {
+ color: $text_color;
+ background-color: $base_color;
+
+ &:disabled {
+ color: $insensitive_fg_color;
+ background-color: $insensitive_bg_color;
+ }
+
+ &:selected {
+ &:focus, & {
+ @extend %selected_items;
+
+ border-radius: 3px;
+ }
+ }
+}
+
+textview {
+ > text {
+ @extend %view;
+
+ > selection { &:focus, & { @extend %selected_items; }}
+ }
+
+ > border {
+ background-color: mix($bg_color, $base_color, 50%);
+ }
+
+ &:drop(active) {
+ caret-color: $drop_target_color;
+ }
+}
+
+iconview {
+ @extend .view;
+
+ @include focus-ring();
+
+ &:drop(active) {
+ box-shadow: none;
+ }
+
+ > dndtarget:drop(active) {
+ border-style: solid;
+ border-width: 1px;
+ border-color: $selected_borders_color;
+ }
+}
+
+rubberband {
+ border: 1px solid darken($selected_bg_color, 10%);
+ background-color: transparentize(darken($selected_bg_color, 10%), 0.8);
+}
+
+flowbox {
+ > flowboxchild {
+ padding: 3px;
+ transition: $focus_transition;
+
+ @include focus-ring();
+
+ &:selected {
+ outline-color: $alt_focus_border_color;
+
+ @extend %selected_items;
+ }
+ }
+}
+
+gridview {
+ > child {
+ padding: 3px;
+ transition: $focus_transition;
+
+ @include focus-ring();
+
+ &:selected {
+ outline-color: $alt_focus_border_color;
+
+ @extend %selected_items;
+ }
+
+ box { //cells
+ border-spacing: 8px; //label separation
+ margin: 12px;
+ }
+ }
+}
+
+.content-view {
+ background-color: darken($bg_color,7%);
+}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]