[haiku-commits] haiku: hrev50791 - src/servers/app/decorator

  • From: jscipione@xxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Mon, 26 Dec 2016 19:15:07 +0100 (CET)

hrev50791 adds 1 changeset to branch 'master'
old head: 6dc87739ba299b48f6a6af6eb1d304016b43f679
new head: 4cf48a7a4424e915ffaf5c23ebbfe9d985578dd7
overview: 
http://cgit.haiku-os.org/haiku/log/?qt=range&q=4cf48a7a4424+%5E6dc87739ba29

----------------------------------------------------------------------------

4cf48a7a4424: App Server: Style fixes to DefaultWindowBehaviour
  
  ...take 2.
  
  Replace 0.0f with 0 as per discussion on -commits
  Break long line differently
  Remove extra whitespace at the beginning of a line

                                     [ John Scipione <jscipione@xxxxxxxxx> ]

----------------------------------------------------------------------------

Revision:    hrev50791
Commit:      4cf48a7a4424e915ffaf5c23ebbfe9d985578dd7
URL:         http://cgit.haiku-os.org/haiku/commit/?id=4cf48a7a4424
Author:      John Scipione <jscipione@xxxxxxxxx>
Date:        Mon Dec 26 18:10:56 2016 UTC

----------------------------------------------------------------------------

1 file changed, 11 insertions(+), 13 deletions(-)
.../app/decorator/DefaultWindowBehaviour.cpp     | 24 +++++++++-----------

----------------------------------------------------------------------------

diff --git a/src/servers/app/decorator/DefaultWindowBehaviour.cpp 
b/src/servers/app/decorator/DefaultWindowBehaviour.cpp
index fd43f9c..1576954 100644
--- a/src/servers/app/decorator/DefaultWindowBehaviour.cpp
+++ b/src/servers/app/decorator/DefaultWindowBehaviour.cpp
@@ -241,7 +241,7 @@ struct DefaultWindowBehaviour::DragState : 
MouseTrackingState {
                        // constrain delta to true change in position
                        delta = fWindow->Frame().LeftTop() - oldLeftTop;
                } else
-                       delta = BPoint(0.0f, 0.0f);
+                       delta = BPoint(0, 0);
        }
 };
 
@@ -261,9 +261,9 @@ struct DefaultWindowBehaviour::ResizeState : 
MouseTrackingState {
        {
                if ((fWindow->Flags() & B_NOT_RESIZABLE) == 0) {
                        if ((fWindow->Flags() & B_NOT_V_RESIZABLE) != 0)
-                               delta.y = 0.0f;
+                               delta.y = 0;
                        if ((fWindow->Flags() & B_NOT_H_RESIZABLE) != 0)
-                               delta.x = 0.0f;
+                               delta.x = 0;
 
                        BPoint oldRightBottom = fWindow->Frame().RightBottom();
 
@@ -272,7 +272,7 @@ struct DefaultWindowBehaviour::ResizeState : 
MouseTrackingState {
                        // constrain delta to true change in size
                        delta = fWindow->Frame().RightBottom() - oldRightBottom;
                } else
-                       delta = BPoint(0.0f, 0.0f);
+                       delta = BPoint(0, 0);
        }
 };
 
@@ -300,9 +300,9 @@ struct DefaultWindowBehaviour::SlideTabState : 
MouseTrackingState {
                location += delta.x;
                AdjustMultiTabLocation(location, true);
                if (fDesktop->SetWindowTabLocation(fWindow, location, true))
-                       delta.y = 0.0f;
+                       delta.y = 0;
                else
-                       delta = BPoint(0.0f, 0.0f);
+                       delta = BPoint(0, 0);
        }
 
        void AdjustMultiTabLocation(float location, bool isShifting)
@@ -328,19 +328,17 @@ struct DefaultWindowBehaviour::SlideTabState : 
MouseTrackingState {
                        return;
 
                if (movingTab->tabOffset > location) {
-                       if (location
-                                       > neighbourTab->tabOffset + 
neighbourTab->tabRect.Width()
-                                       / 2) {
+                       if (location > neighbourTab->tabOffset
+                                       + neighbourTab->tabRect.Width() / 2) {
                                return;
                        }
                } else {
-                       if (location + movingTab->tabRect.Width()
-                                       < neighbourTab->tabOffset + 
neighbourTab->tabRect.Width()
-                                       / 2) {
+                       if (location + movingTab->tabRect.Width() < 
neighbourTab->tabOffset
+                                       + neighbourTab->tabRect.Width() / 2) {
                                return;
                        }
                }
-               
+
                fWindow->MoveToStackPosition(neighbourIndex, isShifting);
        }
 };


Other related posts:

  • » [haiku-commits] haiku: hrev50791 - src/servers/app/decorator - jscipione