don't allocate the popup smaller than the combobox. Fixes bug #59660.
2004-05-11 Michael Natterer <mitch@gimp.org> * gtk/gtkcombobox.c (gtk_combo_box_popup) (gtk_combo_box_menu_button_press): don't allocate the popup smaller than the combobox. Fixes bug #59660.
This commit is contained in:
committed by
Michael Natterer
parent
cfafea3205
commit
a2bd3c74be
@ -1170,8 +1170,13 @@ gtk_combo_box_popup (GtkComboBox *combo_box)
|
||||
|
||||
if (combo_box->priv->wrap_width == 0)
|
||||
{
|
||||
GtkRequisition requisition;
|
||||
|
||||
width = GTK_WIDGET (combo_box)->allocation.width;
|
||||
gtk_widget_set_size_request (combo_box->priv->popup_widget, width, -1);
|
||||
gtk_widget_size_request (combo_box->priv->popup_widget, &requisition);
|
||||
|
||||
gtk_widget_set_size_request (combo_box->priv->popup_widget,
|
||||
MAX (width, requisition.width), -1);
|
||||
}
|
||||
|
||||
gtk_menu_popup (GTK_MENU (combo_box->priv->popup_widget),
|
||||
@ -1945,7 +1950,6 @@ gtk_combo_box_menu_button_press (GtkWidget *widget,
|
||||
gpointer user_data)
|
||||
{
|
||||
GtkComboBox *combo_box = GTK_COMBO_BOX (user_data);
|
||||
gint width;
|
||||
|
||||
if (! GTK_IS_MENU (combo_box->priv->popup_widget))
|
||||
return FALSE;
|
||||
@ -1959,8 +1963,14 @@ gtk_combo_box_menu_button_press (GtkWidget *widget,
|
||||
|
||||
if (combo_box->priv->wrap_width == 0)
|
||||
{
|
||||
GtkRequisition requisition;
|
||||
gint width;
|
||||
|
||||
width = GTK_WIDGET (combo_box)->allocation.width;
|
||||
gtk_widget_set_size_request (combo_box->priv->popup_widget, width, -1);
|
||||
gtk_widget_size_request (combo_box->priv->popup_widget, &requisition);
|
||||
|
||||
gtk_widget_set_size_request (combo_box->priv->popup_widget,
|
||||
MAX (width, requisition.width), -1);
|
||||
}
|
||||
|
||||
gtk_menu_popup (GTK_MENU (combo_box->priv->popup_widget),
|
||||
|
||||
Reference in New Issue
Block a user