Modernize vulnerability detail dialog styling

This commit is contained in:
0xallam
2026-01-09 13:46:08 -08:00
committed by Ahmed Allam
parent 94bb97143e
commit 4a58226c9a
2 changed files with 37 additions and 18 deletions

View File

@@ -96,29 +96,30 @@ Screen {
VulnerabilityDetailScreen { VulnerabilityDetailScreen {
align: center middle; align: center middle;
background: $background 60%; background: #000000 80%;
} }
#vuln_detail_dialog { #vuln_detail_dialog {
grid-size: 1; grid-size: 1;
grid-gutter: 1; grid-gutter: 1;
grid-rows: 1fr auto; grid-rows: 1fr auto;
padding: 1 2; padding: 2 3;
width: 80%; width: 85%;
max-width: 100; max-width: 110;
height: 80%; height: 85%;
max-height: 40; max-height: 45;
border: round #ea580c; border: solid #262626;
background: #0a0a0a 98%; background: #0a0a0a;
} }
#vuln_detail_scroll { #vuln_detail_scroll {
height: 1fr; height: 1fr;
background: transparent; background: transparent;
scrollbar-background: #0a0a0a; scrollbar-background: #0a0a0a;
scrollbar-color: #333333; scrollbar-color: #404040;
scrollbar-corner-color: #0a0a0a; scrollbar-corner-color: #0a0a0a;
scrollbar-size: 1 1; scrollbar-size: 1 1;
padding-right: 1;
} }
#vuln_detail_content { #vuln_detail_content {
@@ -130,26 +131,44 @@ VulnerabilityDetailScreen {
#vuln_detail_buttons { #vuln_detail_buttons {
width: 100%; width: 100%;
height: auto; height: auto;
align: center middle; align: right middle;
padding: 0; padding-top: 1;
margin: 0; margin: 0;
border-top: solid #1a1a1a;
} }
#copy_vuln_detail, #close_vuln_detail { #copy_vuln_detail {
width: auto; width: auto;
min-width: 12; min-width: 12;
height: 1; height: auto;
min-height: 1;
background: transparent; background: transparent;
color: #737373; color: #525252;
border: none; border: none;
text-style: none; text-style: none;
margin: 0 1; margin: 0 1;
padding: 0 2;
}
#close_vuln_detail {
width: auto;
min-width: 10;
height: auto;
background: transparent;
color: #a3a3a3;
border: none;
text-style: none;
margin: 0;
padding: 0 2;
}
#copy_vuln_detail:hover, #copy_vuln_detail:focus {
background: transparent;
color: #22c55e;
border: none;
} }
#copy_vuln_detail:hover, #copy_vuln_detail:focus,
#close_vuln_detail:hover, #close_vuln_detail:focus { #close_vuln_detail:hover, #close_vuln_detail:focus {
background: #262626; background: transparent;
color: #ffffff; color: #ffffff;
border: none; border: none;
} }

View File

@@ -275,7 +275,7 @@ class VulnerabilityDetailScreen(ModalScreen): # type: ignore[misc]
VerticalScroll(Static(content, id="vuln_detail_content"), id="vuln_detail_scroll"), VerticalScroll(Static(content, id="vuln_detail_content"), id="vuln_detail_scroll"),
Horizontal( Horizontal(
Button("Copy", variant="default", id="copy_vuln_detail"), Button("Copy", variant="default", id="copy_vuln_detail"),
Button("Close", variant="default", id="close_vuln_detail"), Button("Done", variant="default", id="close_vuln_detail"),
id="vuln_detail_buttons", id="vuln_detail_buttons",
), ),
id="vuln_detail_dialog", id="vuln_detail_dialog",