mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-02 07:05:24 +00:00
Bug 407069 - "GTK Menus ignore native vertical padding" [p=ispence@gmail.com (Ian Spence) r+sr=roc a1.9=beltzner]
This commit is contained in:
parent
acd47ee708
commit
b0414e42f0
@ -2115,6 +2115,17 @@ moz_gtk_get_toolbar_separator_width(gint* size)
|
||||
return MOZ_GTK_SUCCESS;
|
||||
}
|
||||
|
||||
gint
|
||||
moz_gtk_get_menu_popup_vertical_padding(gint* vertical_padding)
|
||||
{
|
||||
ensure_menu_popup_widget();
|
||||
gtk_widget_style_get(gMenuPopupWidget,
|
||||
"vertical-padding", vertical_padding,
|
||||
NULL);
|
||||
|
||||
return MOZ_GTK_SUCCESS;
|
||||
}
|
||||
|
||||
gint
|
||||
moz_gtk_get_expander_size(gint* size)
|
||||
{
|
||||
|
@ -323,6 +323,14 @@ gint moz_gtk_get_toolbar_separator_width(gint* size);
|
||||
*/
|
||||
gint moz_gtk_get_expander_size(gint* size);
|
||||
|
||||
/**
|
||||
* Get the vertical padding for menu popups
|
||||
* vertical_padding: [OUT] the vertical padding for the menu popup
|
||||
*
|
||||
* returns: MOZ_GTK_SUCCESS if there was no error, an error code otherwise
|
||||
*/
|
||||
gint moz_gtk_get_menu_popup_vertical_padding(gint* vertical_padding);
|
||||
|
||||
/**
|
||||
* Get the desired height of a menu separator
|
||||
* size: [OUT] the desired height
|
||||
|
@ -814,6 +814,14 @@ nsNativeThemeGTK::GetWidgetPadding(nsIDeviceContext* aContext,
|
||||
return PR_TRUE;
|
||||
}
|
||||
|
||||
if (aWidgetType == NS_THEME_MENUPOPUP) {
|
||||
gint vertical_padding;
|
||||
moz_gtk_get_menu_popup_vertical_padding(&vertical_padding);
|
||||
|
||||
aResult->SizeTo(0, vertical_padding, 0, vertical_padding);
|
||||
return PR_TRUE;
|
||||
}
|
||||
|
||||
return PR_FALSE;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user