diff options
Diffstat (limited to 'src/ui')
-rw-r--r-- | src/ui/labelwidget.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/ui/labelwidget.c b/src/ui/labelwidget.c index a9a2d033..d6cc31cb 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,8 +297,16 @@ 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 | #if SDL_VERSION_ATLEAST(2, 0, 16) && defined (iPlatformApple) | ||
304 | /* A very curious regression in SDL 2.0.16 on macOS. */ | ||
305 | addX_I2(bottomRight_Rect(frameRect), -1), | ||
306 | #else | ||
307 | bottomRight_Rect(frameRect), | ||
308 | #endif | ||
309 | bottomLeft_Rect(frameRect) | ||
300 | }; | 310 | }; |
301 | drawLines_Paint(&p, points + 2, 3, frame2); | 311 | drawLines_Paint(&p, points + 2, 3, frame2); |
302 | drawLines_Paint( | 312 | drawLines_Paint( |