[haiku-commits] haiku: hrev48448 - src/apps/workspaces

  • From: pulkomandy@xxxxxxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Fri, 5 Dec 2014 15:29:48 +0100 (CET)

hrev48448 adds 1 changeset to branch 'master'
old head: c4e8d88f7c53179606b32acb0cab1265eaa47bf3
new head: 8f4cd9c9767f3369b014b840e2c75473ef3f815d
overview: http://cgit.haiku-os.org/haiku/log/?qt=range&q=8f4cd9c+%5Ec4e8d88

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

8f4cd9c: Improve Workspaces Zoom() implementation
  
  * Do not move the window, this is annoying
  * Instead of putting the window at a fixed size, keep the current width
  and adjust the height so the preview has a correct aspect ratio.
  
  Fixes #5034.

                                 [ Adrien Destugues <pulkomandy@xxxxxxxxx> ]

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

Revision:    hrev48448
Commit:      8f4cd9c9767f3369b014b840e2c75473ef3f815d
URL:         http://cgit.haiku-os.org/haiku/commit/?id=8f4cd9c
Author:      Adrien Destugues <pulkomandy@xxxxxxxxx>
Date:        Fri Dec  5 14:28:54 2014 UTC

Ticket:      https://dev.haiku-os.org/ticket/5034

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

1 file changed, 1 insertion(+), 7 deletions(-)
src/apps/workspaces/Workspaces.cpp | 8 +-------

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

diff --git a/src/apps/workspaces/Workspaces.cpp 
b/src/apps/workspaces/Workspaces.cpp
index 5a2d6bd..13493a5 100644
--- a/src/apps/workspaces/Workspaces.cpp
+++ b/src/apps/workspaces/Workspaces.cpp
@@ -731,7 +731,7 @@ WorkspacesWindow::Zoom(BPoint origin, float width, float 
height)
        uint32 columns, rows;
        BPrivate::get_workspaces_layout(&columns, &rows);
 
-       float workspaceWidth = screenWidth / 10;
+       float workspaceWidth = Frame().Width() / columns;
        float workspaceHeight = workspaceWidth / aspectRatio;
 
        width = floor(workspaceWidth * columns);
@@ -746,12 +746,6 @@ WorkspacesWindow::Zoom(BPoint origin, float width, float 
height)
        }
 
        ResizeTo(width, height);
-
-       origin = screen.Frame().RightBottom();
-       origin.x -= kScreenBorderOffset + width;
-       origin.y -= kScreenBorderOffset + height;
-
-       MoveTo(origin);
 }
 
 


Other related posts: