[gtksourceview] styles: make selections translucent



commit eaaf0fc22b4752f876525bf4b50ba3ea314ad90f
Author: Christian Hergert <chergert redhat com>
Date:   Wed Dec 1 16:29:14 2021 -0800

    styles: make selections translucent
    
    We can follow some other styles now like Adwaita with slightly transparent
    selections. If we keep the foreground transparent, GTK 4 will avoid the
    second glyph draw altogether so there is minimal performance impact so
    long as the GL renderer (or better) is used.

 data/styles/Adwaita-dark.xml    | 1 +
 data/styles/Adwaita.xml         | 1 +
 data/styles/cobalt.xml          | 2 +-
 data/styles/kate-dark.xml       | 2 +-
 data/styles/kate.xml            | 2 +-
 data/styles/oblivion.xml        | 1 +
 data/styles/solarized-dark.xml  | 2 +-
 data/styles/solarized-light.xml | 2 +-
 data/styles/tango.xml           | 1 +
 9 files changed, 9 insertions(+), 5 deletions(-)
---
diff --git a/data/styles/Adwaita-dark.xml b/data/styles/Adwaita-dark.xml
index 326a726a..73f5b8b0 100644
--- a/data/styles/Adwaita-dark.xml
+++ b/data/styles/Adwaita-dark.xml
@@ -75,6 +75,7 @@
 
   <!-- Global Settings -->
   <style name="text"                        foreground="light5" background="content_bg"/>
+  <style name="selection"                   foreground="#rgba(0,0,0,0)" background="#rgba(53, 132, 228, 
.3)"/>
   <style name="map-overlay"                 background="dark1"/>
   <style name="cursor"                      foreground="light4"/>
   <style name="line-numbers"                foreground="content_alt" background="content_bg"/>
diff --git a/data/styles/Adwaita.xml b/data/styles/Adwaita.xml
index c9a681be..7e952be7 100644
--- a/data/styles/Adwaita.xml
+++ b/data/styles/Adwaita.xml
@@ -74,6 +74,7 @@
 
   <!-- Global Settings -->
   <style name="text"                        foreground="dark2" background="light1"/>
+  <style name="selection"                   foreground="#rgba(0,0,0,0)" background="#rgba(53, 132, 228, 
.3)"/>
   <style name="map-overlay"                 background="#2e3436"/>
   <style name="cursor"                      foreground="dark2"/>
   <style name="line-numbers"                foreground="light4" background="light1"/>
diff --git a/data/styles/cobalt.xml b/data/styles/cobalt.xml
index 7f1e1598..cfce17de 100644
--- a/data/styles/cobalt.xml
+++ b/data/styles/cobalt.xml
@@ -57,7 +57,7 @@
   <!-- Global Settings -->
 
   <style name="text"                        foreground="white" background="dark_blue"/>
-  <style name="selection"                   foreground="white" background="sky_blue"/>
+  <style name="selection"                   foreground="#rgba(0,0,0,0)" background="#rgba(0, 136, 255, .3)"/>
   <style name="cursor"                      foreground="white"/>
   <style name="current-line"                background="medium_blue"/>
   <style name="line-numbers"                foreground="light_blue" background="black_blue"/>
diff --git a/data/styles/kate-dark.xml b/data/styles/kate-dark.xml
index 9a2cb684..44924614 100644
--- a/data/styles/kate-dark.xml
+++ b/data/styles/kate-dark.xml
@@ -46,7 +46,7 @@
 
   <!-- Global Settings -->
   <style name="text"                        foreground="light-gray" background="content-bg"/>
-  <style name="selection"                   foreground="light-gray" background="#2d5c76"/>
+  <style name="selection"                   foreground="#rgba(0,0,0,0)" background="#rgba(45, 92, 118, .3)"/>
   <style name="current-line"                background="#2a2e32"/>
   <style name="current-line-number"         background="#2a2e32" foreground="#a5a6a8"/>
   <style name="line-numbers"                foreground="gray" background="#31363b"/>
diff --git a/data/styles/kate.xml b/data/styles/kate.xml
index b9aff23b..fa6d0700 100644
--- a/data/styles/kate.xml
+++ b/data/styles/kate.xml
@@ -45,7 +45,7 @@
 
   <!-- Global Settings -->
   <style name="text"                        foreground="black" background="white"/>
-  <style name="selection"                   foreground="white" background="#43ace8"/>
+  <style name="selection"                   foreground="#rgba(0,0,0,0)" background="#rgba(67, 172, 232, 
.3)"/>
   <style name="current-line"                background="#f8f7f6"/>
   <style name="current-line-number"         background="#f8f7f6" foreground="#1e1e1e"/>
   <style name="line-numbers"                foreground="#a0a0a0" background="#f0f0f0"/>
diff --git a/data/styles/oblivion.xml b/data/styles/oblivion.xml
index a7ecfe9a..fd9a44d5 100644
--- a/data/styles/oblivion.xml
+++ b/data/styles/oblivion.xml
@@ -62,6 +62,7 @@
 
   <!-- Global Settings -->
   <style name="text"                        foreground="aluminium2" background="aluminium6"/>
+  <style name="selection"                   foreground="#rgba(0,0,0,0)" background="#rgba(136, 138, 133, 
.3)"/>
   <style name="cursor"                      foreground="aluminium2"/>
   <style name="secondary-cursor"            foreground="#a1a49e"/>
   <style name="line-numbers"                foreground="aluminium5" background="black"/>
diff --git a/data/styles/solarized-dark.xml b/data/styles/solarized-dark.xml
index dc1344dc..0b87f2a8 100644
--- a/data/styles/solarized-dark.xml
+++ b/data/styles/solarized-dark.xml
@@ -51,7 +51,7 @@
 
   <!-- Global Settings -->
   <style name="text"                        foreground="base1" background="base03"/>
-  <style name="selection"                   foreground="base03" background="base00"/>
+  <style name="selection"                   foreground="#rgba(0,0,0,0)" background="#rgba(101, 123, 131, 
.3)"/>
   <style name="cursor"                      foreground="base1"/>
   <style name="secondary-cursor"            foreground="base00"/>
   <style name="current-line"                background="base02"/>
diff --git a/data/styles/solarized-light.xml b/data/styles/solarized-light.xml
index 6800c6a9..cf85b097 100644
--- a/data/styles/solarized-light.xml
+++ b/data/styles/solarized-light.xml
@@ -52,7 +52,7 @@
 
   <!-- Global Settings -->
   <style name="text"                        foreground="base01" background="base3"/>
-  <style name="selection"                   foreground="base3" background="base1"/>
+  <style name="selection"                   foreground="#rgba(0,0,0,0)" background="#rgba(147, 161, 161, 
.3)"/>
   <style name="cursor"                      foreground="base01"/>
   <style name="current-line"                background="base2"/>
   <style name="current-line-number"         background="#rgba(0,0,0,0)"/>
diff --git a/data/styles/tango.xml b/data/styles/tango.xml
index 7d9675d2..f0f40d94 100644
--- a/data/styles/tango.xml
+++ b/data/styles/tango.xml
@@ -62,6 +62,7 @@
 
   <!-- Global Settings -->
   <style name="text"                        foreground="aluminium6" background="white"/>
+  <style name="selection"                   foreground="#rgba(0,0,0,0)" background="#rgba(53, 132, 228, 
.3)"/>
   <style name="cursor"                      foreground="aluminium6"/>
   <style name="secondary-cursor"            foreground="aluminium4"/>
   <style name="line-numbers"                foreground="aluminium5" background="aluminium1"/>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]