[libadwaita/wip/exalm/no-assets: 11/13] stylesheet: Overhaul text selection handles
- From: Adrien Plazas <aplazas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libadwaita/wip/exalm/no-assets: 11/13] stylesheet: Overhaul text selection handles
- Date: Thu, 6 May 2021 11:47:24 +0000 (UTC)
commit d58b14cfaae6b70c8b05577c052781666c355c52
Author: Alexander Mikhaylenko <alexm gnome org>
Date: Wed May 5 14:11:27 2021 +0500
stylesheet: Overhaul text selection handles
Remove assets, use the selection color for handles.
src/stylesheet/widgets/_entries.scss | 6 +++-
src/stylesheet/widgets/_text-selection.scss | 48 ++++++++++++-----------------
2 files changed, 25 insertions(+), 29 deletions(-)
---
diff --git a/src/stylesheet/widgets/_entries.scss b/src/stylesheet/widgets/_entries.scss
index efa1511..57be96b 100644
--- a/src/stylesheet/widgets/_entries.scss
+++ b/src/stylesheet/widgets/_entries.scss
@@ -43,7 +43,11 @@ entry {
@include focus-ring($focus-state: 'focus-within', $fc: transparentize($e_color, 0.5));
- > text > selection:focus-within { background-color: transparentize($e_color, .8); }
+ > text {
+ > selection:focus-within { background-color: transparentize($e_color, .8); }
+
+ > cursor-handle > contents { background-color: $e_color; }
+ }
}
}
diff --git a/src/stylesheet/widgets/_text-selection.scss b/src/stylesheet/widgets/_text-selection.scss
index 68d660b..2d6ed47 100644
--- a/src/stylesheet/widgets/_text-selection.scss
+++ b/src/stylesheet/widgets/_text-selection.scss
@@ -1,34 +1,26 @@
cursor-handle {
- background-color: transparent;
- background-image: none;
- box-shadow: none;
- border-style: none;
- min-width: 20px;
- min-height: 24px;
- padding-left: 20px;
- padding-right: 20px;
- padding-top: 24px;
- padding-bottom: 24px;
+ all: unset;
+ padding: 24px 20px;
- @each $s,$as in ('',''),
- (':hover','-hover'),
- (':active','-active') { //no need for insensitive and backdrop
- &.top#{$s}:dir(ltr), &.bottom#{$s}:dir(rtl) {
- $_url: '#{$assets}/text-select-start#{$as}#{$asset_suffix}';
- -gtk-icon-source: -gtk-scaled(url('#{$_url}.png'),
- url('#{$_url}@2.png'));
- }
+ > contents {
+ min-width: 20px;
+ min-height: 20px;
+ border-radius: 50%;
- &.bottom#{$s}:dir(ltr), &.top#{$s}:dir(rtl) {
- $_url: '#{$assets}/text-select-end#{$as}#{$asset_suffix}';
- -gtk-icon-source: -gtk-scaled(url('#{$_url}.png'),
- url('#{$_url}@2.png'));
- }
+ background-color: $selected_bg_color;
+ }
+
+ &.top > contents {
+ border-top-right-radius: 0;
+ }
+
+ &.bottom > contents {
+ border-top-left-radius: 0;
+ transform: translateX(1px);
+ }
- &.insertion-cursor#{$s}:dir(ltr), &.insertion-cursor#{$s}:dir(rtl) {
- $_url: '#{$assets}/slider-horz-scale-has-marks-above#{$as}#{$asset_suffix}';
- -gtk-icon-source: -gtk-scaled(url('#{$_url}.png'),
- url('#{$_url}@2.png'));
- }
+ &.insertion-cursor > contents {
+ border-top-left-radius: 0;
+ transform: translateX(1px) translateY(4px) rotate(45deg);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]