From 76483a24b9c461e8d5659d601b62abe62c38e233 Mon Sep 17 00:00:00 2001 From: onyx-and-iris Date: Fri, 20 Feb 2026 16:18:29 +0000 Subject: [PATCH] improve the hovering and focus effects for the buttons. --- src/q3rcon_tui/q3rcon_tui.tcss | 72 ++++++++++++++++++++++++++++++++-- 1 file changed, 69 insertions(+), 3 deletions(-) diff --git a/src/q3rcon_tui/q3rcon_tui.tcss b/src/q3rcon_tui/q3rcon_tui.tcss index cccccb0..b24b32d 100644 --- a/src/q3rcon_tui/q3rcon_tui.tcss +++ b/src/q3rcon_tui/q3rcon_tui.tcss @@ -44,35 +44,63 @@ Button { width: 100%; - height: 3; + height: 4; margin: 0 1; background: #5e81ac; color: #eceff4; - border: none; text-style: bold; + border: solid #5e81ac; } Button:hover { background: #81a1c1; + color: #2e3440; text-style: bold; + border: solid #81a1c1; +} + +Button:focus { + background: #88c0d0; + color: #2e3440; + text-style: bold; + border: solid #88c0d0; } Button.success { background: #a3be8c; + border: solid #a3be8c; } Button.success:hover { background: #8fbcbb; + color: #2e3440; + text-style: bold; + border: solid #8fbcbb; +} + +Button.success:focus { + background: #88c0d0; + color: #2e3440; + text-style: bold; } Button.warning { background: #ebcb8b; color: #2e3440; + border: solid #ebcb8b; } Button.warning:hover { background: #d08770; + color: #eceff4; + text-style: bold; + border: solid #d08770; +} + +Button.warning:focus { + background: #88c0d0; color: #2e3440; + text-style: bold; } Button.error { @@ -81,6 +109,14 @@ Button.error { Button.error:hover { background: #d08770; + color: #eceff4; + text-style: bold; +} + +Button.error:focus { + background: #88c0d0; + color: #2e3440; + text-style: bold; } #quit { @@ -90,25 +126,55 @@ Button.error:hover { #quit:hover { background: #d08770; - border: solid #ebcb8b; + color: #eceff4; + text-style: bold; + border: none; +} + +#quit:focus { + background: #d08770; + color: #eceff4; + text-style: bold; + border: none; } #send { background: #a3be8c; + border: solid #a3be8c; +} + +#send:focus { + background: #88c0d0; + color: #2e3440; + text-style: bold; + border: solid #88c0d0; } #config { background: #ebcb8b; color: #2e3440; + border: solid #ebcb8b; } #config:hover { background: #d08770; + color: #eceff4; + text-style: bold; + border: solid #d08770; +} + +#config:focus { + background: #88c0d0; color: #2e3440; + text-style: bold; + border: solid #88c0d0; } #send:hover { background: #8fbcbb; + color: #2e3440; + text-style: bold; + border: solid #8fbcbb; } /* Configuration Dialog Styles */