chore: enhance contract between input box and button

This commit is contained in:
2026-08-20 16:19:57 +02:00
committed by duan_j
parent 7993e6e83b
commit 4e24cb6e8c
+20 -3
View File
@@ -199,6 +199,10 @@ DARK_PANEL2 = "#0e1728" # panel2 — deepest opaque: menus, popups, tooltips
DARK_SURFACE = "#1c2b4a" # panel — cards, state panel, scrollbar track
DARK_ELEVATED = "#253148" # glass2 (7% white) flattened — buttons, banners
DARK_ELEVATED_HOVER = "#32405c" # one glass step lighter — button hover
# Half the button glass (7% -> 4% white), translucent so the sky shows
# through: inputs sank to wells, buttons stay raised faces — same
# button-vs-input split the light theme makes with INPUT_BG vs BUTTON_BG.
DARK_INPUT_BG = "rgba(255, 255, 255, 4%)"
# Solid, not transparent: scroll-area viewports don't composite the window
# gradient on the container's X11 and render BLACK instead. Lighter sky-navy
# so tables don't read near-black against the backdrop.
@@ -344,7 +348,9 @@ SPLASH_TEXT = "#4c4f69" # latte text — bar % and loading message
# -- Numeric inputs ---------------------------------------------------------
# Translucent, not solid white: the sky gradient shimmers through the field
# while text stays on a light ground. Raise the % for a more solid face.
INPUT_BG = "rgba(255, 255, 255, 33%)"
# Why 16%: half of BUTTON_BG's 50% — at 33% inputs read as clickable button
# faces; the deeper glass keeps them visually distinct as wells, not buttons.
INPUT_BG = "rgba(255, 255, 255, 16%)"
INPUT_INVALID_BG = "#e9c4cf" # red 20% over latte base
INPUT_DISABLED_BG = "#e6e9ef" # latte mantle
INPUT_DISABLED_INVALID_BG = "#ecdae2" # faint red wash
@@ -1329,8 +1335,7 @@ def _sunset_stylesheet() -> str:
/* Interactive faces sit one step above the backdrop (site: glass2)
with the faint gold hairline. Same pinned height as the light sheet
so buttons and entry boxes match in both themes. */
QPushButton, QToolButton, QComboBox,
QLineEdit, QAbstractSpinBox {
QPushButton, QToolButton, QComboBox {
background-color: $dark_elevated;
border: 1px solid $dark_border_faint;
min-height: 16px;
@@ -1339,6 +1344,18 @@ def _sunset_stylesheet() -> str:
padding-bottom: 1px;
}
/* Inputs: half the button glass (DARK_INPUT_BG) — a shared fill made
entry boxes indistinguishable from clickable buttons. Same box
metrics as above so the two still line up in rows. */
QLineEdit, QAbstractSpinBox {
background-color: $dark_input_bg;
border: 1px solid $dark_border_faint;
min-height: 16px;
max-height: 16px;
padding-top: 1px;
padding-bottom: 1px;
}
/* Hover lightens in the dark theme (one glass step up); the light
theme darkens instead — direction always moves toward contrast. */
QPushButton:hover, QToolButton:hover, QComboBox:hover {