From e18f729488f68cf0a8dbe51de9219b4971f48d79 Mon Sep 17 00:00:00 2001 From: Přemysl Eric Janouch Date: Mon, 25 Jul 2022 21:08:56 +0200 Subject: Add thumbnail size to GSettings --- fiv.c | 10 ++++++---- fiv.gschema.xml | 13 ++++++++++++- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/fiv.c b/fiv.c index 75ee314..b7c0848 100644 --- a/fiv.c +++ b/fiv.c @@ -1912,10 +1912,6 @@ main(int argc, char *argv[]) gtk_icon_theme_add_resource_path( gtk_icon_theme_get_default(), "/org/gnome/design/IconLibrary/"); - GSettings *settings = g_settings_new(PROJECT_NS PROJECT_NAME); - if (g_settings_get_boolean(settings, "dark-theme")) - toggle_sunlight(); - GtkCssProvider *provider = gtk_css_provider_new(); gtk_css_provider_load_from_data( provider, stylesheet, sizeof stylesheet - 1, NULL); @@ -2004,6 +2000,12 @@ main(int argc, char *argv[]) gtk_container_add(GTK_CONTAINER(menu_box), g.stack); gtk_container_add(GTK_CONTAINER(g.window), menu_box); + GSettings *settings = g_settings_new(PROJECT_NS PROJECT_NAME); + if (g_settings_get_boolean(settings, "dark-theme")) + toggle_sunlight(); + g_object_set(g.browser, "thumbnail-size", + g_settings_get_enum(settings, "thumbnail-size"), NULL); + // Try to get half of the screen vertically, in 4:3 aspect ratio. // // We need the GdkMonitor before the GtkWindow has a GdkWindow (i.e., diff --git a/fiv.gschema.xml b/fiv.gschema.xml index dfddfd1..84a66ba 100644 --- a/fiv.gschema.xml +++ b/fiv.gschema.xml @@ -1,5 +1,12 @@ + + + + + + + true @@ -12,7 +19,11 @@ false - Use a dark theme variant + Use a dark theme variant on start-up + + + 'Normal' + Thumbnail size to assume on start-up -- cgit v1.2.3-70-g09d2