Cleanup: Action zone coordinates
authorDalai Felinto <dfelinto@gmail.com>
Tue, 4 Dec 2018 19:40:28 +0000 (17:40 -0200)
committerDalai Felinto <dfelinto@gmail.com>
Tue, 4 Dec 2018 19:42:31 +0000 (17:42 -0200)
No functional changes, but it makes all the coordinates more consistent
(going from small to larger values). It helps debugging in the future
to be able to rule out vertex order as a culprit.

source/blender/editors/screen/area.c

index 9e73fea12ce6b860542018e2ea1578aabcb9dc39..c6af7cda2209ffe34af7c9814db2baaa614b60c8 100644 (file)
@@ -778,20 +778,20 @@ static void area_azone_initialize(wmWindow *win, const bScreen *screen, ScrArea
             sa->totrct.xmin + (AZONESPOT - 1),
             sa->totrct.ymin + (AZONESPOT - 1)},
            /* Bottom-right. */
-           {sa->totrct.xmax,
+           {sa->totrct.xmax - (AZONESPOT - 1),
             sa->totrct.ymin,
-            sa->totrct.xmax - (AZONESPOT - 1),
+            sa->totrct.xmax,
             sa->totrct.ymin + (AZONESPOT - 1)},
            /* Top-left. */
            {sa->totrct.xmin,
-            sa->totrct.ymax,
+            sa->totrct.ymax - (AZONESPOT - 1),
             sa->totrct.xmin + (AZONESPOT - 1),
-            sa->totrct.ymax - (AZONESPOT - 1)},
+            sa->totrct.ymax},
            /* Top-right. */
-           {sa->totrct.xmax,
-            sa->totrct.ymax,
-            sa->totrct.xmax - (AZONESPOT - 1),
-            sa->totrct.ymax - (AZONESPOT - 1)}};
+           {sa->totrct.xmax - (AZONESPOT - 1),
+            sa->totrct.ymax - (AZONESPOT - 1),
+            sa->totrct.xmax,
+            sa->totrct.ymax}};
 
        for (int i = 0; i < 4; i++) {
                /* can't click on bottom corners on OS X, already used for resizing */