diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-08-15 19:50:22 +0300 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-08-15 19:50:22 +0300 |
commit | 32e7104dd03357dfd2032d200c528e88656daa69 (patch) | |
tree | 11184efde581fa6edd915bd727ea852db863df1f /src/ui/labelwidget.c | |
parent | 9d7469ded746cbfa1e86c1ecd67e4a36f29f635b (diff) | |
parent | 0cbb300784aab7c8bb6bcbcfb044a48a5f9a19ac (diff) |
Merge branch 'dev' into work/v1.7
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); |