bug 1343802 swap vertical scrollbar button dimensions for horizontal scrollbars r=jhorak+328198

MozReview-Commit-ID: 4fK0hFRWn1p

--HG--
extra : rebase_source : 5342134f69a210f2afdcd835dbb4bbbde429b506
This commit is contained in:
Karl Tomlinson 2017-03-21 20:50:36 +13:00
Родитель 2e7cb463b0
Коммит cb62e93514
2 изменённых файлов: 10 добавлений и 3 удалений

Просмотреть файл

@ -2644,10 +2644,11 @@ GetScrollbarMetrics(GtkOrientation aOrientation)
// button
if (hasButtons) {
metrics->size.button = GetMinMarginBox(MOZ_GTK_SCROLLBAR_BUTTON);
// If the buttons will cause Gecko to expand the track to fill
// available breadth, then add to the track border to prevent Gecko
// from expanding the thumb to fill available breadth.
if (aOrientation == GTK_ORIENTATION_HORIZONTAL) {
metrics->size.button.Rotate();
// If the buttons will cause Gecko to expand the track to fill
// available breadth, then add to the track border to prevent Gecko
// from expanding the thumb to fill available breadth.
gint extra = metrics->size.button.height - trackSizeForThumb.height;
if (extra > 0) {
// If extra is odd, then the thumb is 0.5 pixels above

Просмотреть файл

@ -52,6 +52,12 @@ struct MozGtkSize {
gint resultHeight = height + aBorder.top + aBorder.bottom;
return {resultWidth, resultHeight};
}
void Rotate()
{
gint tmp = width;
width = height;
height = tmp;
}
};
typedef struct {