diff options
Diffstat (limited to 'src/ui/labelwidget.c')
-rw-r--r-- | src/ui/labelwidget.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/ui/labelwidget.c b/src/ui/labelwidget.c index a9a2d033..edc36a49 100644 --- a/src/ui/labelwidget.c +++ b/src/ui/labelwidget.c | |||
@@ -30,6 +30,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ | |||
30 | #include "keys.h" | 30 | #include "keys.h" |
31 | #include "touch.h" | 31 | #include "touch.h" |
32 | 32 | ||
33 | #include <SDL_version.h> | ||
34 | |||
33 | struct Impl_LabelWidget { | 35 | struct Impl_LabelWidget { |
34 | iWidget widget; | 36 | iWidget widget; |
35 | iString srcLabel; | 37 | iString srcLabel; |
@@ -295,9 +297,18 @@ static void draw_LabelWidget_(const iLabelWidget *d) { | |||
295 | iRect frameRect = adjusted_Rect(rect, zero_I2(), init1_I2(-1)); | 297 | iRect frameRect = adjusted_Rect(rect, zero_I2(), init1_I2(-1)); |
296 | if (isButton) { | 298 | if (isButton) { |
297 | iInt2 points[] = { | 299 | iInt2 points[] = { |
298 | bottomLeft_Rect(frameRect), topLeft_Rect(frameRect), topRight_Rect(frameRect), | 300 | bottomLeft_Rect(frameRect), |
299 | bottomRight_Rect(frameRect), bottomLeft_Rect(frameRect) | 301 | topLeft_Rect(frameRect), |
302 | topRight_Rect(frameRect), | ||
303 | bottomRight_Rect(frameRect), | ||
304 | bottomLeft_Rect(frameRect) | ||
300 | }; | 305 | }; |
306 | #if SDL_VERSION_ATLEAST(2, 0, 16) | ||
307 | if (isOpenGLRenderer_Window()) { | ||
308 | /* A very curious regression in SDL 2.0.16. */ | ||
309 | points[3].x--; | ||
310 | } | ||
311 | #endif | ||
301 | drawLines_Paint(&p, points + 2, 3, frame2); | 312 | drawLines_Paint(&p, points + 2, 3, frame2); |
302 | drawLines_Paint( | 313 | drawLines_Paint( |
303 | &p, points, !isHover && flags & d->flags.noTopFrame ? 2 : 3, frame); | 314 | &p, points, !isHover && flags & d->flags.noTopFrame ? 2 : 3, frame); |