Commit 967a6800 authored by Federico Mena Quintero's avatar Federico Mena Quintero Committed by Federico Mena Quintero

[PATCH 6/7] bgo543308 - Only compute a font-based size if we are in expanded...

[PATCH 6/7] bgo543308 - Only compute a font-based size if we are in expanded mode or one of the OPEN modes
Signed-off-by: default avatarFederico Mena Quintero <federico@novell.com>

svn path=/trunk/; revision=21167
parent 8a8915e0
......@@ -7806,21 +7806,33 @@ gtk_file_chooser_default_get_default_size (GtkFileChooserEmbed *chooser_embed,
GtkRequisition req;
impl = GTK_FILE_CHOOSER_DEFAULT (chooser_embed);
find_good_size_from_style (GTK_WIDGET (chooser_embed), default_width, default_height);
if (impl->preview_widget_active &&
impl->preview_widget &&
GTK_WIDGET_VISIBLE (impl->preview_widget))
if (impl->action == GTK_FILE_CHOOSER_ACTION_OPEN
|| impl->action == GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER
|| impl->expand_folders)
{
gtk_widget_size_request (impl->preview_box, &req);
*default_width += PREVIEW_HBOX_SPACING + req.width;
}
find_good_size_from_style (GTK_WIDGET (chooser_embed), default_width, default_height);
if (impl->extra_widget &&
GTK_WIDGET_VISIBLE (impl->extra_widget))
if (impl->preview_widget_active &&
impl->preview_widget &&
GTK_WIDGET_VISIBLE (impl->preview_widget))
{
gtk_widget_size_request (impl->preview_box, &req);
*default_width += PREVIEW_HBOX_SPACING + req.width;
}
if (impl->extra_widget &&
GTK_WIDGET_VISIBLE (impl->extra_widget))
{
gtk_widget_size_request (impl->extra_align, &req);
*default_height += GTK_BOX (chooser_embed)->spacing + req.height;
}
}
else
{
gtk_widget_size_request (impl->extra_align, &req);
*default_height += GTK_BOX (chooser_embed)->spacing + req.height;
gtk_widget_size_request (GTK_WIDGET (impl), &req);
*default_width = req.width;
*default_height = req.height;
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment