@@ -211,7 +211,10 @@ def exception_handler(
211211}
212212
213213/* ── Checkboxes ─────────────────────────────────────────────────────── */
214- QCheckBox { spacing: 8px; color: #24292f; }
214+ QCheckBox { spacing: 8px; color: #24292f; background-color: transparent; }
215+ QStackedWidget#algorithm_tab,
216+ QWidget#algorithm_edit,
217+ QWidget#algorithm_show { background-color: transparent; }
215218QCheckBox::indicator {
216219 width: 16px; height: 16px;
217220 border: 1px solid #d0d7de;
@@ -606,7 +609,10 @@ def exception_handler(
606609}
607610
608611/* ── Checkboxes ─────────────────────────────────────────────────────── */
609- QCheckBox { spacing: 8px; color: #c9d1d9; }
612+ QCheckBox { spacing: 8px; color: #c9d1d9; background-color: transparent; }
613+ QStackedWidget#algorithm_tab,
614+ QWidget#algorithm_edit,
615+ QWidget#algorithm_show { background-color: transparent; }
610616QCheckBox::indicator {
611617 width: 16px; height: 16px;
612618 border: 1px solid #30363d;
@@ -822,19 +828,26 @@ def main() -> None:
822828 app .setFont (QFont ("Segoe UI" , 11 ))
823829
824830 style_hints = app .styleHints ()
825- app .setStyleSheet (_stylesheet_for_scheme (style_hints .colorScheme ())) # type: ignore [attr-defined]
826- style_hints .colorSchemeChanged .connect ( # type: ignore [attr-defined]
827- lambda scheme : app .setStyleSheet (_stylesheet_for_scheme (scheme ))
828- )
831+
832+ def apply_stylesheet (scheme : Qt .ColorScheme ) -> None : # type: ignore [name-defined]
833+ app .setStyleSheet (_stylesheet_for_scheme (scheme ))
834+
835+ apply_stylesheet (style_hints .colorScheme ()) # type: ignore [attr-defined]
836+ style_hints .colorSchemeChanged .connect (apply_stylesheet ) # type: ignore [attr-defined]
829837
830838 with init_logging () as log_file :
831839 log_environment ()
832840
833841 window = GUI (app , log_file )
834- # re-resolve themed icons once the event loop is running: Qt's
835- # platform theme detection isn't always settled yet during startup,
836- # so icons set during GUI construction can briefly use the wrong variant
837- QTimer .singleShot (0 , window .refresh_themed_icons )
842+
843+ def refresh_theme () -> None :
844+ # Qt's platform theme detection isn't always settled yet during
845+ # startup, so the stylesheet/icons set above can briefly use the
846+ # wrong variant; re-resolve both once the event loop is running
847+ apply_stylesheet (style_hints .colorScheme ()) # type: ignore [attr-defined]
848+ window .refresh_themed_icons ()
849+
850+ QTimer .singleShot (0 , refresh_theme )
838851 with exception_handler (window .trigger_handle_exception .emit ):
839852 app .exec ()
840853
0 commit comments