Bug 513006 - Some scrollbars disappear if GTK2 theme has scrollbar buttons turned off r=roc

--HG--
extra : rebase_source : ab867f6ae611fda355be336b8115106d1b6fbd58
This commit is contained in:
Michael Ventnor 2011-05-11 14:54:12 +10:00
parent e5dc19237a
commit 6495d28112

View File

@ -1037,6 +1037,23 @@ nsNativeThemeGTK::GetMinimumWidgetSize(nsRenderingContext* aContext,
*aIsOverridable = PR_FALSE;
}
break;
case NS_THEME_SCROLLBAR_TRACK_HORIZONTAL:
case NS_THEME_SCROLLBAR_TRACK_VERTICAL:
{
MozGtkScrollbarMetrics metrics;
moz_gtk_get_scrollbar_metrics(&metrics);
if (aWidgetType == NS_THEME_SCROLLBAR_TRACK_VERTICAL) {
aResult->width = metrics.slider_width;
aResult->height = metrics.min_slider_size;
} else {
aResult->height = metrics.slider_width;
aResult->width = metrics.min_slider_size;
}
*aIsOverridable = PR_FALSE;
}
break;
case NS_THEME_SCROLLBAR_THUMB_VERTICAL:
case NS_THEME_SCROLLBAR_THUMB_HORIZONTAL:
{