public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Stefan Sterz <s.sterz@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH widget-toolkit 2/4] dark-mode: fix the focused state for background image grid icons
Date: Wed,  5 Apr 2023 10:08:03 +0200	[thread overview]
Message-ID: <20230405080805.525170-3-s.sterz@proxmox.com> (raw)
In-Reply-To: <20230405080805.525170-1-s.sterz@proxmox.com>

some icons in grids are background images for the whole grid element.
so we need to filter the entire element, which also means that any
background or inner border color would get filtered too. this inverts
the focused border on inner elements and the focused background so
that it looks correct when inverted again.

Signed-off-by: Stefan Sterz <s.sterz@proxmox.com>
---
 src/proxmox-dark/scss/other/_icons.scss          | 16 ++++++++++------
 .../scss/proxmox/_loadingindicator.scss          |  8 ++++++++
 2 files changed, 18 insertions(+), 6 deletions(-)

diff --git a/src/proxmox-dark/scss/other/_icons.scss b/src/proxmox-dark/scss/other/_icons.scss
index 691ea75..df81969 100644
--- a/src/proxmox-dark/scss/other/_icons.scss
+++ b/src/proxmox-dark/scss/other/_icons.scss
@@ -90,12 +90,16 @@
     color: black;
   }
 
-  .x-grid-cell-inner::before {
-    // this is a somewhat hacky work-around for the focus borders on
-    // these elements. since we use the invert filter to fix the icon
-    // color we need to also invert the border color first too, not
-    // just the text. add "!important" to properly override.
-    border-color: invert($primary-color, $weight: 90%) !important;
+  // this is a somewhat hacky work-around for the focus borders and
+  // background on these elements. since we use the invert filter to
+  // fix the icon color we need to also invert the border color first
+  // too, not just the text.
+  .x-keyboard-mode &.x-grid-item-focused {
+    background-color: invert($selection-background-color, $weight: 90%);
+
+    .x-grid-cell-inner::before {
+      border-color: invert($primary-color, $weight: 90%);
+    }
   }
 }
 
diff --git a/src/proxmox-dark/scss/proxmox/_loadingindicator.scss b/src/proxmox-dark/scss/proxmox/_loadingindicator.scss
index 3b58917..69fd962 100644
--- a/src/proxmox-dark/scss/proxmox/_loadingindicator.scss
+++ b/src/proxmox-dark/scss/proxmox/_loadingindicator.scss
@@ -8,6 +8,14 @@
   color: black;
 }
 
+.x-keyboard-mode .x-grid-item-focused.x-grid-row-loading {
+  background-color: invert($selection-background-color, $weight: 90%);
+
+  .x-grid-cell-inner::before {
+    border-color: invert($primary-color, $weight: 90%) !important;
+  }
+}
+
 .x-mask-msg {
   background-color: $form-field-body-color;
   border: solid 1px $border-color-alt;
-- 
2.30.2





  parent reply	other threads:[~2023-04-05  8:08 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-05  8:08 [pve-devel] [PATCH widget-toolkit 0/4] Proxmox Dark Theme Fix-ups - Round 5 Stefan Sterz
2023-04-05  8:08 ` [pve-devel] [PATCH widget-toolkit 1/4] dark-mode: fix focus and focus-over states for tabs Stefan Sterz
2023-04-05  8:08 ` Stefan Sterz [this message]
2023-04-05  8:08 ` [pve-devel] [PATCH widget-toolkit 3/4] dark-mode: style the icon for the maintenance mode in pbs Stefan Sterz
2023-04-05  8:08 ` [pve-devel] [PATCH widget-toolkit 4/4] dark-mode: improve apt repo group header contrast ratios Stefan Sterz
2023-04-06 11:10 ` [pve-devel] applied-series: [PATCH widget-toolkit 0/4] Proxmox Dark Theme Fix-ups - Round 5 Thomas Lamprecht

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230405080805.525170-3-s.sterz@proxmox.com \
    --to=s.sterz@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal