forked from AuroraMiddleware/gtk
notebook: Include arrow size in tab size computation
We don't want tabs to resize when a 2nd page is added, just because the scroll arrows are now visible. And we do want the arrow size to be included. Note: Previosuly this code was never run, as the check requisition->width < tab_width was only run when tab_width wasn't computed, so was still equal to 0 (same for the height). So what this patch essentially does it add the functionality of the if switch.
This commit is contained in:
parent
2108e42306
commit
975f735fb7
@ -2113,8 +2113,7 @@ gtk_notebook_size_request (GtkWidget *widget,
|
||||
if (tab_height == 0)
|
||||
break;
|
||||
|
||||
if (priv->scrollable && vis_pages > 1 &&
|
||||
requisition->width < tab_width)
|
||||
if (priv->scrollable)
|
||||
tab_height = MAX (tab_height, scroll_arrow_hlength);
|
||||
|
||||
tab_height = MAX (tab_height, action_widget_requisition[ACTION_WIDGET_START].height);
|
||||
@ -2160,10 +2159,8 @@ gtk_notebook_size_request (GtkWidget *widget,
|
||||
if (tab_width == 0)
|
||||
break;
|
||||
|
||||
if (priv->scrollable && vis_pages > 1 &&
|
||||
requisition->height < tab_height)
|
||||
tab_width = MAX (tab_width,
|
||||
arrow_spacing + 2 * scroll_arrow_vlength);
|
||||
if (priv->scrollable)
|
||||
tab_width = MAX (tab_width, arrow_spacing + 2 * scroll_arrow_vlength);
|
||||
|
||||
tab_width = MAX (tab_width, action_widget_requisition[ACTION_WIDGET_START].width);
|
||||
tab_width = MAX (tab_width, action_widget_requisition[ACTION_WIDGET_END].width);
|
||||
|
Loading…
Reference in New Issue
Block a user