commit: a5da22c81a448b4f66eaed1952cff8db2b609bc3
parent: 565482a6df05e2955ef1dbda293ad3ada7e3b639
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date: Wed, 20 Mar 2019 16:01:22 +0100
Make the default window size configurable
Diffstat:
2 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/badwolf.c b/badwolf.c
@@ -471,7 +471,8 @@ int main(int argc, char *argv[])
window->notebook = gtk_notebook_new();
window->new_tab = gtk_button_new_from_icon_name("tab-new-symbolic", GTK_ICON_SIZE_SMALL_TOOLBAR);
- gtk_window_set_default_size(GTK_WINDOW(window->main_window), 800, 600);
+ gtk_window_set_default_size(
+ GTK_WINDOW(window->main_window), BADWOLF_DEFAULT_WIDTH, BADWOLF_DEFAULT_HEIGHT);
gtk_window_set_role(GTK_WINDOW(window->main_window), "browser");
gtk_widget_set_tooltip_text(window->new_tab, "Open new tab");
diff --git a/config.h b/config.h
@@ -26,3 +26,13 @@
// BADWOLF_TOOLBAR_PADDING: Amount of padding between toolbar elements
#define BADWOLF_TOOLBAR_PADDING 0
+
+/*
+ * BADWOLF_DEFAULT_WIDTH / BADWOLF_DEFAULT_HEIGHT:
+ * Used to define the default width/height of the window,
+ * useful for floating Window Managers, probably useless in tiling ones
+ *
+ * See https://developer.gnome.org/gtk3/stable/GtkWindow.html#gtk-window-set-default-size
+ */
+#define BADWOLF_DEFAULT_WIDTH 800
+#define BADWOLF_DEFAULT_HEIGHT 600