From 45fc0e0951fbc3c79ef5e4002a55b5dfb0d6e88f Mon Sep 17 00:00:00 2001 From: Giannis Adamopoulos Date: Wed, 13 Apr 2011 18:25:58 +0000 Subject: [PATCH] [explorer] - Use the shell default auto-arrangement positioning. Aloow using custom positioning when configured. This fixes the positioning of icons of the desktop to look like windows svn path=/trunk/; revision=51330 --- reactos/base/shell/explorer/desktop/desktop.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/reactos/base/shell/explorer/desktop/desktop.cpp b/reactos/base/shell/explorer/desktop/desktop.cpp index 99b990bec39..e7787055b8d 100644 --- a/reactos/base/shell/explorer/desktop/desktop.cpp +++ b/reactos/base/shell/explorer/desktop/desktop.cpp @@ -496,8 +496,6 @@ DesktopShellView::DesktopShellView(HWND hwnd, IShellView* pShellView) { _hwndListView = GetNextWindow(hwnd, GW_CHILD); - SetWindowStyle(_hwndListView, GetWindowStyle(_hwndListView)&~LVS_ALIGNMASK);//|LVS_ALIGNTOP|LVS_AUTOARRANGE); - // work around for Windows NT, Win 98, ... // Without this the desktop has mysteriously only a size of 800x600 pixels. ClientRect rect(hwnd); @@ -506,9 +504,8 @@ DesktopShellView::DesktopShellView(HWND hwnd, IShellView* pShellView) // subclass background window new BackgroundWindow(_hwndListView); - _icon_algo = 1; // default icon arrangement + _icon_algo = 0; // default icon arrangement - PositionIcons(); InitDragDrop(); } @@ -737,6 +734,9 @@ void DesktopShellView::PositionIcons(int dir) RECT work_area; SystemParametersInfo(SPI_GETWORKAREA, 0, &work_area, 0); + /* disable default allignment */ + SetWindowStyle(_hwndListView, GetWindowStyle(_hwndListView)&~LVS_ALIGNMASK);//|LVS_ALIGNTOP|LVS_AUTOARRANGE); + const POINTS& dir1 = s_align_dir1[_icon_algo]; const POINTS& dir2 = s_align_dir2[_icon_algo]; const POINTS& start_pos = s_align_start[_icon_algo];