зеркало из https://github.com/mozilla/gecko-dev.git
bug 1343802 swap vertical scrollbar button dimensions for horizontal scrollbars r=jhorak+328198
MozReview-Commit-ID: 4fK0hFRWn1p
This commit is contained in:
Родитель
a9e3d6db57
Коммит
e9f17ddd35
|
@ -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 {
|
||||
|
|
Загрузка…
Ссылка в новой задаче