Преглед изворни кода

Fixed cursor bug when minimumsize and maximumsize were the same value

Dalton Nell пре 9 година
родитељ
комит
163f336872
2 измењених фајлова са 2 додато и 3 уклоњено
  1. 1
    2
      main.cpp
  2. 1
    1
      options.cpp

+ 1
- 2
main.cpp Прегледај датотеку

@@ -75,7 +75,6 @@ void constrain( int sx, int sy, int ex, int ey, int padding, int minimumsize, in
75 75
     if ( maximumsize == minimumsize && w == maximumsize && h == maximumsize ) {
76 76
         x = ex - maximumsize/2;
77 77
         y = ey - maximumsize/2;
78
-        xengine->setCursor( slop::Cross );
79 78
     }
80 79
     *rsx = x;
81 80
     *rsy = y;
@@ -231,7 +230,7 @@ int main( int argc, char** argv ) {
231 230
                 // We also detect which way the user is pulling and set the mouse icon accordingly.
232 231
                 bool x = cx > xengine->m_mousex;
233 232
                 bool y = cy > xengine->m_mousey;
234
-                if ( selection->m_width <= 1 && selection->m_height <= 1 ) {
233
+                if ( selection->m_width <= 1 && selection->m_height <= 1 || minimumsize == maximumsize ) {
235 234
                     xengine->setCursor( slop::Cross );
236 235
                 } else if ( !x && !y ) {
237 236
                     xengine->setCursor( slop::LowerRightCorner );

+ 1
- 1
options.cpp Прегледај датотеку

@@ -3,7 +3,7 @@
3 3
 slop::Options* options = new slop::Options();
4 4
 
5 5
 slop::Options::Options() {
6
-    m_version = "v2.0.9";
6
+    m_version = "v2.1.0";
7 7
     m_highlight = false;
8 8
     m_borderSize = 10;
9 9
     m_padding = 0;