Skip to content
Permalink
Browse files

GRAPHICS: Fix modern theme tab widgets being 2px too tall

This was noticeable in the graphics tab of the options dialog when
scrolling down. The widgets would be partially drawn on top of the
tabs.
  • Loading branch information...
bgK committed Oct 7, 2019
1 parent 1d764bd commit eabb81829f29716e949890844029567687626bc8
Showing with 6 additions and 6 deletions.
  1. +6 −6 graphics/VectorRendererSpec.cpp
@@ -1457,7 +1457,7 @@ drawTabAlg(int x1, int y1, int w, int h, int r, PixelType color, VectorRenderer:
PixelType *ptr_fill = (PixelType *)Base::_activeSurface->getBasePtr(x1, y1);

int real_radius = r;
int short_h = h - r + 2;
int short_h = h - r;
int long_h = h;

if (fill_m == kFillDisabled) {
@@ -1562,7 +1562,7 @@ drawTabAlgClip(int x1, int y1, int w, int h, int r, PixelType color, VectorRende
int fill_x = x1, fill_y = y1;

int real_radius = r;
int short_h = h - r + 2;
int short_h = h - r;
int long_h = h;

if (fill_m == kFillDisabled) {
@@ -1679,7 +1679,7 @@ drawTabShadow(int x1, int y1, int w, int h, int r) {
PixelType *ptr_tr = (PixelType *)Base::_activeSurface->getBasePtr(xstart + width - r, ystart + r);
PixelType *ptr_fill = (PixelType *)Base::_activeSurface->getBasePtr(xstart, ystart);

int short_h = height - (2 * r) + 2;
int short_h = height - (2 * r);
PixelType color = _format.RGBToColor(0, 0, 0);

BE_RESET();
@@ -1743,7 +1743,7 @@ drawTabShadowClip(int x1, int y1, int w, int h, int r) {
int tl_x = xstart + r, tl_y = ystart + r;
int fill_x = xstart, fill_y = ystart;

int short_h = height - (2 * r) + 2;
int short_h = height - (2 * r);
PixelType color = _format.RGBToColor(0, 0, 0);

BE_RESET();
@@ -3482,7 +3482,7 @@ drawTabAlg(int x1, int y1, int w, int h, int r, PixelType color, VectorRenderer:
}
}

int short_h = h - r + 2;
int short_h = h - r;

ptr_fill += pitch * real_radius;
while (short_h--) {
@@ -3513,7 +3513,7 @@ drawTabAlg(int x1, int y1, int w, int h, int r, PixelType color, VectorRenderer:
color1 = color2 = color;

int long_h = h;
int short_h = h - real_radius + 2;
int short_h = h - real_radius;
x = real_radius;
y = 0;
T = 0;

0 comments on commit eabb818

Please sign in to comment.
You can’t perform that action at this time.