[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdenonbeta/krecipes/src/widgets
From:       Unai Garro <Unai.Garro () ee ! ed ! ac ! uk>
Date:       2003-11-21 6:29:39
[Download RAW message or body]

CVS commit by uga: 

Improve resizing, and set cursor correctly, tracking the mouse (no clicking necessary)


  M +15 -1     kremenu.cpp   1.7


--- kdenonbeta/krecipes/src/widgets/kremenu.cpp  #1.6:1.7
@@ -30,4 +30,5 @@ widgetNumber=0; // Initially we have no 
 activeButton=0; // Button that is highlighted
 dragging=false;
+setMouseTracking(true);
 }
 
@@ -56,5 +57,8 @@ if (x > (width()-15))
         setCursor(QCursor(Qt::SplitHCursor));
         }
-
+else
+        {
+        setCursor(QCursor(Qt::ArrowCursor));
+        }
 // If already dragging, resize
 if (dragging)
@@ -71,4 +75,9 @@ if (dragging)
                         xOrig=xDest;yOrig=yDest;
                         }
+                else
+                        {
+                        resize(maximumWidth(),height());
+                        xOrig=xDest;yOrig=yDest;
+                        }
                 }
         else if (xDest<xOrig) // Reduce menu size
@@ -78,4 +87,9 @@ if (dragging)
                         {
                         resize(width()-xDecrease,height());
+                        xOrig=xDest;yOrig=yDest;
+                        }
+                else
+                        {
+                        resize(minimumWidth(),height());
                         xOrig=xDest;yOrig=yDest;
                         }


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic