Using `* { }` in CSS is not the best practice.. though it does work,
this can have unintended side effects. Having a CSS class defined here
for the main window is better.
---
gnubg.css | 2 +-
gtkgame.c | 6 ++++++
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/gnubg.css b/gnubg.css
index 0623ae72..6aff3098 100644
--- a/gnubg.css
+++ b/gnubg.css
@@ -19,7 +19,7 @@
* Default size was fine initially but becomes a bit small
* for today (2025) typical 1920x1080 screen.
*/
-* {
+.gnubg-main {
font-size: 16px;
}
diff --git a/gtkgame.c b/gtkgame.c
index 89517130..022099d3 100644
--- a/gtkgame.c
+++ b/gtkgame.c
@@ -4029,6 +4029,12 @@ CreateMainWindow(void)
GtkActionGroup *action_group;
pwMain = gtk_window_new(GTK_WINDOW_TOPLEVEL);
+
+#if GTK_CHECK_VERSION(3,0,0)
+ gtk_style_context_add_class(
+ gtk_widget_get_style_context(pwMain), "gnubg-main");
+#endif
+
gtk_window_maximize(GTK_WINDOW(pwMain));
SetPanelWidget(WINDOW_MAIN, pwMain);
gtk_window_set_role(GTK_WINDOW(pwMain), "main");
--
2.51.0