[dia] Tweak initial size of the file-save-at-exit dialog
- From: Hans Breuer <hans src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [dia] Tweak initial size of the file-save-at-exit dialog
- Date: Sat, 18 May 2013 18:27:08 +0000 (UTC)
commit d2148c377c7c54a632243d1874c4574976846dbb
Author: Hans Breuer <hans breuer org>
Date: Sat May 18 17:52:38 2013 +0200
Tweak initial size of the file-save-at-exit dialog
Use the GDK_HINT_ASPECT and golden ration to have a more
pleasant default appearance of the dialog. It is still
only used for the integrated UI case.
app/exit_dialog.c | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
---
diff --git a/app/exit_dialog.c b/app/exit_dialog.c
index d9392cf..e4c5dec 100644
--- a/app/exit_dialog.c
+++ b/app/exit_dialog.c
@@ -95,6 +95,8 @@ exit_dialog_make (GtkWindow * parent_window,
GtkCellRenderer * renderer;
GtkTreeViewColumn * column;
+ GdkGeometry geometry = { 0 };
+
gtk_box_pack_start (vbox, label, FALSE, FALSE, 0);
gtk_widget_show (label);
@@ -165,7 +167,13 @@ exit_dialog_make (GtkWindow * parent_window,
g_signal_connect (G_OBJECT (dialog), "destroy",
G_CALLBACK (exit_dialog_destroy),
treeview);
-
+
+ /* golden ratio */
+ geometry.min_aspect = 0.618;
+ geometry.max_aspect = 1.618;
+ geometry.win_gravity = GDK_GRAVITY_CENTER;
+ gtk_window_set_geometry_hints (GTK_WINDOW (dialog), GTK_WIDGET (vbox), &geometry,
+ GDK_HINT_ASPECT|GDK_HINT_WIN_GRAVITY);
return dialog;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]