Clarify minimal widget sizes in procedure/plugin browser
Using an explicit value of width for the height of the dialog window makes little sense. This makes the size of the dialog window clear. And now the height of the list widget is set with its own macro instead of piggybacking on the dialog window height.
This commit is contained in:
parent
a082e9cc58
commit
8ff7102557
2 changed files with 14 additions and 12 deletions
|
|
@ -45,9 +45,10 @@
|
|||
**/
|
||||
|
||||
|
||||
#define DBL_LIST_WIDTH 250
|
||||
#define DBL_WIDTH (DBL_LIST_WIDTH + 400)
|
||||
#define DBL_HEIGHT 250
|
||||
#define DBL_LIST_WIDTH 250
|
||||
#define DBL_LIST_HEIGHT 250
|
||||
#define DBL_WIDTH 650
|
||||
#define DBL_HEIGHT 400
|
||||
|
||||
|
||||
enum
|
||||
|
|
@ -144,8 +145,8 @@ gimp_proc_browser_dialog_init (GimpProcBrowserDialog *dialog)
|
|||
GtkTreeSelection *selection;
|
||||
GtkWidget *parent;
|
||||
|
||||
gtk_window_set_default_size (GTK_WINDOW (dialog), DBL_WIDTH,
|
||||
DBL_WIDTH - DBL_LIST_WIDTH);
|
||||
gtk_window_set_default_size (GTK_WINDOW (dialog),
|
||||
DBL_WIDTH, DBL_HEIGHT);
|
||||
|
||||
dialog->browser = gimp_browser_new ();
|
||||
gimp_browser_add_search_types (GIMP_BROWSER (dialog->browser),
|
||||
|
|
@ -195,7 +196,7 @@ gimp_proc_browser_dialog_init (GimpProcBrowserDialog *dialog)
|
|||
G_CALLBACK (browser_row_activated),
|
||||
dialog);
|
||||
|
||||
gtk_widget_set_size_request (dialog->tree_view, DBL_LIST_WIDTH, DBL_HEIGHT);
|
||||
gtk_widget_set_size_request (dialog->tree_view, DBL_LIST_WIDTH, DBL_LIST_HEIGHT);
|
||||
gtk_container_add (GTK_CONTAINER (scrolled_window), dialog->tree_view);
|
||||
gtk_widget_show (dialog->tree_view);
|
||||
|
||||
|
|
|
|||
|
|
@ -37,8 +37,9 @@
|
|||
#define PLUG_IN_BINARY "plugin-browser"
|
||||
#define PLUG_IN_ROLE "gimp-plugin-browser"
|
||||
#define DBL_LIST_WIDTH 250
|
||||
#define DBL_WIDTH (DBL_LIST_WIDTH + 400)
|
||||
#define DBL_HEIGHT 250
|
||||
#define DBL_LIST_HEIGHT 250
|
||||
#define DBL_WIDTH 650
|
||||
#define DBL_HEIGHT 400
|
||||
|
||||
|
||||
enum
|
||||
|
|
@ -562,8 +563,8 @@ browser_dialog_new (void)
|
|||
_("_Close"), GTK_RESPONSE_CLOSE,
|
||||
|
||||
NULL);
|
||||
gtk_window_set_default_size (GTK_WINDOW (browser->dialog), DBL_WIDTH,
|
||||
DBL_WIDTH - DBL_LIST_WIDTH);
|
||||
gtk_window_set_default_size (GTK_WINDOW (browser->dialog),
|
||||
DBL_WIDTH, DBL_HEIGHT);
|
||||
|
||||
g_signal_connect (browser->dialog, "response",
|
||||
G_CALLBACK (browser_dialog_response),
|
||||
|
|
@ -641,7 +642,7 @@ browser_dialog_new (void)
|
|||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_window),
|
||||
GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
|
||||
|
||||
gtk_widget_set_size_request (list_view, DBL_LIST_WIDTH, DBL_HEIGHT);
|
||||
gtk_widget_set_size_request (list_view, DBL_LIST_WIDTH, DBL_LIST_HEIGHT);
|
||||
|
||||
selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (list_view));
|
||||
gtk_tree_selection_set_mode (selection, GTK_SELECTION_BROWSE);
|
||||
|
|
@ -703,7 +704,7 @@ browser_dialog_new (void)
|
|||
GTK_SHADOW_IN);
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_window),
|
||||
GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
|
||||
gtk_widget_set_size_request (tree_view, DBL_LIST_WIDTH, DBL_HEIGHT);
|
||||
gtk_widget_set_size_request (tree_view, DBL_LIST_WIDTH, DBL_LIST_HEIGHT);
|
||||
|
||||
selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (tree_view));
|
||||
gtk_tree_selection_set_mode (selection, GTK_SELECTION_BROWSE);
|
||||
|
|
|
|||
Loading…
Reference in a new issue