Author: michael_meeks Date: Fri Apr 27 18:13:39 2012 New Revision: 68041 URL: http://svn.opensuse.org/viewcvs/yast?rev=68041&view=rev Log: fix egregious bnc#722053 layout issues, dialog text now fits. Modified: trunk/gtk/src/YGDialog.cc Modified: trunk/gtk/src/YGDialog.cc URL: http://svn.opensuse.org/viewcvs/yast/trunk/gtk/src/YGDialog.cc?rev=68041&r1=68040&r2=68041&view=diff ============================================================================== --- trunk/gtk/src/YGDialog.cc (original) +++ trunk/gtk/src/YGDialog.cc Fri Apr 27 18:13:39 2012 @@ -375,17 +375,16 @@ { // libyui calls YDialog::setSize() to force a geometry recalculation as a // result of changed layout properties + bool resize = false; GtkWidget *window = m_window->getWidget(); if (gtk_widget_get_realized (window)) { gtk_widget_queue_resize (window); width = MIN (width, YUI::app()->displayWidth()); height = MIN (height, YUI::app()->displayHeight()); -#if 1 - bool resize = false; if (isMainDialog()) { - GtkAllocation allocation; - gtk_widget_get_allocation(window, &allocation); - if (allocation.width < width || allocation.height < height) { + GtkAllocation allocation; + gtk_widget_get_allocation(window, &allocation); + if (allocation.width < width || allocation.height < height) { resize = true; width = MAX (width, allocation.width), height = MAX (height, allocation.height); @@ -393,12 +392,11 @@ } else resize = true; - if (resize) -#else - if (!isMainDialog()) -#endif - gtk_window_resize (GTK_WINDOW (window), width, height); } + if (resize) + gtk_window_resize (GTK_WINDOW (window), width, height); + else + gtk_window_set_default_size (GTK_WINDOW (window), width, height); } void YGDialog::highlight (YWidget *ywidget) -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org