From 765ef1b3f61524ec6c6b87d9b474e303a3a0bd3e Mon Sep 17 00:00:00 2001 From: alfrix Date: Sun, 15 Sep 2024 15:02:35 -0300 Subject: [PATCH] style: change the treeview back to a check it takes less space and the previous implementation looks bad on some systems where the sizes are not respected --- styles/base.css | 28 +++++++++------------- styles/circle.svg | 10 -------- styles/colorized/style.css | 15 +++++++++--- styles/complete.svg | 38 +++++++++++++++++++++++++++++ styles/material-dark/style.css | 4 ++++ styles/material-darker/style.css | 4 ++++ styles/material-light/style.css | 4 ++++ styles/z-bolt/images/complete.svg | 40 +++++++++++++++---------------- styles/z-bolt/style.css | 5 ++++ 9 files changed, 97 insertions(+), 51 deletions(-) delete mode 100644 styles/circle.svg create mode 100644 styles/complete.svg diff --git a/styles/base.css b/styles/base.css index ac3a6681..06459ba7 100644 --- a/styles/base.css +++ b/styles/base.css @@ -32,6 +32,10 @@ window { -gtk-icon-shadow: none; } +treeview.view{ + padding-right: 0.25em; +} + junction { background-color: @bg; } @@ -40,8 +44,7 @@ switch slider { border: 0; } -switch, -treeview.view check { +switch { margin: 0.75em; min-width: 5em; min-height: 2.5em; @@ -50,23 +53,14 @@ treeview.view check { } treeview.view check { - background-color: rgb(32,41,47); - -gtk-icon-source: -gtk-icontheme("switch-off-symbolic"); - background-repeat: no-repeat; - background-position: left center; - background-size : 3em 3em; - background-image: image(url("./styles/circle.svg")); - -gtk-icon-transform: translateX(1.5em); -} -treeview.view check:checked { - background-color : rgb(53,132,228); - background-position: right center; - -gtk-icon-source: -gtk-icontheme("switch-on-symbolic"); - -gtk-icon-transform: translateX(-1.5em); + min-height: 2em; + min-width: 2em; + background-image: none; } -expander label { - padding : 1em; +treeview.view check:checked { + background-image: none; + -gtk-icon-source: url("./styles/complete.svg"); } button { diff --git a/styles/circle.svg b/styles/circle.svg deleted file mode 100644 index 14c0d218..00000000 --- a/styles/circle.svg +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - diff --git a/styles/colorized/style.css b/styles/colorized/style.css index 76ed43aa..428bf35b 100644 --- a/styles/colorized/style.css +++ b/styles/colorized/style.css @@ -109,16 +109,25 @@ popover button { border-color: @solarized-base03; } -treeview.view check, switch { background-color: @solarized-base02; } - -treeview.view check:checked, switch:checked { background-color: @solarized-green; } +treeview.view check { + background-image: none; + background-color: @solarized-base02; + border-radius: .51em; +} + +treeview.view check:checked { + background-image: none; + background-color: @solarized-base02; + -gtk-icon-source: url("./styles/colorized/images/complete.svg"); +} + entry { background-color: @solarized-base02; border-color: @solarized-base03; diff --git a/styles/complete.svg b/styles/complete.svg new file mode 100644 index 00000000..719a4539 --- /dev/null +++ b/styles/complete.svg @@ -0,0 +1,38 @@ + + + + + + diff --git a/styles/material-dark/style.css b/styles/material-dark/style.css index 728deb4b..8cb9d762 100644 --- a/styles/material-dark/style.css +++ b/styles/material-dark/style.css @@ -103,6 +103,10 @@ switch:checked { background-color: @echo; } +treeview.view check:checked { + -gtk-icon-source: url("./styles/material-dark/images/complete.svg"); +} + entry { background-color: @active-dark; border-color: @active-dark; diff --git a/styles/material-darker/style.css b/styles/material-darker/style.css index ba724e24..f58e7be3 100644 --- a/styles/material-darker/style.css +++ b/styles/material-darker/style.css @@ -101,6 +101,10 @@ switch:checked { background-color: #2f5631; } +treeview.view check:checked { + -gtk-icon-source: url("./styles/material-darker/images/complete.svg"); +} + label { color: #e2e2e2; } diff --git a/styles/material-light/style.css b/styles/material-light/style.css index 8ecef12e..15ba714e 100644 --- a/styles/material-light/style.css +++ b/styles/material-light/style.css @@ -122,6 +122,10 @@ switch:checked { background-color: @color3; } +treeview.view check:checked { + -gtk-icon-source: url("./styles/material-light/images/complete.svg"); +} + treeview.view check, switch slider, scale trough, diff --git a/styles/z-bolt/images/complete.svg b/styles/z-bolt/images/complete.svg index 6edacfc4..21fbd1d1 100644 --- a/styles/z-bolt/images/complete.svg +++ b/styles/z-bolt/images/complete.svg @@ -1,19 +1,19 @@ + inkscape:version="1.3.2 (091e20ef0f, 2023-11-25, custom)" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:dc="http://purl.org/dc/elements/1.1/"> @@ -38,22 +38,24 @@ inkscape:pageopacity="0" inkscape:pageshadow="2" inkscape:window-width="1600" - inkscape:window-height="837" + inkscape:window-height="829" id="namedview12" showgrid="false" inkscape:pagecheckerboard="false" inkscape:zoom="6.05" - inkscape:cx="29.562225" - inkscape:cy="34.810069" - inkscape:window-x="-8" - inkscape:window-y="-8" + inkscape:cx="38.429752" + inkscape:cy="24.545455" + inkscape:window-x="0" + inkscape:window-y="0" inkscape:window-maximized="1" - inkscape:current-layer="svg10" + inkscape:current-layer="g835" inkscape:snap-bbox="true" inkscape:snap-bbox-edge-midpoints="false" inkscape:document-rotation="0" inkscape:snap-bbox-midpoints="true" - inkscape:snap-others="false" /> + inkscape:snap-others="false" + inkscape:showpageshadow="0" + inkscape:deskcolor="#d1d1d1" /> folder @@ -64,12 +66,8 @@ transform="matrix(0.88461538,0,0,0.88461538,3.6776896,3.6923078)" style="stroke-width:1.13043"> - diff --git a/styles/z-bolt/style.css b/styles/z-bolt/style.css index 1917088d..7523f00e 100644 --- a/styles/z-bolt/style.css +++ b/styles/z-bolt/style.css @@ -76,11 +76,16 @@ treeview.view check, switch { background-color: @active; } + treeview.view check:checked, switch:checked { background-color: @switch-scale-bg; } +treeview.view check:checked { + -gtk-icon-source: url("./styles/z-bolt/images/complete.svg"); +} + entry { background-color: @active; border-color: @bg;