mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 416868 - "Size of native style toolkit arrow" (Correct arrow rect and make it advertise its size) [p=frnchfrgg-mozbugs@altern.org (RIVAUD Julien [_FrnchFrgg_]) r=Ventron sr=roc a1.9=damons]
This commit is contained in:
parent
0a0bdf78b2
commit
25afe20eb6
@ -1638,10 +1638,8 @@ moz_gtk_downarrow_paint(GdkDrawable* drawable, GdkRectangle* rect,
|
||||
ensure_button_arrow_widget();
|
||||
style = gButtonArrowWidget->style;
|
||||
|
||||
arrow_rect.x = rect->x + 1 + XTHICKNESS(style);
|
||||
arrow_rect.y = rect->y + 1 + YTHICKNESS(style);
|
||||
arrow_rect.width = MAX(1, rect->width - (arrow_rect.x - rect->x) * 2);
|
||||
arrow_rect.height = MAX(1, rect->height - (arrow_rect.y - rect->y) * 2);
|
||||
calculate_arrow_rect(gButtonArrowWidget, rect, &arrow_rect,
|
||||
GTK_TEXT_DIR_LTR);
|
||||
|
||||
TSOffsetStyleGCs(style, arrow_rect.x, arrow_rect.y);
|
||||
gtk_paint_arrow(style, drawable, state_type, shadow_type, cliprect,
|
||||
@ -2701,6 +2699,19 @@ moz_gtk_get_tab_scroll_arrow_size(gint* width, gint* height)
|
||||
return MOZ_GTK_SUCCESS;
|
||||
}
|
||||
|
||||
gint
|
||||
moz_gtk_get_downarrow_size(gint* width, gint* height)
|
||||
{
|
||||
GtkRequisition requisition;
|
||||
ensure_button_arrow_widget();
|
||||
|
||||
gtk_widget_size_request(gButtonArrowWidget, &requisition);
|
||||
*width = requisition.width;
|
||||
*height = requisition.height;
|
||||
|
||||
return MOZ_GTK_SUCCESS;
|
||||
}
|
||||
|
||||
gint
|
||||
moz_gtk_get_toolbar_separator_width(gint* size)
|
||||
{
|
||||
|
@ -352,6 +352,15 @@ gint moz_gtk_get_combo_box_entry_button_size(gint* width, gint* height);
|
||||
*/
|
||||
gint moz_gtk_get_tab_scroll_arrow_size(gint* width, gint* height);
|
||||
|
||||
/**
|
||||
* Get the desired size of a toolbar button dropdown arrow
|
||||
* width: [OUT] the desired width
|
||||
* height: [OUT] the desired height
|
||||
*
|
||||
* returns: MOZ_GTK_SUCCESS if there was no error, an error code otherwise
|
||||
*/
|
||||
gint moz_gtk_get_downarrow_size(gint* width, gint* height);
|
||||
|
||||
/**
|
||||
* Get the desired size of a toolbar separator
|
||||
* size: [OUT] the desired width
|
||||
|
@ -1116,7 +1116,12 @@ nsNativeThemeGTK::GetMinimumWidgetSize(nsIRenderingContext* aContext,
|
||||
*aIsOverridable = PR_FALSE;
|
||||
}
|
||||
break;
|
||||
|
||||
case NS_THEME_TOOLBAR_BUTTON_DROPDOWN:
|
||||
{
|
||||
moz_gtk_get_downarrow_size(&aResult->width, &aResult->height);
|
||||
*aIsOverridable = PR_FALSE;
|
||||
}
|
||||
break;
|
||||
case NS_THEME_CHECKBOX_CONTAINER:
|
||||
case NS_THEME_RADIO_CONTAINER:
|
||||
case NS_THEME_CHECKBOX_LABEL:
|
||||
|
Loading…
Reference in New Issue
Block a user