[haiku-commits] haiku: hrev48734 - src/kits/tracker data/artwork/icons

  • From: jscipione@xxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Tue, 27 Jan 2015 22:21:52 +0100 (CET)

hrev48734 adds 1 changeset to branch 'master'
old head: d21c5eedf3136befece488de089359dc8ef80759
new head: e7803cf1f69a81b1c77880518ba16b6708c1efdb
overview: 
http://cgit.haiku-os.org/haiku/log/?qt=range&q=e7803cf1f69a+%5Ed21c5eedf313

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

e7803cf1f69a: Tracker: use the Layout API wherever possible.
  
  Sorry this commit is so big, but I couldn't figure out how to do this
  incrementally without breaking things.
  
  I wasn't able to just merge Aldeck's branch, as it was a partial refactor
  of Tracker and didn't just rewrite the UI creation code to use layouts,
  and the changes for PM (e.g. addon loading, virtual directories) made it
  very hard to merge (it doesn't even compile after an automerge) so rather
  than spending time on that, I decided it'd be better to recreate his work.
  
  Miscellaneous notes:
   - This partially cleans up BPoseView & subclasses and BContainerWindow &
     subclasses -- none of the subclasses and child views abuse the parent's
     state, child views, or layout now.
   - BFilePanel and BDeskWindow are not on layouts, because:
     * BFilePanel docs in the Be Book instructed developers that wanted to
       modify BFilePanel's layout to just use FindView() and then move the
       views around. Obviously making it use layouts will break all BeOS
       apps that do this, and there are a lot of them (Pe, WonderBrush are
       just two examples.) I've added a note to the TODO list for R2 to create
       a layout-compatible API for this.
     * Some replicants (Workspaces, for example) rely on manipulating
       BDeskWindow's drawing state. This is incompatible with layouts, as
       at least in the case of Workspaces, it breaks a layouted version
       of BDeskWindow entirely.
   - I noticed a lot of #ifdef BEOS_VERSION ... gunk in the code. Tracker
     probably didn't build on BeOS just before this commit, and now it
     won't for sure, so I intend to go through and clean that out in the
     near future.
  
  This commit also fixes:
   - enhancement #4996 (make Tracker's navigator use vector icons)
   - bug #3039 (resizing OpenWithWindow flashes the blue border)
   - bug #3889 (OpenWithWindow redraw errors)
   - a regression that was a side effect of "dynamic_cast<BDeskWindow*>(this)"
     always returning NULL when run in the constructor. I just added a "bool
     isDeskWindow" to BContainerWindow's constructor that is only set to true
     by BDeskWindow.
   - a copy&paste error in VirtualDirectoryPoseView that was passing "uint32
     resizeMode" as "uint32 viewMode".
  
  Thanks to Alexandre for his original branch (it was a very useful
  reference), Axel (for some miscellaneous advice & encouragement),
  Adrien & Humdinger (for user interface review), and Diver (for user
  interface review & testing).

                              [ Augustin Cavalier <waddlesplash@xxxxxxxxx> ]

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

Revision:    hrev48734
Commit:      e7803cf1f69a81b1c77880518ba16b6708c1efdb
URL:         http://cgit.haiku-os.org/haiku/commit/?id=e7803cf1f69a
Author:      Augustin Cavalier <waddlesplash@xxxxxxxxx>
Date:        Tue Jan 27 06:41:22 2015 UTC

Ticket:      https://dev.haiku-os.org/ticket/3039
Ticket:      https://dev.haiku-os.org/ticket/3889
Ticket:      https://dev.haiku-os.org/ticket/4996

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

32 files changed, 494 insertions(+), 1058 deletions(-)
data/artwork/icons/Action_GoBack_3_Large      | Bin 0 -> 3899 bytes
data/artwork/icons/Action_GoForward_3_Large   | Bin 0 -> 3899 bytes
data/artwork/icons/Action_GoUp_3_Large        | Bin 0 -> 3899 bytes
src/kits/tracker/ContainerWindow.cpp          | 438 ++++++++--------------
src/kits/tracker/ContainerWindow.h            |  39 +-
src/kits/tracker/CountView.cpp                |  50 +--
src/kits/tracker/CountView.h                  |   9 +-
src/kits/tracker/DeskWindow.cpp               |  22 +-
src/kits/tracker/DeskWindow.h                 |   2 +-
src/kits/tracker/DesktopPoseView.cpp          |   5 +-
src/kits/tracker/DesktopPoseView.h            |   3 +-
src/kits/tracker/FilePanelPriv.cpp            |  89 ++++-
src/kits/tracker/FilePanelPriv.h              |  10 +-
src/kits/tracker/Navigator.cpp                | 192 ++--------
src/kits/tracker/Navigator.h                  |  34 +-
src/kits/tracker/OpenWithWindow.cpp           |  98 +++--
src/kits/tracker/OpenWithWindow.h             |  16 +-
src/kits/tracker/PoseView.cpp                 | 147 ++------
src/kits/tracker/PoseView.h                   |  40 +-
src/kits/tracker/QueryContainerWindow.cpp     |  19 +-
src/kits/tracker/QueryContainerWindow.h       |   8 +-
src/kits/tracker/QueryPoseView.cpp            |   4 +-
src/kits/tracker/QueryPoseView.h              |   2 +-
src/kits/tracker/TitleView.cpp                |   4 +-
src/kits/tracker/TitleView.h                  |   2 +-
src/kits/tracker/Tracker.cpp                  |   4 +-
src/kits/tracker/TrackerIcons.h               |  12 +-
src/kits/tracker/TrackerIcons.rdef            | 278 ++------------
src/kits/tracker/VirtualDirectoryPoseView.cpp |   5 +-
src/kits/tracker/VirtualDirectoryPoseView.h   |   4 +-
src/kits/tracker/VirtualDirectoryWindow.cpp   |  13 +-
src/kits/tracker/VirtualDirectoryWindow.h     |   3 +-

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

diff --git a/data/artwork/icons/Action_GoBack_3_Large 
b/data/artwork/icons/Action_GoBack_3_Large
new file mode 100644
index 0000000..c019d52
Binary files /dev/null and b/data/artwork/icons/Action_GoBack_3_Large differ
diff --git a/data/artwork/icons/Action_GoForward_3_Large 
b/data/artwork/icons/Action_GoForward_3_Large
new file mode 100644
index 0000000..8c150e5
Binary files /dev/null and b/data/artwork/icons/Action_GoForward_3_Large differ
diff --git a/data/artwork/icons/Action_GoUp_3_Large 
b/data/artwork/icons/Action_GoUp_3_Large
new file mode 100644
index 0000000..e21fabf
Binary files /dev/null and b/data/artwork/icons/Action_GoUp_3_Large differ
diff --git a/src/kits/tracker/ContainerWindow.cpp 
b/src/kits/tracker/ContainerWindow.cpp
index 12b91a1..c9b3efe 100644
--- a/src/kits/tracker/ContainerWindow.cpp
+++ b/src/kits/tracker/ContainerWindow.cpp
@@ -44,6 +44,8 @@ All rights reserved.
 #include <Directory.h>
 #include <Entry.h>
 #include <FindDirectory.h>
+#include <GridView.h>
+#include <GroupLayout.h>
 #include <Keymap.h>
 #include <Locale.h>
 #include <MenuItem.h>
@@ -116,14 +118,11 @@ namespace BPrivate {
 
 class DraggableContainerIcon : public BView {
        public:
-               DraggableContainerIcon(BRect rect, const char* name,
-                       uint32 resizeMask);
+               DraggableContainerIcon();
 
-               virtual void AttachedToWindow();
                virtual void MouseDown(BPoint where);
                virtual void MouseUp(BPoint);
                virtual void MouseMoved(BPoint point, uint32, const BMessage*);
-               virtual void FrameMoved(BPoint);
                virtual void Draw(BRect updateRect);
 
        private:
@@ -145,9 +144,6 @@ struct StaggerOneParams {
 };
 
 
-const int32 kContainerWidthMinLimit = 120;
-const int32 kContainerWindowHeightLimit = 85;
-
 const int32 kWindowStaggerBy = 17;
 
 
@@ -311,10 +307,9 @@ AddMimeTypeString(BStringList& list, Model* model)
 //     #pragma mark - DraggableContainerIcon
 
 
-DraggableContainerIcon::DraggableContainerIcon(BRect rect, const char* name,
-       uint32 resizeMask)
+DraggableContainerIcon::DraggableContainerIcon()
        :
-       BView(rect, name, resizeMask, B_WILL_DRAW | B_FRAME_EVENTS),
+       BView("DraggableContainerIcon", B_WILL_DRAW),
        fDragButton(0),
        fDragStarted(false)
 {
@@ -322,15 +317,6 @@ DraggableContainerIcon::DraggableContainerIcon(BRect rect, 
const char* name,
 
 
 void
-DraggableContainerIcon::AttachedToWindow()
-{
-       SetViewColor(Parent()->ViewColor());
-       FrameMoved(BPoint(0, 0));
-               // this decides whether to hide the icon or not
-}
-
-
-void
 DraggableContainerIcon::MouseDown(BPoint where)
 {
        // we only like container windows
@@ -457,48 +443,16 @@ DraggableContainerIcon::MouseMoved(BPoint where, uint32, 
const BMessage*)
 
 
 void
-DraggableContainerIcon::FrameMoved(BPoint)
-{
-       BMenuBar* bar = dynamic_cast<BMenuBar*>(Parent());
-       ThrowOnAssert(bar != NULL);
-
-       // TODO: ugly hack following:
-       // This is a trick to get the actual width of all menu items
-       // (BMenuBar may not have set the item coordinates yet...)
-       float width, height;
-       uint32 resizingMode = bar->ResizingMode();
-       bar->SetResizingMode(B_FOLLOW_NONE);
-       bar->GetPreferredSize(&width, &height);
-       bar->SetResizingMode(resizingMode);
-
-       //BMenuItem* item = bar->ItemAt(bar->CountItems() - 1);
-       //if (item == NULL)
-       //      return;
-
-       // BeOS shifts the coordinates for hidden views, so we cannot
-       // use them to decide if we should be visible or not...
-
-       float gap = bar->Frame().Width() - 2 - width; //item->Frame().right;
-
-       if (gap <= Bounds().Width() && !IsHidden())
-               Hide();
-       else if (gap > Bounds().Width() && IsHidden())
-               Show();
-}
-
-
-void
 DraggableContainerIcon::Draw(BRect updateRect)
 {
        BContainerWindow* window = dynamic_cast<BContainerWindow*>(Window());
        ThrowOnAssert(window != NULL);
 
-       if (be_control_look != NULL) {
-               BRect rect(Bounds());
-               rgb_color base = ui_color(B_MENU_BACKGROUND_COLOR);
-               be_control_look->DrawMenuBarBackground(this, rect, updateRect, 
base,
-                       0, 0);
-       }
+       BRect rect(Bounds());
+       rgb_color base = ui_color(B_MENU_BACKGROUND_COLOR);
+       be_control_look->DrawBorder(this, rect, updateRect, base, 
B_PLAIN_BORDER,
+               0, BControlLook::B_BOTTOM_BORDER);
+       be_control_look->DrawMenuBarBackground(this, rect, updateRect, base);
 
        // Draw the icon, straddling the border
 #ifdef __HAIKU__
@@ -507,9 +461,10 @@ DraggableContainerIcon::Draw(BRect updateRect)
 #else
        SetDrawingMode(B_OP_OVER);
 #endif
-       float iconOffset = (Bounds().Width() - B_MINI_ICON) / 2;
+       float iconOffsetX = (Bounds().Width() - B_MINI_ICON) / 2;
+       float iconOffsetY = (Bounds().Height() - B_MINI_ICON) / 2;
        IconCache::sIconCache->Draw(window->TargetModel(), this,
-               BPoint(iconOffset, iconOffset), kNormalIcon, B_MINI_ICON, true);
+               BPoint(iconOffsetX, iconOffsetY), kNormalIcon, B_MINI_ICON, 
true);
 }
 
 
@@ -518,10 +473,15 @@ DraggableContainerIcon::Draw(BRect updateRect)
 
 BContainerWindow::BContainerWindow(LockingList<BWindow>* list,
        uint32 containerWindowFlags, window_look look, window_feel feel,
-       uint32 flags, uint32 workspace)
+       uint32 flags, uint32 workspace, bool useLayouts, bool isDeskWindow)
        :
        BWindow(InitialWindowRect(feel), "TrackerWindow", look, feel, flags,
                workspace),
+       fMenuContainer(NULL),
+       fPoseContainer(NULL),
+       fBorderedView(NULL),
+       fVScrollBarContainer(NULL),
+       fCountContainer(NULL),
        fFileContextMenu(NULL),
        fWindowContextMenu(NULL),
        fDropContextMenu(NULL),
@@ -534,6 +494,7 @@ BContainerWindow::BContainerWindow(LockingList<BWindow>* 
list,
        fOpenWithItem(NULL),
        fNavigationItem(NULL),
        fMenuBar(NULL),
+       fDraggableIcon(NULL),
        fNavigator(NULL),
        fPoseView(NULL),
        fWindowList(list),
@@ -546,6 +507,7 @@ BContainerWindow::BContainerWindow(LockingList<BWindow>* 
list,
        fIsTrash(false),
        fInTrash(false),
        fIsPrinters(false),
+       fIsDesktop(isDeskWindow),
        fContainerWindowFlags(containerWindowFlags),
        fBackgroundImage(NULL),
        fSavedZoomRect(0, 0, -1, -1),
@@ -553,7 +515,7 @@ BContainerWindow::BContainerWindow(LockingList<BWindow>* 
list,
        fDragMessage(NULL),
        fCachedTypesList(NULL),
        fStateNeedsSaving(false),
-       fSaveStateIsEnabled(dynamic_cast<BDeskWindow*>(this) == NULL),
+       fSaveStateIsEnabled(!fIsDesktop),
        fIsWatchingPath(false)
 {
        InitIconPreloader();
@@ -563,6 +525,29 @@ BContainerWindow::BContainerWindow(LockingList<BWindow>* 
list,
                list->AddItem(this);
        }
 
+       if (useLayouts) {
+               SetFlags(Flags() | B_AUTO_UPDATE_SIZE_LIMITS);
+
+               fRootLayout = new BGroupLayout(B_VERTICAL, 0);
+               fRootLayout->SetInsets(0);
+               SetLayout(fRootLayout);
+               
fRootLayout->Owner()->SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
+
+               if (!fIsDesktop) {
+                       fMenuContainer = new BGroupView(B_HORIZONTAL, 0);
+                       fRootLayout->AddView(fMenuContainer);
+
+                       fPoseContainer = new BGridView(0.0, 0.0);
+                       fRootLayout->AddView(fPoseContainer);
+
+                       fBorderedView = new BorderedView;
+                       fPoseContainer->GridLayout()->AddView(fBorderedView, 0, 
1);
+
+                       fCountContainer = new BGroupView(B_HORIZONTAL, 0);
+                       fPoseContainer->GridLayout()->AddView(fCountContainer, 
0, 2);
+               }
+       }
+
        AddCommonFilter(new BMessageFilter(B_MOUSE_DOWN, ActivateWindowFilter));
 
        Run();
@@ -726,9 +711,9 @@ BContainerWindow::Quit()
 
 
 BPoseView*
-BContainerWindow::NewPoseView(Model* model, BRect rect, uint32 viewMode)
+BContainerWindow::NewPoseView(Model* model, uint32 viewMode)
 {
-       return new BPoseView(model, rect, viewMode);
+       return new BPoseView(model, viewMode);
 }
 
 
@@ -749,31 +734,20 @@ void
 BContainerWindow::CreatePoseView(Model* model)
 {
        UpdateIfTrash(model);
-       BRect rect(Bounds());
 
-       TrackerSettings settings;
-       if (settings.SingleWindowBrowse() && settings.ShowNavigator()
-               && model->IsDirectory()) {
-               rect.top += BNavigator::CalcNavigatorHeight() + 1;
-       }
-
-       rect.right -= B_V_SCROLL_BAR_WIDTH;
-       rect.bottom -= B_H_SCROLL_BAR_HEIGHT;
-       fPoseView = NewPoseView(model, rect, kListMode);
-       AddChild(fPoseView);
+       fPoseView = NewPoseView(model, kListMode);
+       fBorderedView->GroupLayout()->AddView(fPoseView);
+       fBorderedView->EnableBorderHighlight(false);
 
+       TrackerSettings settings;
        if (settings.SingleWindowBrowse() && model->IsDirectory()
                && !fPoseView->IsFilePanel()) {
-               BRect rect(Bounds());
-               rect.top = 0;
-                       // The KeyMenuBar isn't attached yet, otherwise we'd 
use that
-                       // to get the offset.
-               rect.bottom = BNavigator::CalcNavigatorHeight();
-               fNavigator = new BNavigator(model, rect);
-               if (!settings.ShowNavigator())
+               fNavigator = new BNavigator(model);
+               fPoseContainer->GridLayout()->AddView(fNavigator, 0, 0, 2);
+               if (!settings.ShowNavigator()) {
                        fNavigator->Hide();
-
-               AddChild(fNavigator);
+                       fBorderedView->GroupLayout()->SetInsets(1, 0, 1, 1);
+               }
        }
 
        SetPathWatchingEnabled(settings.ShowNavigator()
@@ -885,7 +859,6 @@ BContainerWindow::RepopulateMenus()
 void
 BContainerWindow::Init(const BMessage* message)
 {
-       float y_delta;
        BEntry entry;
 
        ASSERT(fPoseView != NULL);
@@ -909,30 +882,10 @@ BContainerWindow::Init(const BMessage* message)
        TrackerSettings settings;
 
        if (ShouldAddMenus()) {
-               // add menu bar, menus and resize poseview to fit
-               fMenuBar = new BMenuBar(BRect(0, 0, Bounds().Width() + 1, 1),
-                       "MenuBar");
+               fMenuBar = new BMenuBar("MenuBar");
                fMenuBar->SetBorder(B_BORDER_FRAME);
+               fMenuContainer->GroupLayout()->AddView(fMenuBar);
                AddMenus();
-               AddChild(fMenuBar);
-
-               y_delta = KeyMenuBar()->Bounds().Height() + 1;
-
-               float navigatorDelta = 0;
-
-               if (Navigator() && settings.ShowNavigator()) {
-                       Navigator()->MoveTo(BPoint(0, y_delta));
-                       navigatorDelta = BNavigator::CalcNavigatorHeight() + 1;
-               }
-
-               fPoseView->MoveTo(BPoint(0, navigatorDelta + y_delta));
-               fPoseView->ResizeBy(0, -(y_delta));
-               if (fPoseView->VScrollBar()) {
-                       fPoseView->VScrollBar()->MoveBy(0,
-                               KeyMenuBar()->Bounds().Height());
-                       fPoseView->VScrollBar()->ResizeBy(0,
-                               -(KeyMenuBar()->Bounds().Height()));
-               }
 
                if (!TargetModel()->IsRoot() && !IsTrash())
                        _AddFolderIcon();
@@ -999,7 +952,7 @@ BContainerWindow::Init(const BMessage* message)
        MarkAttributeMenu(fAttrMenu);
        CheckScreenIntersect();
 
-       if (fBackgroundImage != NULL && dynamic_cast<BDeskWindow*>(this) == NULL
+       if (fBackgroundImage != NULL && !fIsDesktop
                && PoseView()->ViewMode() != kListMode) {
                fBackgroundImage->Show(PoseView(), current_workspace());
        }
@@ -1011,13 +964,44 @@ BContainerWindow::Init(const BMessage* message)
        SetFlags(Flags() & ~B_NO_WORKSPACE_ACTIVATION);
 }
 
+void
+BContainerWindow::InitLayout()
+{
+       BLayoutItem* item
+               = fBorderedView->GroupLayout()->AddView(0, 
fPoseView->TitleView());
+       BSize minSize = item->MinSize();
+       BSize maxSize = item->MaxSize();
+       item->SetExplicitMinSize(BSize(minSize.Width(), kTitleViewHeight));
+       item->SetExplicitMaxSize(BSize(maxSize.Width(), kTitleViewHeight));
+
+       item = fCountContainer->GroupLayout()->AddView(fPoseView->CountView());
+       minSize = item->MinSize();
+       maxSize = item->MaxSize();
+       item->SetExplicitMinSize(BSize(kCountViewWidth, minSize.Height()));
+       item->SetExplicitMaxSize(BSize(kCountViewWidth, maxSize.Height()));
+
+       // Eliminate the extra borders
+       fMenuContainer->GroupLayout()->SetInsets(0, 0, -1, 0);
+       fPoseContainer->GridLayout()->SetInsets(-1, 0, -1, -1);
+       fCountContainer->GroupLayout()->SetInsets(0, -1, 0, 0);
+
+       if (fPoseView->VScrollBar() != NULL) {
+               fVScrollBarContainer = new BGroupView(B_VERTICAL, 0);
+               
fVScrollBarContainer->GroupLayout()->AddView(fPoseView->VScrollBar());
+               fVScrollBarContainer->GroupLayout()->SetInsets(-1, 0, 0, 1);
+               fPoseContainer->GridLayout()->AddView(fVScrollBarContainer, 1, 
1);
+       }
+       if (fPoseView->HScrollBar() != NULL) {
+               BGroupView* hScrollBarContainer = new BGroupView(B_VERTICAL, 0);
+               
hScrollBarContainer->GroupLayout()->AddView(fPoseView->HScrollBar());
+               hScrollBarContainer->GroupLayout()->SetInsets(0, -1, 0, 0);
+               fCountContainer->GroupLayout()->AddView(hScrollBarContainer);
+       }
+}
 
 void
 BContainerWindow::RestoreState()
 {
-       SetSizeLimits(kContainerWidthMinLimit, 10000,
-               kContainerWindowHeightLimit, 10000);
-
        UpdateTitle();
 
        WindowStateNodeOpener opener(this, false);
@@ -1031,9 +1015,6 @@ BContainerWindow::RestoreState()
 void
 BContainerWindow::RestoreState(const BMessage &message)
 {
-       SetSizeLimits(kContainerWidthMinLimit, 10000,
-               kContainerWindowHeightLimit, 10000);
-
        UpdateTitle();
 
        RestoreWindowState(message);
@@ -1046,13 +1027,15 @@ BContainerWindow::RestoreState(const BMessage &message)
 void
 BContainerWindow::RestoreStateCommon()
 {
+       if (!fIsDesktop)
+               InitLayout();
+
        if (BootedInSafeMode())
                // don't pick up backgrounds in safe mode
                return;
 
        WindowStateNodeOpener opener(this, false);
 
-       bool isDesktop = dynamic_cast<BDeskWindow*>(this) != NULL;
        if (!TargetModel()->IsRoot() && opener.Node() != NULL) {
                // don't pick up background image for root disks
                // to do this, would have to have a unique attribute for the
@@ -1060,16 +1043,16 @@ BContainerWindow::RestoreStateCommon()
                // for R4 this was not done to make things simpler
                // the default image will still work though
                fBackgroundImage = BackgroundImage::GetBackgroundImage(
-                       opener.Node(), isDesktop);
+                       opener.Node(), fIsDesktop);
                        // look for background image info in the window's node
        }
 
        BNode defaultingNode;
-       if (fBackgroundImage == NULL && !isDesktop
+       if (fBackgroundImage == NULL && !fIsDesktop
                && DefaultStateSourceNode(kDefaultFolderTemplate, 
&defaultingNode)) {
                // look for background image info in the source for defaults
                fBackgroundImage = 
BackgroundImage::GetBackgroundImage(&defaultingNode,
-                       isDesktop);
+                       fIsDesktop);
        }
 }
 
@@ -1101,21 +1084,20 @@ BContainerWindow::UpdateBackgroundImage()
        if (BootedInSafeMode())
                return;
 
-       bool isDesktop = dynamic_cast<BDeskWindow*>(this) != NULL;
        WindowStateNodeOpener opener(this, false);
 
        if (!TargetModel()->IsRoot() && opener.Node() != NULL) {
                fBackgroundImage = BackgroundImage::Refresh(fBackgroundImage,
-                       opener.Node(), isDesktop, PoseView());
+                       opener.Node(), fIsDesktop, PoseView());
        }
 
                // look for background image info in the window's node
        BNode defaultingNode;
-       if (!fBackgroundImage && !isDesktop
+       if (!fBackgroundImage && !fIsDesktop
                && DefaultStateSourceNode(kDefaultFolderTemplate, 
&defaultingNode)) {
                // look for background image info in the source for defaults
                fBackgroundImage = BackgroundImage::Refresh(fBackgroundImage,
-                       &defaultingNode, isDesktop, PoseView());
+                       &defaultingNode, fIsDesktop, PoseView());
        }
 }
 
@@ -1172,14 +1154,6 @@ BContainerWindow::WorkspacesChanged(uint32, uint32)
 void
 BContainerWindow::ViewModeChanged(uint32 oldMode, uint32 newMode)
 {
-       if (fMenuBar != NULL) {
-               // make sure the draggable icon hides if it doesn't
-               // have space left anymore
-               BView* view = fMenuBar->FindView("ThisContainer");
-               if (view != NULL)
-                       view->FrameMoved(view->Frame().LeftTop());
-       }
-
        if (fBackgroundImage == NULL)
                return;
 
@@ -1341,13 +1315,6 @@ BContainerWindow::ShouldAddScrollBars() const
 }
 
 
-bool
-BContainerWindow::ShouldAddCountView() const
-{
-       return true;
-}
-
-
 Model*
 BContainerWindow::TargetModel() const
 {
@@ -1589,20 +1556,17 @@ BContainerWindow::MessageReceived(BMessage* message)
 
                                        // Update draggable folder icon
                                        if (fMenuBar != NULL) {
-                                               BView* view = 
fMenuBar->FindView("ThisContainer");
                                                if (!TargetModel()->IsRoot() && 
!IsTrash()) {
                                                        // Folder icon should 
be visible, but in single
                                                        // window navigation, 
it might not be.
-                                                       if (view != NULL) {
+                                                       if (fDraggableIcon != 
NULL) {
                                                                
IconCache::sIconCache->IconChanged(
                                                                        
TargetModel());
-                                                               
view->Invalidate();
+                                                               
fDraggableIcon->Invalidate();
                                                        } else
                                                                
_AddFolderIcon();
-                                               } else if (view != NULL) {
-                                                       view->RemoveSelf();
-                                                       fMenuBar->Invalidate();
-                                               }
+                                               } else if (fDraggableIcon != 
NULL)
+                                                       
fDraggableIcon->RemoveSelf();
                                        }
 
                                        // Update window title
@@ -1664,21 +1628,19 @@ BContainerWindow::MessageReceived(BMessage* message)
                                                        && 
TargetModel()->IsDirectory()
                                                        && 
!PoseView()->IsFilePanel()
                                                        && 
!PoseView()->IsDesktopWindow()) {
-                                                       BRect rect(Bounds());
-                                                       rect.top = 
KeyMenuBar()->Bounds().Height() + 1;
-                                                       rect.bottom = rect.top
-                                                               + 
BNavigator::CalcNavigatorHeight();
-                                                       fNavigator = new 
BNavigator(TargetModel(), rect);
+                                                       fNavigator = new 
BNavigator(TargetModel());
+                                                       
fPoseContainer->GridLayout()->AddView(fNavigator,
+                                                               0, 0, 2);
                                                        fNavigator->Hide();
-                                                       AddChild(fNavigator);
+                                                       
fBorderedView->GroupLayout()->SetInsets(1, 0,
+                                                               1, 1);
                                                        
SetPathWatchingEnabled(settings.ShowNavigator()
                                                                || 
settings.ShowFullPathInTitleBar());
                                                }
 
                                                if 
(!settings.SingleWindowBrowse()
-                                                       && 
dynamic_cast<BDeskWindow*>(this) == NULL
-                                                       && 
TargetModel()->IsDesktop()) {
-                                                       // close the "Desktop" 
window, but not the Desktop
+                                                       && !fIsDesktop && 
TargetModel()->IsDesktop()) {
+                                                       // Close the "Desktop" 
window, but not the Desktop
                                                        this->Quit();
                                                }
 
@@ -2800,7 +2762,7 @@ BContainerWindow::ShowContextMenu(BPoint loc, const 
entry_ref* ref, BView*)
                        return;
 
                // Repopulate desktop menu if IsDesktop
-               if (dynamic_cast<BDeskWindow*>(this))
+               if (fIsDesktop)
                        RepopulateMenus();
 
                MenusEnded();
@@ -3310,21 +3272,25 @@ BContainerWindow::_UpdateSelectionMIMEInfo()
 void
 BContainerWindow::_AddFolderIcon()
 {
-       if (fMenuBar == NULL)
+       if (fMenuBar == NULL) {
+               // We don't want to add the icon if there's no menubar
                return;
+       }
+
        float iconSize = fMenuBar->Bounds().Height() - 2;
        if (iconSize < 16)
                iconSize = 16;
-       float iconPosY = 1 + (fMenuBar->Bounds().Height() - 2
-               - iconSize) / 2;
-       BView* icon = new(std::nothrow) DraggableContainerIcon(
-               BRect(Bounds().Width() - 4 - iconSize + 1, iconPosY,
-                       Bounds().Width() - 4, iconPosY + iconSize - 1), 
"ThisContainer",
-               B_FOLLOW_RIGHT);
-       if (icon != NULL)
-               fMenuBar->AddChild(icon);
-}
 
+       fDraggableIcon = new(std::nothrow)
+               DraggableContainerIcon;
+
+       if (fDraggableIcon != NULL) {
+               BLayoutItem* item =
+                       fMenuContainer->GroupLayout()->AddView(fDraggableIcon);
+               item->SetExplicitMinSize(BSize(iconSize + 5, iconSize));
+               item->SetExplicitMaxSize(BSize(iconSize + 5, 
item->MaxSize().Height()));
+       }
+}
 
 
 BMenuItem*
@@ -4116,46 +4082,26 @@ BContainerWindow::ShowNavigator(bool show)
                        return;
 
                if (Navigator() == NULL) {
-                       BRect rect(Bounds());
-                       rect.top = KeyMenuBar()->Bounds().Height() + 1;
-                       rect.bottom = rect.top + 
BNavigator::CalcNavigatorHeight();
-                       fNavigator = new BNavigator(TargetModel(), rect);
-                       AddChild(fNavigator);
+                       fNavigator = new BNavigator(TargetModel());
+                       fPoseContainer->GridLayout()->AddView(fNavigator, 0, 0, 
2);
                }
 
-               if (Navigator()->IsHidden()) {
-                       if (Navigator()->Bounds().top == 0)
-                               Navigator()->MoveTo(0, 
KeyMenuBar()->Bounds().Height() + 1);
-                               // This is if the navigator was created with a 
.top = 0.
+               if (Navigator()->IsHidden())
                        Navigator()->Show();
-               }
 
-               float displacement = Navigator()->Frame().Height() + 1;
-
-               PoseView()->MoveBy(0, displacement);
-               PoseView()->ResizeBy(0, -displacement);
-
-               if (PoseView()->VScrollBar()) {
-                       PoseView()->VScrollBar()->MoveBy(0, displacement);
-                       PoseView()->VScrollBar()->ResizeBy(0, -displacement);
+               if (PoseView()->VScrollBar())
                        PoseView()->UpdateScrollRange();
-               }
+
+               fBorderedView->GroupLayout()->SetInsets(1);
        } else {
                if (!Navigator() || Navigator()->IsHidden())
                        return;
 
-               float displacement = Navigator()->Frame().Height() + 1;
-
-               PoseView()->ResizeBy(0, displacement);
-               PoseView()->MoveBy(0, -displacement);
-
-               if (PoseView()->VScrollBar()) {
-                       PoseView()->VScrollBar()->ResizeBy(0, displacement);
-                       PoseView()->VScrollBar()->MoveBy(0, -displacement);
+               if (PoseView()->VScrollBar())
                        PoseView()->UpdateScrollRange();
-               }
 
                fNavigator->Hide();
+               fBorderedView->GroupLayout()->SetInsets(1, 0, 1, 1);
        }
 }
 
@@ -4398,119 +4344,65 @@ WindowStateNodeOpener::Node() const
 }
 
 
-//     #pragma mark - BackgroundView
+//     #pragma mark - BorderedView
 
 
-BackgroundView::BackgroundView(BRect frame)
+BorderedView::BorderedView()
        :
-       BView(frame, "", B_FOLLOW_ALL,
-               B_FRAME_EVENTS | B_WILL_DRAW | B_PULSE_NEEDED)
-{
-}
-
-
-void
-BackgroundView::AttachedToWindow()
+       BGroupView(B_VERTICAL, 0),
+       fEnableBorderHighlight(true)
 {
-       SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
+       GroupLayout()->SetInsets(1);
+       SetViewColor(tint_color(ui_color(B_PANEL_BACKGROUND_COLOR),
+               B_DARKEN_2_TINT));
 }
 
 
 void
-BackgroundView::FrameResized(float, float)
+BorderedView::WindowActivated(bool active)
 {
-       Invalidate();
+       // Update border color
+       PoseViewFocused(active);
 }
 
 
-void
-BackgroundView::PoseViewFocused(bool focused)
+void BorderedView::EnableBorderHighlight(bool enable)
 {
-       Invalidate();
-
-       BContainerWindow* window = dynamic_cast<BContainerWindow*>(Window());
-       if (window == NULL)
-               return;
-
-       BScrollBar* hScrollBar = window->PoseView()->HScrollBar();
-       if (hScrollBar != NULL)
-               hScrollBar->SetBorderHighlighted(focused);
-
-       BScrollBar* vScrollBar = window->PoseView()->VScrollBar();
-       if (vScrollBar != NULL)
-               vScrollBar->SetBorderHighlighted(focused);
-
-       BCountView* countView = window->PoseView()->CountView();
-       if (countView != NULL)
-               countView->SetBorderHighlighted(focused);
+       fEnableBorderHighlight = enable;
+       PoseViewFocused(false);
 }
 
 
 void
-BackgroundView::WindowActivated(bool)
-{
-       Invalidate();
-}
-
-
-void
-BackgroundView::Draw(BRect updateRect)
+BorderedView::PoseViewFocused(bool focused)
 {
        BContainerWindow* window = dynamic_cast<BContainerWindow*>(Window());
        if (window == NULL)
                return;
 
-       BPoseView* poseView = window->PoseView();
-       BRect frame(poseView->Frame());
-       frame.InsetBy(-1, -1);
-       frame.top -= kTitleViewHeight;
-       frame.bottom += B_H_SCROLL_BAR_HEIGHT;
-       frame.right += B_V_SCROLL_BAR_WIDTH;
-
-       if (be_control_look != NULL) {
-               uint32 flags = 0;
-               if (window->IsActive() && window->PoseView()->IsFocus())
-                       flags |= BControlLook::B_FOCUSED;
-
-               frame.top--;
-               frame.InsetBy(-1, -1);
-               BRect rect(frame);
-               rgb_color base = ui_color(B_PANEL_BACKGROUND_COLOR);
-
-               BScrollBar* hScrollBar = poseView->HScrollBar();
-               BScrollBar* vScrollBar = poseView->VScrollBar();
-
-               BRect verticalScrollBarFrame(0, 0, -1, -1);
-               if (vScrollBar)
-                       verticalScrollBarFrame = vScrollBar->Frame();
-               BRect horizontalScrollBarFrame(0, 0, -1, -1);
-               if (hScrollBar) {
-                       horizontalScrollBarFrame = hScrollBar->Frame();
-                       // CountView extends horizontal scroll bar frame:
-                       horizontalScrollBarFrame.left = frame.left + 1;
-               }
+       rgb_color base;
+       if (focused && window->IsActive() && fEnableBorderHighlight) {
+               base = ui_color(B_KEYBOARD_NAVIGATION_COLOR);
 
-               be_control_look->DrawScrollViewFrame(this, rect, updateRect,
-                       verticalScrollBarFrame, horizontalScrollBarFrame, base,
-                       B_FANCY_BORDER, flags);
+               BScrollBar* hScrollBar = window->PoseView()->HScrollBar();
+               if (hScrollBar != NULL)
+                       hScrollBar->SetBorderHighlighted(focused);
 
-               return;
+               BScrollBar* vScrollBar = window->PoseView()->VScrollBar();
+               if (vScrollBar != NULL)
+                       vScrollBar->SetBorderHighlighted(focused);
+       } else {
+               base = ui_color(B_PANEL_BACKGROUND_COLOR);
+               base = tint_color(base, B_DARKEN_2_TINT);
        }
+       SetViewColor(base);
 
-       SetHighColor(100, 100, 100);
-       StrokeRect(frame);
-
-       // draw the pose view focus
-       if (window->IsActive() && window->PoseView()->IsFocus()) {
-               frame.InsetBy(-2, -2);
-               SetHighColor(keyboard_navigation_color());
-               StrokeRect(frame);
-       }
+       Invalidate();
 }
 
 
 void
-BackgroundView::Pulse()
+BorderedView::Pulse()
 {
        BContainerWindow* window = dynamic_cast<BContainerWindow*>(Window());
        if (window != NULL)
diff --git a/src/kits/tracker/ContainerWindow.h 
b/src/kits/tracker/ContainerWindow.h
index a6c66c6..4b48b85 100644
--- a/src/kits/tracker/ContainerWindow.h
+++ b/src/kits/tracker/ContainerWindow.h
@@ -35,6 +35,7 @@ All rights reserved.
 #define _CONTAINER_WINDOW_H
 
 
+#include <GroupView.h>
 #include <StringList.h>
 #include <Window.h>
 
@@ -44,6 +45,9 @@ All rights reserved.
 #include "TaskLoop.h"
 
 
+class BGridView;
+class BGroupLayout;
+class BGroupView;
 class BPopUpMenu;
 class BMenuBar;
 
@@ -51,11 +55,13 @@ namespace BPrivate {
 
 class BNavigator;
 class BPoseView;
+class DraggableContainerIcon;
 class ModelMenuItem;
 class AttributeStreamNode;
 class BackgroundImage;
 class Model;
 class ModelNodeLazyOpener;
+class BorderedView;
 class SelectionWindow;
 
 
@@ -92,13 +98,14 @@ public:
                uint32 containerWindowFlags,
                window_look look = B_DOCUMENT_WINDOW_LOOK,
                window_feel feel = B_NORMAL_WINDOW_FEEL,
-               uint32 flags = B_WILL_ACCEPT_FIRST_CLICK
-                       | B_NO_WORKSPACE_ACTIVATION,
-               uint32 workspace = B_CURRENT_WORKSPACE);
+               uint32 flags = B_WILL_ACCEPT_FIRST_CLICK | 
B_NO_WORKSPACE_ACTIVATION,
+               uint32 workspace = B_CURRENT_WORKSPACE, bool useLayouts = true,
+               bool isDeskWindow = false);
 
        virtual ~BContainerWindow();
 
        virtual void Init(const BMessage* message = NULL);
+       virtual void InitLayout();
 
        static BRect InitialWindowRect(window_feel);
 
@@ -123,7 +130,6 @@ public:
        // virtuals that control setup of window
        virtual bool ShouldAddMenus() const;
        virtual bool ShouldAddScrollBars() const;
-       virtual bool ShouldAddCountView() const;
 
        virtual void CheckScreenIntersect();
 
@@ -206,7 +212,7 @@ public:
        bool IsPathWatchingEnabled(void) const;
 
 protected:
-       virtual BPoseView* NewPoseView(Model*, BRect, uint32);
+       virtual BPoseView* NewPoseView(Model*, uint32);
                // instantiate a different flavor of BPoseView for different
                // ContainerWindows
 
@@ -274,6 +280,13 @@ protected:
                BObjectList<Model>*, void*, BStringList&);
        void LoadAddOn(BMessage*);
 
+       BGroupLayout* fRootLayout;
+       BGroupView* fMenuContainer;
+       BGridView* fPoseContainer;
+       BorderedView* fBorderedView;
+       BGroupView* fVScrollBarContainer;
+       BGroupView* fCountContainer;
+
        BPopUpMenu* fFileContextMenu;
        BPopUpMenu* fWindowContextMenu;
        BPopUpMenu* fDropContextMenu;
@@ -286,6 +299,7 @@ protected:
        BMenuItem* fOpenWithItem;
        ModelMenuItem* fNavigationItem;
        BMenuBar* fMenuBar;
+       DraggableContainerIcon* fDraggableIcon;
        BNavigator* fNavigator;
        BPoseView* fPoseView;
        LockingList<BWindow>* fWindowList;
@@ -301,6 +315,7 @@ protected:
        bool fIsTrash;
        bool fInTrash;
        bool fIsPrinters;
+       bool fIsDesktop;
 
        uint32 fContainerWindowFlags;
        BackgroundImage* fBackgroundImage;
@@ -357,22 +372,22 @@ private:
 };
 
 
-class BackgroundView : public BView {
-       // background view placed in a BContainerWindow, under the pose view
+class BorderedView : public BGroupView {
 public:
-       BackgroundView(BRect);
-       virtual void AttachedToWindow();
-       virtual void FrameResized(float, float);
-       virtual void Draw(BRect);
+       BorderedView();
 
        void PoseViewFocused(bool);
        virtual void Pulse();
 
+       void EnableBorderHighlight(bool);
+
 protected:
        virtual void WindowActivated(bool);
 
 private:
-       typedef BView _inherited;
+       bool fEnableBorderHighlight;
+
+       typedef BGroupView _inherited;
 };
 
 
diff --git a/src/kits/tracker/CountView.cpp b/src/kits/tracker/CountView.cpp
index a1d3c7c..8943200 100644
--- a/src/kits/tracker/CountView.cpp
+++ b/src/kits/tracker/CountView.cpp
@@ -61,14 +61,12 @@ const bigtime_t kBarberPoleDelay = 500000;
 //     #pragma mark - BCountView
 
 
-BCountView::BCountView(BRect bounds, BPoseView* view)
+BCountView::BCountView(BPoseView* view)
        :
-       BView(bounds, "CountVw", B_FOLLOW_LEFT + B_FOLLOW_BOTTOM,
-               B_PULSE_NEEDED | B_WILL_DRAW),
+       BView("CountVw", B_PULSE_NEEDED | B_WILL_DRAW),
        fLastCount(-1),
        fPoseView(view),
        fShowingBarberPole(false),
-       fBorderHighlighted(false),
        fBarberPoleMap(NULL),
        fLastBarberPoleOffset(5),
        fStartSpinningAfter(0),
@@ -114,17 +112,6 @@ BCountView::Pulse()
 
 
 void
-BCountView::WindowActivated(bool active)
-{
-       if (fBorderHighlighted) {
-               BRect dirty(Bounds());
-               dirty.bottom = dirty.top;
-               Invalidate(dirty);
-       }
-}
-
-
-void
 BCountView::EndBarberPole()
 {
        if (!fShowingBarberPole)
@@ -172,7 +159,7 @@ BRect
 BCountView::TextInvalRect() const
 {
        BRect result = Bounds();
-       result.InsetBy(4, 2);
+       result.InsetBy(4, 3);
 
        // if the barber pole is not present, use its space for text
        if (fShowingBarberPole)
@@ -186,7 +173,7 @@ BRect
 BCountView::TextAndBarberPoleRect() const
 {
        BRect result = Bounds();
-       result.InsetBy(4, 2);
+       result.InsetBy(4, 3);
 
        return result;
 }
@@ -211,17 +198,11 @@ BCountView::Draw(BRect updateRect)
 {
        BRect bounds(Bounds());
 
-       if (be_control_look != NULL) {
-               rgb_color base = ViewColor();
-               if (fBorderHighlighted && Window()->IsActive())
-                       SetHighColor(ui_color(B_KEYBOARD_NAVIGATION_COLOR));
-               else
-                       SetHighColor(tint_color(base, B_DARKEN_2_TINT));
-               StrokeLine(bounds.LeftTop(), bounds.RightTop());
-               bounds.top++;
-               be_control_look->DrawMenuBarBackground(this, bounds, updateRect,
-                       ViewColor());
-       }
+       be_control_look->DrawBorder(this, bounds, updateRect, ViewColor(),
+               B_PLAIN_BORDER, 0,
+               BControlLook::B_BOTTOM_BORDER | BControlLook::B_LEFT_BORDER);
+       be_control_look->DrawMenuBarBackground(this, bounds, updateRect,
+               ViewColor());
 
        BString itemString;
        if (IsTypingAhead())
@@ -408,16 +389,3 @@ BCountView::IsFiltering() const
 {
        return fFilterString.Length() > 0;
 }
-
-
-void
-BCountView::SetBorderHighlighted(bool highlighted)
-{
-       if (fBorderHighlighted == highlighted)
-               return;
-
-       fBorderHighlighted = highlighted;
-       BRect dirty(Bounds());
-       dirty.bottom = dirty.top;
-       Invalidate(dirty);
-}
diff --git a/src/kits/tracker/CountView.h b/src/kits/tracker/CountView.h
index 52ad97e..625358e 100644
--- a/src/kits/tracker/CountView.h
+++ b/src/kits/tracker/CountView.h
@@ -43,18 +43,20 @@ namespace BPrivate {
 
 class BPoseView;
 
+const int32 kCountViewWidth = 76;
+
+
 class BCountView : public BView {
        // displays the item count and a barber pole while the view is updating
 
 public:
-       BCountView(BRect, BPoseView*);
+       BCountView(BPoseView*);
        ~BCountView();
 
        virtual void Draw(BRect);
        virtual void MouseDown(BPoint);
        virtual void AttachedToWindow();
        virtual void Pulse();
-       virtual void WindowActivated(bool active);
 
        void CheckCount();
        void StartBarberPole();
@@ -70,8 +72,6 @@ public:
        const char* Filter() const;
        bool IsFiltering() const;
 
-       void SetBorderHighlighted(bool highlighted);
-
 private:
        BRect BarberPoleInnerRect() const;
        BRect BarberPoleOuterRect() const;
@@ -82,7 +82,6 @@ private:
        int32 fLastCount;
        BPoseView* fPoseView;
        bool fShowingBarberPole : 1;
-       bool fBorderHighlighted : 1;
        BBitmap* fBarberPoleMap;
        float fLastBarberPoleOffset;
        bigtime_t fStartSpinningAfter;
diff --git a/src/kits/tracker/DeskWindow.cpp b/src/kits/tracker/DeskWindow.cpp
index a0991c1..c22e180 100644
--- a/src/kits/tracker/DeskWindow.cpp
+++ b/src/kits/tracker/DeskWindow.cpp
@@ -191,7 +191,8 @@ BDeskWindow::BDeskWindow(LockingList<BWindow>* windowList)
        BContainerWindow(windowList, 0, kPrivateDesktopWindowLook,
                kPrivateDesktopWindowFeel, B_NOT_MOVABLE | 
B_WILL_ACCEPT_FIRST_CLICK
                        | B_NOT_ZOOMABLE | B_NOT_CLOSABLE | B_NOT_MINIMIZABLE
-                       | B_NOT_RESIZABLE | B_ASYNCHRONOUS_CONTROLS, 
B_ALL_WORKSPACES),
+                       | B_NOT_RESIZABLE | B_ASYNCHRONOUS_CONTROLS, 
B_ALL_WORKSPACES,
+                       false, true),
        fDeskShelf(NULL),
        fTrashContextMenu(NULL),
        fNodeRef(NULL),
@@ -240,6 +241,12 @@ BDeskWindow::Init(const BMessage*)
        PoseView()->SetShowHideSelection(false);
        ResizeTo(fOldFrame.Width(), fOldFrame.Height());
 
+       InitKeyIndices();
+       InitAddonsList(false);
+       ApplyShortcutPreferences(false);
+
+       _inherited::Init();
+
        entry_ref ref;
        BPath path;
        if (!BootedInSafeMode() && FSFindTrackerSettingsDir(&path) == B_OK) {
@@ -252,11 +259,6 @@ BDeskWindow::Init(const BMessage*)
                if (fDeskShelf != NULL)
                        fDeskShelf->SetDisplaysZombies(true);
        }
-       InitKeyIndices();
-       InitAddonsList(false);
-       ApplyShortcutPreferences(false);
-
-       _inherited::Init();
 }
 
 
@@ -402,16 +404,16 @@ BDeskWindow::Quit()
 
 
 BPoseView*
-BDeskWindow::NewPoseView(Model* model, BRect rect, uint32 viewMode)
+BDeskWindow::NewPoseView(Model* model, uint32 viewMode)
 {
-       return new DesktopPoseView(model, rect, viewMode);
+       return new DesktopPoseView(model, viewMode);
 }
 
 
 void
 BDeskWindow::CreatePoseView(Model* model)
 {
-       fPoseView = NewPoseView(model, Bounds(), kIconMode);
+       fPoseView = NewPoseView(model, kIconMode);
        fPoseView->SetIconMapping(false);
        fPoseView->SetEnsurePosesVisible(true);
        fPoseView->SetAutoScroll(false);
@@ -431,6 +433,8 @@ BDeskWindow::CreatePoseView(Model* model)
        fPoseView->SetViewColor(desktopColor);
        fPoseView->SetLowColor(desktopColor);
 
+       fPoseView->SetResizingMode(B_FOLLOW_ALL);
+       fPoseView->ResizeTo(Bounds().Size());
        AddChild(fPoseView);
 
        PoseView()->StartSettingsWatch();
diff --git a/src/kits/tracker/DeskWindow.h b/src/kits/tracker/DeskWindow.h
index 8ece04c..e1f2141 100644
--- a/src/kits/tracker/DeskWindow.h
+++ b/src/kits/tracker/DeskWindow.h
@@ -72,7 +72,7 @@ public:
 
 protected:
        virtual void AddWindowContextMenus(BMenu*);
-       virtual BPoseView* NewPoseView(Model*, BRect, uint32);
+       virtual BPoseView* NewPoseView(Model*, uint32);
 
        virtual void WorkspaceActivated(int32, bool);
        virtual void MessageReceived(BMessage*);
diff --git a/src/kits/tracker/DesktopPoseView.cpp 
b/src/kits/tracker/DesktopPoseView.cpp
index 569c36c..dfdb127 100644
--- a/src/kits/tracker/DesktopPoseView.cpp
+++ b/src/kits/tracker/DesktopPoseView.cpp
@@ -56,10 +56,9 @@ All rights reserved.
 //     #pragma mark - DesktopPoseView
 
 
-DesktopPoseView::DesktopPoseView(Model* model, BRect frame, uint32 viewMode,
-       uint32 resizeMask)
+DesktopPoseView::DesktopPoseView(Model* model, uint32 viewMode)
        :
-       BPoseView(model, frame, viewMode, resizeMask)
+       BPoseView(model, viewMode)
 {
        SetFlags(Flags() | B_DRAW_ON_CHILDREN);
 }
diff --git a/src/kits/tracker/DesktopPoseView.h 
b/src/kits/tracker/DesktopPoseView.h
index f3debda..bbc19db 100644
--- a/src/kits/tracker/DesktopPoseView.h
+++ b/src/kits/tracker/DesktopPoseView.h
@@ -47,8 +47,7 @@ namespace BPrivate {
 class DesktopPoseView : public BPoseView {
        // overrides BPoseView to add desktop-view specific code
 public:
-       DesktopPoseView(Model*, BRect, uint32 viewMode,
-               uint32 resizeMask = B_FOLLOW_ALL);
+       DesktopPoseView(Model*, uint32 viewMode);
 
        static EntryListBase* InitDesktopDirentIterator(BPoseView*,
                const entry_ref*);
diff --git a/src/kits/tracker/FilePanelPriv.cpp 
b/src/kits/tracker/FilePanelPriv.cpp
index d6e8421..65937d8 100644
--- a/src/kits/tracker/FilePanelPriv.cpp
+++ b/src/kits/tracker/FilePanelPriv.cpp
@@ -66,6 +66,7 @@ All rights reserved.
 #include "AttributeStream.h"
 #include "AutoLock.h"
 #include "Commands.h"
+#include "CountView.h"
 #include "DesktopPoseView.h"
 #include "DirMenu.h"
 #include "FavoritesMenu.h"
@@ -159,7 +160,7 @@ TFilePanel::TFilePanel(file_panel_mode mode, BMessenger* 
target,
        window_look look, window_feel feel, bool hideWhenDone)
        :
        BContainerWindow(0, containerWindowFlags, look, feel, 0,
-               B_CURRENT_WORKSPACE),
+               B_CURRENT_WORKSPACE, false),
        fDirMenu(NULL),
        fDirMenuField(NULL),
        fTextControl(NULL),
@@ -231,6 +232,7 @@ TFilePanel::TFilePanel(file_panel_mode mode, BMessenger* 
target,
        fTaskLoop = new PiggybackTaskLoop;
 
        AutoLock<BWindow> lock(this);
+       fBorderedView = new BorderedView;
        CreatePoseView(model);
        fPoseView->SetRefFilter(filter);
        if (!fIsSavePanel)
@@ -641,9 +643,9 @@ TFilePanel::GetNextEntryRef(entry_ref* ref)
 
 
 BPoseView*
-TFilePanel::NewPoseView(Model* model, BRect rect, uint32)
+TFilePanel::NewPoseView(Model* model, uint32)
 {
-       return new BFilePanelPoseView(model, rect);
+       return new BFilePanelPoseView(model);
 }
 
 
@@ -651,7 +653,9 @@ void
 TFilePanel::Init(const BMessage*)
 {
        BRect windRect(Bounds());
-       AddChild(fBackView = new BackgroundView(windRect));
+       fBackView = new BView(Bounds(), "View", B_FOLLOW_ALL, 0);
+       fBackView->SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
+       AddChild(fBackView);
 
        // add poseview menu bar
        fMenuBar = new BMenuBar(BRect(0, 0, windRect.Width(), 1), "MenuBar");
@@ -763,31 +767,47 @@ TFilePanel::Init(const BMessage*)
        } else
                fButtonText.SetTo(B_TRANSLATE("Open"));
 
+       // Add PoseView
+       fBorderedView->SetName("PoseView");
+       fBorderedView->SetResizingMode(B_FOLLOW_ALL);
+       fBorderedView->EnableBorderHighlight(true);
+
        rect = windRect;
        rect.OffsetTo(10, fDirMenuField->Frame().bottom + 10);
        rect.bottom = windRect.bottom - 60;
        rect.right -= B_V_SCROLL_BAR_WIDTH + 20;
+       fBorderedView->MoveTo(rect.LeftTop());
+       fBorderedView->ResizeTo(rect.Width(), rect.Height());
 
-       // re-parent the poseview to our backview
-       // ToDo:
-       // This is terrible, fix it up
-       PoseView()->RemoveSelf();
-       if (fIsSavePanel)
-               fBackView->AddChild(PoseView(), fTextControl);
-       else
-               fBackView->AddChild(PoseView());
-
-       PoseView()->MoveTo(rect.LeftTop());
-       PoseView()->ResizeTo(rect.Width(), rect.Height());
        PoseView()->AddScrollBars();
        PoseView()->SetDragEnabled(false);
        PoseView()->SetDropEnabled(false);
        PoseView()->SetSelectionHandler(this);
        PoseView()->SetSelectionChangedHook(true);
        PoseView()->DisableSaveLocation();
-       PoseView()->VScrollBar()->MoveBy(0, -1);
-       PoseView()->VScrollBar()->ResizeBy(0, 1);
 
+       // horizontal
+       rect = fBorderedView->Frame();
+       rect.top = rect.bottom;
+       rect.bottom = rect.top + (float)B_H_SCROLL_BAR_HEIGHT;
+       PoseView()->HScrollBar()->MoveTo(rect.LeftTop());
+       PoseView()->HScrollBar()->ResizeTo(rect.Size());
+       PoseView()->HScrollBar()->SetResizingMode(B_FOLLOW_LEFT_RIGHT | 
B_FOLLOW_BOTTOM);
+       fBackView->AddChild(PoseView()->HScrollBar());
+
+       // vertical
+       rect = fBorderedView->Frame();
+       rect.left = rect.right;
+       rect.right = rect.left + (float)B_V_SCROLL_BAR_WIDTH;
+       PoseView()->VScrollBar()->MoveTo(rect.LeftTop());
+       PoseView()->VScrollBar()->ResizeTo(rect.Size());
+       PoseView()->VScrollBar()->SetResizingMode(B_FOLLOW_TOP_BOTTOM | 
B_FOLLOW_RIGHT);
+       fBackView->AddChild(PoseView()->VScrollBar());
+
+       if (fIsSavePanel)
+               fBackView->AddChild(fBorderedView, fTextControl);
+       else
+               fBackView->AddChild(fBorderedView);
 
        AddShortcut('W', B_COMMAND_KEY, new BMessage(kCancelButton));
        AddShortcut('H', B_COMMAND_KEY, new BMessage(kSwitchToHome));
@@ -877,6 +897,35 @@ TFilePanel::RestoreState()
                RestoreWindowState(NULL);
                PoseView()->Init(NULL);
        }
+
+       // Finish UI creation now that the PoseView is initialized
+       BLayoutItem* item
+               = fBorderedView->GroupLayout()->AddView(0, 
fPoseView->TitleView());
+       BSize minSize = item->MinSize();
+       BSize maxSize = item->MaxSize();
+       item->SetExplicitMinSize(BSize(minSize.Width(), kTitleViewHeight));
+       item->SetExplicitMaxSize(BSize(maxSize.Width(), kTitleViewHeight));
+
+       BRect rect(fBorderedView->Frame());
+       rect.right = rect.left + kCountViewWidth;
+       rect.top = rect.bottom + 1;
+       rect.bottom = rect.top + PoseView()->HScrollBar()->Bounds().Height() - 
1;
+       PoseView()->CountView()->MoveTo(rect.LeftTop());
+       PoseView()->CountView()->ResizeTo(rect.Size());
+       PoseView()->CountView()->SetResizingMode(B_FOLLOW_LEFT | 
B_FOLLOW_BOTTOM);
+       fBackView->AddChild(PoseView()->CountView(), fBorderedView);
+
+       PoseView()->HScrollBar()->MoveBy(kCountViewWidth + 1, 0);
+       PoseView()->HScrollBar()->ResizeBy(-kCountViewWidth - 1, 0);
+
+       // The Be Book states that the BTitleView will have a name of 
"TitleView",
+       // and so some apps will try to grab it by that name and move it around.
+       // They don't need to, because resizing "PoseView" (really the 
BorderedView)
+       // will resize the BTitleView as well. So just create a dummy view here
+       // so that they don't get NULL when trying to find the view.
+       BView* dummyTitleView = new BView(BRect(), "TitleView", B_FOLLOW_NONE, 
0);
+       fBackView->AddChild(dummyTitleView);
+       dummyTitleView->Hide();
 }
 
 
@@ -1650,9 +1699,9 @@ TFilePanel::WindowActivated(bool active)
 //     #pragma mark -
 
 
-BFilePanelPoseView::BFilePanelPoseView(Model* model, BRect frame,
-       uint32 resizeMask)
-       : BPoseView(model, frame, kListMode, resizeMask),
+BFilePanelPoseView::BFilePanelPoseView(Model* model)
+       :
+       BPoseView(model, kListMode),
        fIsDesktop(model->IsDesktop())
 {
 }
diff --git a/src/kits/tracker/FilePanelPriv.h b/src/kits/tracker/FilePanelPriv.h
index fc24470..22acfd7 100644
--- a/src/kits/tracker/FilePanelPriv.h
+++ b/src/kits/tracker/FilePanelPriv.h
@@ -50,7 +50,7 @@ class BMenuField;
 
 namespace BPrivate {
 
-class BackgroundView;
+class BorderedView;
 class BDirMenu;
 class AttributeStreamNode;
 class BFilePanelPoseView;
@@ -103,7 +103,7 @@ public:
        bool TrackingMenu() const;
 
 protected:
-       BPoseView* NewPoseView(Model* model, BRect rect, uint32 viewMode);
+       BPoseView* NewPoseView(Model* model, uint32);
        virtual void Init(const BMessage* message = NULL);
        virtual void SaveState(bool hide = true);
        virtual void SaveState(BMessage &) const;
@@ -130,8 +130,6 @@ protected:
                const char* button2 = NULL, const char* button3 = NULL);
 
 private:
-       friend class BackgroundView;
-
        bool SwitchDirToDesktopIfNeeded(entry_ref &ref);
        bool CanOpenParent() const;
        void SwitchDirMenuTo(const entry_ref* ref);
@@ -142,7 +140,7 @@ private:
 
        bool fIsSavePanel;
        uint32 fNodeFlavors;
-       BackgroundView* fBackView;
+       BView* fBackView;
        BDirMenu* fDirMenu;
        BMenuField* fDirMenuField;
        BTextControl* fTextControl;
@@ -160,7 +158,7 @@ private:
 
 class BFilePanelPoseView : public BPoseView {
 public:
-       BFilePanelPoseView(Model*, BRect, uint32 resizeMask = B_FOLLOW_ALL);
+       BFilePanelPoseView(Model*);
 
        virtual bool IsFilePanel() const;
        virtual bool FSNotification(const BMessage*);
diff --git a/src/kits/tracker/Navigator.cpp b/src/kits/tracker/Navigator.cpp
index 74efc5b..59628f9 100644
--- a/src/kits/tracker/Navigator.cpp
+++ b/src/kits/tracker/Navigator.cpp
@@ -35,7 +35,6 @@ All rights reserved.
 
 #include "Navigator.h"
 
-#include <Picture.h>
 #include <TextControl.h>
 #include <Window.h>
 
@@ -52,139 +51,24 @@ static const int32 kMaxHistory = 32;
 
 }
 
-// BPictureButton() will crash when giving zero pointers,
-// although we really want and have to set up the
-// pictures when we can, e.g. on a AttachedToWindow.
-static BPicture sPicture;
-
-static const float kButtonWidth = 19.0f;
-static const float kButtonSpacing = 31.0f;
-       // button width and spacing forms a golden rectangle
-static const float kLeftMargin = 9.0f;
-
-
-//     #pragma mark - BNavigatorButton
-
-
-BNavigatorButton::BNavigatorButton(BRect rect, const char* name,
-       BMessage* message, int32 resIDon, int32 resIDoff, int32 resIDdisabled)
-       :
-       BPictureButton(rect, name, &sPicture, &sPicture, message),
-       fResIDOn(resIDon),
-       fResIDOff(resIDoff),
-       fResIDDisabled(resIDdisabled)
-{
-       // Clear to background color to avoid ugly border on click
-       SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
-       SetHighColor(ui_color(B_PANEL_BACKGROUND_COLOR));
-       SetLowColor(ui_color(B_PANEL_BACKGROUND_COLOR));
-}
-
-
-BNavigatorButton::~BNavigatorButton()
-{
-}
-
-
-void
-BNavigatorButton::AttachedToWindow()
-{
-       BBitmap* bmpOn = 0;
-       GetTrackerResources()->GetBitmapResource(B_MESSAGE_TYPE, fResIDOn,
-               &bmpOn);
-       SetPicture(bmpOn, true, true);
-       delete bmpOn;
-
-       BBitmap* bmpOff = 0;
-       GetTrackerResources()->GetBitmapResource(B_MESSAGE_TYPE, fResIDOff,
-               &bmpOff);
-       SetPicture(bmpOff, true, false);
-       delete bmpOff;
-
-       BBitmap* bmpDisabled = 0;
-       GetTrackerResources()->GetBitmapResource(B_MESSAGE_TYPE, fResIDDisabled,
-               &bmpDisabled);
-       SetPicture(bmpDisabled, false, false);
-       SetPicture(bmpDisabled, false, true);
-       delete bmpDisabled;
-}
-
-
-void
-BNavigatorButton::SetPicture(BBitmap* bitmap, bool enabled, bool on)
-{
-       if (bitmap != NULL) {
-               BPicture picture;
-               BView view(bitmap->Bounds(), "", 0, 0);
-               AddChild(&view);
-               view.BeginPicture(&picture);
-               view.SetHighColor(ui_color(B_PANEL_BACKGROUND_COLOR));
-               view.FillRect(view.Bounds());
-               view.SetDrawingMode(B_OP_OVER);
-               view.DrawBitmap(bitmap, BPoint(0, 0));
-               view.EndPicture();
-               RemoveChild(&view);
-               if (enabled)
-                       on ? SetEnabledOn(&picture) : SetEnabledOff(&picture);
-               else
-                       on ? SetDisabledOn(&picture) : SetDisabledOff(&picture);
-       }
-}
-
 
 //     #pragma mark - BNavigator
 
 
-BNavigator::BNavigator(const Model* model, BRect rect, uint32 resizeMask)
+BNavigator::BNavigator(const Model* model)
        :
-       BView(rect, "Navigator", resizeMask, B_WILL_DRAW),
-       fBack(0),
-       fForw(0),
-       fUp(0),
+       BToolbar(BRect()), // FIXME in BToolbar: pointless BRect()
        fBackHistory(8, true),
        fForwHistory(8, true)
 {
        // Get initial path
        model->GetPath(&fPath);
 
-       SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
-
-       float top = 2 + (be_plain_font->Size() - 8) / 2;
-
-       // Set up widgets
-       fBack = new BNavigatorButton(
-               BRect(kLeftMargin, top, kLeftMargin + kButtonWidth - 1,
-                       top + kButtonWidth - 2),
-               "Back", new BMessage(kNavigatorCommandBackward),
-               R_ResBackNavActiveSel, R_ResBackNavActive, 
R_ResBackNavInactive);
-       fBack->SetEnabled(false);
-       AddChild(fBack);
-
-       fForw = new BNavigatorButton(
-               BRect(kLeftMargin + kButtonSpacing, top,
-                       kLeftMargin + kButtonSpacing + kButtonWidth - 1,
-                       top + kButtonWidth - 2),
-               "Forw", new BMessage(kNavigatorCommandForward),
-               R_ResForwNavActiveSel, R_ResForwNavActive, 
R_ResForwNavInactive);
-       fForw->SetEnabled(false);
-       AddChild(fForw);
-
-       fUp = new BNavigatorButton(
-               BRect(kLeftMargin + kButtonSpacing * 2, top,
-                       kLeftMargin + kButtonSpacing * 2 + kButtonWidth - 1,
-                       top + kButtonWidth - 2),
-               "Up", new BMessage(kNavigatorCommandUp), R_ResUpNavActiveSel,
-               R_ResUpNavActive, R_ResUpNavInactive);
-       fUp->SetEnabled(false);
-       AddChild(fUp);
-
-       fLocation = new BTextControl(
-               BRect(kLeftMargin + kButtonSpacing * 3, 2,
-                       rect.Width() - 2, 2 + kButtonWidth),
-               "Location", "", "", new BMessage(kNavigatorCommandLocation),
-               B_FOLLOW_LEFT_RIGHT);
+       fLocation = new BTextControl("Location", "", "",
+               new BMessage(kNavigatorCommandLocation));
        fLocation->SetDivider(0);
-       AddChild(fLocation);
+
+       GroupLayout()->SetInsets(0, 0, B_USE_HALF_ITEM_INSETS, 0);
 }
 
 
@@ -196,10 +80,29 @@ BNavigator::~BNavigator()
 void
 BNavigator::AttachedToWindow()
 {
-       // All messages should arrive here
-       fBack->SetTarget(this);
-       fForw->SetTarget(this);
-       fUp->SetTarget(this);
+       // Set up toolbar items
+       BBitmap* bmpBack = new BBitmap(BRect(0, 0, 19, 19), B_RGBA32);
+       GetTrackerResources()->GetIconResource(R_ResBackNav, B_MINI_ICON,
+               bmpBack);
+       AddAction(kNavigatorCommandBackward, this, bmpBack);
+       SetActionEnabled(kNavigatorCommandBackward, false);
+       delete bmpBack;
+
+       BBitmap* bmpForw = new BBitmap(BRect(0, 0, 19, 19), B_RGBA32);
+       GetTrackerResources()->GetIconResource(R_ResForwNav, B_MINI_ICON,
+               bmpForw);
+       AddAction(kNavigatorCommandForward, this, bmpForw);
+       SetActionEnabled(kNavigatorCommandForward, false);
+       delete bmpForw;
+
+       BBitmap* bmpUp = new BBitmap(BRect(0, 0, 19, 19), B_RGBA32);
+       GetTrackerResources()->GetIconResource(R_ResUpNav, B_MINI_ICON,
+               bmpUp);
+       AddAction(kNavigatorCommandUp, this, bmpUp);
+       SetActionEnabled(kNavigatorCommandUp, false);
+       delete bmpUp;
+
+       GroupLayout()->AddView(fLocation);
        fLocation->SetTarget(this);
 }
 
@@ -213,25 +116,6 @@ BNavigator::AllAttached()
 
 
 void
-BNavigator::Draw(BRect)
-{
-       rgb_color bgColor = ui_color(B_PANEL_BACKGROUND_COLOR);
-       rgb_color shineColor = ui_color(B_SHINE_COLOR);
-       rgb_color halfDarkColor = tint_color(bgColor, B_DARKEN_1_TINT);
-       rgb_color darkColor = tint_color(bgColor, B_DARKEN_2_TINT);
-       // Draws a beveled smooth border
-       BeginLineArray(4);
-       AddLine(Bounds().LeftTop(), Bounds().RightTop(), shineColor);
-       AddLine(Bounds().LeftTop(), Bounds().LeftBottom() - BPoint(0, 1),
-               shineColor);
-       AddLine(Bounds().LeftBottom() - BPoint(-1, 1),
-               Bounds().RightBottom() - BPoint(0, 1), halfDarkColor);
-       AddLine(Bounds().LeftBottom(), Bounds().RightBottom(), darkColor);
-       EndLineArray();
-}
-
-
-void
 BNavigator::MessageReceived(BMessage* message)
 {
        switch (message->what) {
@@ -434,24 +318,16 @@ BNavigator::UpdateLocation(const Model* newmodel, int32 
action)
        BEntry entry;
        if (entry.SetTo(fPath.Path()) == B_OK) {
                BEntry parentEntry;
-               fUp->SetEnabled(entry.GetParent(&parentEntry) == B_OK
-                       && !FSIsDeskDir(&parentEntry));
+               bool enable = entry.GetParent(&parentEntry) == B_OK
+                       && !FSIsDeskDir(&parentEntry);
+               SetActionEnabled(kNavigatorCommandUp, enable);
        }
 
        // Enable history buttons if history contains something
-       fForw->SetEnabled(fForwHistory.CountItems() > 0);
-       fBack->SetEnabled(fBackHistory.CountItems() > 1);
+       SetActionEnabled(kNavigatorCommandForward, fForwHistory.CountItems() > 
0);
+       SetActionEnabled(kNavigatorCommandBackward, fBackHistory.CountItems() > 
1);
 
        // Avoid loss of selection and cursor position
        if (action != kActionLocation)
                fLocation->SetText(fPath.Path());
 }
-
-
-float
-BNavigator::CalcNavigatorHeight(void)
-{
-       // Empiric formula from how much space the textview
-       // will take once it is attached (using be_plain_font):
-       return ceilf(11.0f + be_plain_font->Size() * (1.0f + 7.0f / 30.0f));
-}
diff --git a/src/kits/tracker/Navigator.h b/src/kits/tracker/Navigator.h
index 8cb5599..c7c8b9d 100644
--- a/src/kits/tracker/Navigator.h
+++ b/src/kits/tracker/Navigator.h
@@ -35,8 +35,7 @@ All rights reserved.
 #define _NAVIGATOR_H
 
 
-#include <PictureButton.h>
-#include <View.h>
+#include <Toolbar.h>
 
 #include "ContainerWindow.h"
 #include "Model.h"
@@ -64,40 +63,16 @@ enum NavigationAction
 };
 
 
-// Custom BPictureButton which takes
-// bitmap resource IDs as arguments
-class BNavigatorButton : public BPictureButton {
+class BNavigator : public BToolbar {
 public:
-       BNavigatorButton(BRect rect, const char* name, BMessage* message,
-               int32 resIDon, int32 resIDoff, int32 resIDdisabled);
-
-       ~BNavigatorButton();
-
-       virtual void AttachedToWindow();
-
-       void SetPicture(BBitmap*, bool enabled, bool on);
-
-private:
-       int32 fResIDOn;
-       int32 fResIDOff;
-       int32 fResIDDisabled;
-};
-
-
-class BNavigator : public BView {
-public:
-       BNavigator(const Model* model, BRect rect,
-               uint32 resizeMask = B_FOLLOW_LEFT_RIGHT);
+       BNavigator(const Model* model);
        ~BNavigator();
 
        void UpdateLocation(const Model* newmodel, int32 action);
 
-       static float CalcNavigatorHeight(void);
-
        BContainerWindow* Window() const;
 
 protected:
-       virtual void Draw(BRect rect);
        virtual void MessageReceived(BMessage* msg);
        virtual void AttachedToWindow();
        virtual void AllAttached();
@@ -112,9 +87,6 @@ protected:
 
 private:
        BPath fPath;
-       BNavigatorButton* fBack;
-       BNavigatorButton* fForw;
-       BNavigatorButton* fUp;
        BTextControl* fLocation;
 
        BObjectList<BPath> fBackHistory;
diff --git a/src/kits/tracker/OpenWithWindow.cpp 
b/src/kits/tracker/OpenWithWindow.cpp
index 1e1bfbc..ff0edb4 100644
--- a/src/kits/tracker/OpenWithWindow.cpp
+++ b/src/kits/tracker/OpenWithWindow.cpp
@@ -45,11 +45,14 @@ All rights reserved.
 #include <Alert.h>
 #include <Button.h>
 #include <Catalog.h>
+#include <GroupView.h>
+#include <GridView.h>
 #include <Locale.h>
 #include <Mime.h>
 #include <NodeInfo.h>
 #include <Path.h>
 #include <Roster.h>
+#include <SpaceLayoutItem.h>
 #include <Volume.h>
 #include <VolumeRoster.h>
 
@@ -81,10 +84,9 @@ const rgb_color kOpenWithDefaultColor = { 0xFF, 0xFF, 0xCC, 
255};
 
 
 OpenWithContainerWindow::OpenWithContainerWindow(BMessage* entriesToOpen,
-       LockingList<BWindow>* windowList, window_look look, window_feel feel,
-       uint32 flags, uint32 workspace)
+       LockingList<BWindow>* windowList)
        :
-       BContainerWindow(windowList, 0, look, feel, flags, workspace),
+       BContainerWindow(windowList, 0),
        fEntriesToOpen(entriesToOpen)
 {
        AutoLock<BWindow> lock(this);
@@ -93,58 +95,28 @@ OpenWithContainerWindow::OpenWithContainerWindow(BMessage* 
entriesToOpen,
        MoveTo(windowRect.LeftTop());
        ResizeTo(windowRect.Width(), windowRect.Height());
 
-       // add a background view; use the standard BackgroundView here, the same
-       // as the file panel is using
-       BRect rect(Bounds());
-       BackgroundView* backgroundView = new BackgroundView(rect);
-       AddChild(backgroundView);
+       // Create controls
+       fButtonContainer = new BGroupView(B_HORIZONTAL, B_USE_ITEM_SPACING);
+       fButtonContainer->GroupLayout()->SetInsets(0, B_USE_ITEM_INSETS,
+               B_USE_ITEM_INSETS, 0);
 
-       rect = Bounds();
+       fLaunchButton = new BButton("ok", B_TRANSLATE("Open"),
+               new BMessage(kDefaultButton));
 
-       // add buttons
-
-       fLaunchButton = new BButton(rect, "ok", B_TRANSLATE("Open"),
-               new BMessage(kDefaultButton), B_FOLLOW_RIGHT | B_FOLLOW_BOTTOM);
-       fLaunchButton->ResizeToPreferred();
-       fLaunchButton->MoveTo(rect.right - 10 - kDocumentKnobWidth
-               - fLaunchButton->Bounds().Width(),
-               rect.bottom - 10.0f - fLaunchButton->Bounds().Height());
-       backgroundView->AddChild(fLaunchButton);
+       fLaunchButton->MakeDefault(true);
 
-       BRect buttonRect = fLaunchButton->Frame();
-       fLaunchAndMakeDefaultButton = new BButton(buttonRect, "make default",
+       fLaunchAndMakeDefaultButton = new BButton("make default",
                B_TRANSLATE("Open and make preferred"),
-               new BMessage(kOpenAndMakeDefault), B_FOLLOW_RIGHT | 
B_FOLLOW_BOTTOM);
+               new BMessage(kOpenAndMakeDefault));
        // wide button, have to resize to fit text
-       fLaunchAndMakeDefaultButton->ResizeToPreferred();
-       fLaunchAndMakeDefaultButton->MoveBy(-10.0f
-               - fLaunchAndMakeDefaultButton->Bounds().Width(), 0.0f);
-       backgroundView->AddChild(fLaunchAndMakeDefaultButton);
        fLaunchAndMakeDefaultButton->SetEnabled(false);
 
-       buttonRect = fLaunchAndMakeDefaultButton->Frame();
-       BButton* button = new BButton(buttonRect, "cancel", 
B_TRANSLATE("Cancel"),
-               new BMessage(kCancelButton), B_FOLLOW_RIGHT | B_FOLLOW_BOTTOM);
-       button->ResizeToPreferred();
-       button->MoveBy(-10.0f - button->Bounds().Width(), 0.0f);
-       backgroundView->AddChild(button);
-
-       fMinimalWidth = button->Bounds().Width() + 
fLaunchButton->Bounds().Width()
-               + fLaunchAndMakeDefaultButton->Bounds().Width() + 
kDocumentKnobWidth
-               + 40.0f;
-
-       fLaunchButton->MakeDefault(true);
-
-       // add pose view
+       fCancelButton = new BButton("cancel", B_TRANSLATE("Cancel"),
+               new BMessage(kCancelButton));
 
-       rect.OffsetTo(10.0f, 10.0f);
-       rect.bottom = buttonRect.top - 15.0f;
-
-       rect.right -= B_V_SCROLL_BAR_WIDTH + 20.0f;
-       rect.bottom -= B_H_SCROLL_BAR_HEIGHT;
-               // make room for scrollbars and a margin
-       fPoseView = NewPoseView(0, rect, kListMode);
-       backgroundView->AddChild(fPoseView);
+       // Add pose view
+       fPoseView = NewPoseView(NULL, kListMode);
+       fBorderedView->GroupLayout()->AddView(fPoseView);
 
        fPoseView->SetFlags(fPoseView->Flags() | B_NAVIGABLE);
        fPoseView->SetPoseEditing(false);
@@ -175,9 +147,9 @@ OpenWithContainerWindow::~OpenWithContainerWindow()
 
 
 BPoseView*
-OpenWithContainerWindow::NewPoseView(Model*, BRect rect, uint32)
+OpenWithContainerWindow::NewPoseView(Model*, uint32)
 {
-       return new OpenWithPoseView(rect);
+       return new OpenWithPoseView;
 }
 
 
@@ -448,6 +420,28 @@ OpenWithContainerWindow::Init(const BMessage* message)
 
 
 void
+OpenWithContainerWindow::InitLayout()
+{
+       _inherited::InitLayout();
+
+       // Remove the menu container, since we don't have a menu bar
+       fMenuContainer->RemoveSelf();
+
+       // Reset insets
+       fRootLayout->SetInsets(B_USE_ITEM_INSETS);
+       fPoseContainer->GridLayout()->SetInsets(0);
+       fVScrollBarContainer->GroupLayout()->SetInsets(-1, 0, 0, 0);
+       fCountContainer->GroupLayout()->SetInsets(0);
+
+       fRootLayout->AddView(fButtonContainer);
+       
fButtonContainer->GroupLayout()->AddItem(BSpaceLayoutItem::CreateGlue());
+       fButtonContainer->GroupLayout()->AddView(fCancelButton);
+       fButtonContainer->GroupLayout()->AddView(fLaunchAndMakeDefaultButton);
+       fButtonContainer->GroupLayout()->AddView(fLaunchButton);
+}
+
+
+void
 OpenWithContainerWindow::RestoreState()
 {
        BNode defaultingNode;
@@ -460,6 +454,7 @@ OpenWithContainerWindow::RestoreState()
                RestoreWindowState(NULL);
                fPoseView->Init(NULL);
        }
+       InitLayout();
 }
 
 
@@ -473,7 +468,6 @@ OpenWithContainerWindow::RestoreState(const BMessage 
&message)
 void
 OpenWithContainerWindow::RestoreWindowState(AttributeStreamNode* node)
 {
-       SetSizeLimits(fMinimalWidth, 10000, 160, 10000);
        if (node == NULL)
                return;
 
@@ -538,9 +532,9 @@ OpenWithContainerWindow::SetCanOpen(bool on)
 //     #pragma mark - OpenWithPoseView
 
 
-OpenWithPoseView::OpenWithPoseView(BRect frame, uint32 resizeMask)
+OpenWithPoseView::OpenWithPoseView()
        :
-       BPoseView(new Model(), frame, kListMode, resizeMask),
+       BPoseView(new Model(), kListMode),
        fHaveCommonPreferredApp(false),
        fIterator(NULL)
 {
diff --git a/src/kits/tracker/OpenWithWindow.h 
b/src/kits/tracker/OpenWithWindow.h
index cb4c111..e8a625b 100644
--- a/src/kits/tracker/OpenWithWindow.h
+++ b/src/kits/tracker/OpenWithWindow.h
@@ -48,6 +48,7 @@ All rights reserved.
 #include "SlowMenu.h"
 #include "Utilities.h"
 
+class BGroupView;
 
 namespace BPrivate {
 
@@ -138,14 +139,12 @@ private:
 class OpenWithContainerWindow : public BContainerWindow {
 public:
        OpenWithContainerWindow(BMessage* entriesToOpen,
-               LockingList<BWindow>* windowList,
-               window_look look = B_DOCUMENT_WINDOW_LOOK,
-               window_feel feel = B_NORMAL_WINDOW_FEEL,
-               uint32 flags = 0, uint32 workspace = B_CURRENT_WORKSPACE);
+               LockingList<BWindow>* windowList);
                // <entriesToOpen> eventually get opened by the selected app
        virtual ~OpenWithContainerWindow();
 
        virtual void Init(const BMessage* message);
+       virtual void InitLayout();
 
        const BMessage* EntryList() const;
                // return the list of the entries we are supposed to open
@@ -156,8 +155,7 @@ public:
        OpenWithPoseView* PoseView() const;
 
 protected:
-       virtual BPoseView* NewPoseView(Model* model, BRect rect,
-               uint32 viewMode);
+       virtual BPoseView* NewPoseView(Model* model, uint32 viewMode);
 
        virtual bool ShouldAddMenus() const;
        virtual void ShowContextMenu(BPoint, const entry_ref*, BView*);
@@ -191,7 +189,9 @@ private:
        BMessage* fEntriesToOpen;
        BButton* fLaunchButton;
        BButton* fLaunchAndMakeDefaultButton;
-       float fMinimalWidth;
+       BButton* fCancelButton;
+
+       BGroupView* fButtonContainer;
 
        typedef BContainerWindow _inherited;
 };
@@ -199,7 +199,7 @@ private:
 
 class OpenWithPoseView : public BPoseView {
 public:
-       OpenWithPoseView(BRect, uint32 resizeMask = B_FOLLOW_ALL);
+       OpenWithPoseView();
 
        virtual void OpenSelection(BPose*, int32*);
                // open entries with the selected app
diff --git a/src/kits/tracker/PoseView.cpp b/src/kits/tracker/PoseView.cpp
index 486c3c8..943aca6 100644
--- a/src/kits/tracker/PoseView.cpp
+++ b/src/kits/tracker/PoseView.cpp
@@ -111,7 +111,6 @@ using std::max;
 
 
 const float kDoubleClickTresh = 6;
-const float kCountViewWidth = 76;
 
 const uint32 kAddNewPoses = 'Tanp';
 const uint32 kAddPosesCompleted = 'Tapc';
@@ -203,13 +202,12 @@ static int
 PoseCompareAddWidget(const BPose* p1, const BPose* p2, BPoseView* view);
 
 
-// #pragma mark - BPoseView
+//     #pragma mark - BPoseView
 
 
-BPoseView::BPoseView(Model* model, BRect bounds, uint32 viewMode,
-       uint32 resizeMask)
+BPoseView::BPoseView(Model* model, uint32 viewMode)
        :
-       BView(bounds, "PoseView", resizeMask, B_WILL_DRAW | B_PULSE_NEEDED),
+       BView("BPoseView", B_WILL_DRAW | B_PULSE_NEEDED),
        fIsDrawingSelectionRect(false),
        fHScrollBar(NULL),
        fVScrollBar(NULL),
@@ -320,23 +318,11 @@ BPoseView::InitCommon()
 {
        BContainerWindow* window = ContainerWindow();
 
-       // create title view for window
-       BRect rect(Frame());
-       rect.bottom = rect.top + kTitleViewHeight;
-       fTitleView = new BTitleView(rect, this);
-       if (ViewMode() == kListMode) {
-               // resize and move poseview
-               MoveBy(0, kTitleViewHeight + 1);
-               ResizeBy(0, -(kTitleViewHeight + 1));
-
-               if (Parent() != NULL)
-                       Parent()->AddChild(fTitleView);
-               else
-                       Window()->AddChild(fTitleView);
-       }
-
-       if (fHScrollBar)
+       // Create the TitleView and CountView
+       fTitleView = new BTitleView(this);
+       if (fHScrollBar != NULL)
                fHScrollBar->SetTitleView(fTitleView);
+       fCountView = new BCountView(this);
 
        BPoint origin;
        if (ViewMode() == kListMode)
@@ -361,9 +347,6 @@ BPoseView::InitCommon()
        StartWatching();
                // turn on volume node monitor, metamime monitor, etc.
 
-       if (window != NULL && window->ShouldAddCountView())
-               AddCountView();
-
        // populate the window
        if (window != NULL && window->IsTrash())
                AddTrashPoses();
@@ -939,16 +922,6 @@ BPoseView::Pulse()
 
 
 void
-BPoseView::MoveBy(float x, float y)
-{
-       if (fTitleView && fTitleView->Window())
-               fTitleView->MoveBy(x, y);
-
-       _inherited::MoveBy(x, y);
-}
-
-
-void
 BPoseView::ScrollTo(BPoint where)
 {
        _inherited::ScrollTo(where);
@@ -1063,13 +1036,22 @@ BPoseView::MakeFocus(bool focused)
        _inherited::MakeFocus(focused);
 
        if (invalidate) {
-               BackgroundView* view = dynamic_cast<BackgroundView*>(Parent());
+               BorderedView* view = dynamic_cast<BorderedView*>(Parent());
                if (view != NULL)
                        view->PoseViewFocused(focused);
        }
 }
 
 
+BSize
+BPoseView::MinSize()
+{
+       // Between the BTitleView, BCountView, and scrollbars,
+       // we don't need any extra room.
+       return BSize(0, 0);
+}
+
+
 void
 BPoseView::WindowActivated(bool active)
 {
@@ -2080,33 +2062,8 @@ BPoseView::EnableScrollBars()
 void
 BPoseView::AddScrollBars()
 {
-       AutoLock<BWindow> lock(Window());
-       if (!lock)
-               return;
-
-       BRect bounds(Frame());
-
-       // horizontal
-       BRect rect(bounds);
-       rect.top = rect.bottom + 1;
-       rect.bottom = rect.top + (float)B_H_SCROLL_BAR_HEIGHT;
-       rect.right++;
-       fHScrollBar = new BHScrollBar(rect, "HScrollBar", this);
-       if (Parent() != NULL)
-               Parent()->AddChild(fHScrollBar);
-       else
-               Window()->AddChild(fHScrollBar);
-
-       // vertical
-       rect = bounds;
-       rect.left = rect.right + 1;
-       rect.right = rect.left + (float)B_V_SCROLL_BAR_WIDTH;
-       rect.bottom++;
-       fVScrollBar = new BScrollBar(rect, "VScrollBar", this, 0, 100, 
B_VERTICAL);
-       if (Parent() != NULL)
-               Parent()->AddChild(fVScrollBar);
-       else
-               Window()->AddChild(fVScrollBar);
+       fHScrollBar = new TScrollBar("HScrollBar", this, 0, 100);
+       fVScrollBar = new BScrollBar("VScrollBar", this, 0, 100, B_VERTICAL);
 }
 
 
@@ -2119,30 +2076,6 @@ BPoseView::UpdateCount()
 
 
 void
-BPoseView::AddCountView()
-{
-       AutoLock<BWindow> lock(Window());
-       if (!lock)
-               return;
-
-       BRect rect(Frame());
-       rect.right = rect.left + kCountViewWidth;
-       rect.top = rect.bottom + 1;
-       rect.bottom = rect.top + (float)B_H_SCROLL_BAR_HEIGHT - 1;
-       fCountView = new BCountView(rect, this);
-       if (Parent() != NULL)
-               Parent()->AddChild(fCountView);
-       else
-               Window()->AddChild(fCountView);
-
-       if (fHScrollBar != NULL) {
-               fHScrollBar->MoveBy(kCountViewWidth + 1, 0);
-               fHScrollBar->ResizeBy(-kCountViewWidth - 1, 0);
-       }
-}
-
-
-void
 BPoseView::MessageReceived(BMessage* message)
 {
        if (message->WasDropped() && HandleMessageDropped(message))
@@ -3093,26 +3026,15 @@ BPoseView::SetViewMode(uint32 newMode)
                if (fFiltering)
                        ClearFilter();
 
-               fTitleView->RemoveSelf();
-
                if (window != NULL)
                        window->HideAttributeMenu();
 
-               MoveBy(0, -(kTitleViewHeight + 1));
-               ResizeBy(0, kTitleViewHeight + 1);
+               fTitleView->Hide();
        } else if (newMode == kListMode) {
-               MoveBy(0, kTitleViewHeight + 1);
-               ResizeBy(0, -(kTitleViewHeight + 1));
-
                if (window != NULL)
                        window->ShowAttributeMenu();
 
-               fTitleView->ResizeTo(Frame().Width(), 
fTitleView->Frame().Height());
-               fTitleView->MoveTo(Frame().left, Frame().top - 
(kTitleViewHeight + 1));
-               if (Parent() != NULL)
-                       Parent()->AddChild(fTitleView);
-               else
-                       Window()->AddChild(fTitleView);
+               fTitleView->Show();
        }
 
        CommitActivePose();
@@ -8402,28 +8324,15 @@ BPoseView::SwitchDir(const entry_ref* newDirRef, 
AttributeStreamNode* node)
 
        if (viewStateRestored) {
                if (ViewMode() == kListMode && oldMode != kListMode) {
-
-                       MoveBy(0, kTitleViewHeight + 1);
-                       ResizeBy(0, -(kTitleViewHeight + 1));
-
                        if (ContainerWindow())
                                ContainerWindow()->ShowAttributeMenu();
 
-                       fTitleView->ResizeTo(Frame().Width(), 
fTitleView->Frame().Height());
-                       fTitleView->MoveTo(Frame().left, Frame().top
-                               - (kTitleViewHeight + 1));
-                       if (Parent() != NULL)
-                               Parent()->AddChild(fTitleView);
-                       else
-                               Window()->AddChild(fTitleView);
+                       fTitleView->Show();
                } else if (ViewMode() != kListMode && oldMode == kListMode) {
-                       fTitleView->RemoveSelf();
+                       fTitleView->Hide();
 
                        if (ContainerWindow())
                                ContainerWindow()->HideAttributeMenu();
-
-                       MoveBy(0, -(kTitleViewHeight + 1));
-                       ResizeBy(0, kTitleViewHeight + 1);
                } else if (ViewMode() == kListMode && oldMode == kListMode)
                        fTitleView->Invalidate();
 
@@ -10444,19 +10353,19 @@ BPoseView::ExcludeTrashFromSelection()
 }
 
 
-//     #pragma mark - BHScrollBar
+//     #pragma mark - TScrollBar
 
 
-BHScrollBar::BHScrollBar(BRect bounds, const char* name, BView* target)
+TScrollBar::TScrollBar(const char* name, BView* target, float min, float max)
        :
-       BScrollBar(bounds, name, target, 0, 1, B_HORIZONTAL),
-       fTitleView(0)
+       BScrollBar(name, target, min, max, B_HORIZONTAL),
+       fTitleView(NULL)
 {
 }
 
 
 void
-BHScrollBar::ValueChanged(float value)
+TScrollBar::ValueChanged(float value)
 {
        if (fTitleView) {
                BPoint origin = fTitleView->LeftTop();
diff --git a/src/kits/tracker/PoseView.h b/src/kits/tracker/PoseView.h
index 6bcd752..131f872 100644
--- a/src/kits/tracker/PoseView.h
+++ b/src/kits/tracker/PoseView.h
@@ -91,8 +91,8 @@ namespace BPrivate {
 
 class BCountView;
 class BContainerWindow;
-class BHScrollBar;
 class EntryListBase;
+class TScrollBar;
 
 
 const int32 kSmallStep = 10;
@@ -106,8 +106,7 @@ const uint32 kCheckTypeahead = 'Tcty';
 
 class BPoseView : public BView {
 public:
-       BPoseView(Model*, BRect, uint32 viewMode,
-               uint32 resizeMask = B_FOLLOW_ALL);
+       BPoseView(Model*, uint32 viewMode);
        virtual ~BPoseView();
 
        // setup, teardown
@@ -164,6 +163,7 @@ public:
        virtual void AttachedToWindow();
        virtual void WindowActivated(bool active);
        virtual void MakeFocus(bool = true);
+       virtual BSize MinSize();
        virtual void Draw(BRect update_rect);
        virtual void DrawAfterChildren(BRect update_rect);
        virtual void MouseMoved(BPoint, uint32, const BMessage*);
@@ -174,7 +174,6 @@ public:
        virtual void MouseIdle(const BMessage*);
        virtual void KeyDown(const char*, int32);
        virtual void Pulse();
-       virtual void MoveBy(float, float);
        virtual void ScrollTo(BPoint);
 
        // misc. mode setters
@@ -199,9 +198,10 @@ public:
        virtual void UpdateScrollRange();
        virtual void SetScrollBarsTo(BPoint);
        virtual void AddScrollBars();
-       BHScrollBar* HScrollBar() const;
+       BScrollBar* HScrollBar() const;
        BScrollBar* VScrollBar() const ;
        BCountView* CountView() const;
+       BTitleView* TitleView() const;
        void DisableScrollBars();
        void EnableScrollBars();
 
@@ -638,7 +638,6 @@ protected:
        void RemoveFromExtent(const BRect&);
 
        virtual void EditQueries();
-       virtual void AddCountView();
 
        void HandleAttrMenuItemSelected(BMessage*);
        void TryUpdatingBrokenLinks();
@@ -690,7 +689,7 @@ private:
        void MoveSelectionOrEntryToTrash(const entry_ref* ref, bool selectNext);
 
 protected:
-       BHScrollBar* fHScrollBar;
+       TScrollBar* fHScrollBar;
        BScrollBar* fVScrollBar;
        Model* fModel;
        BPose* fActivePose;
@@ -797,9 +796,9 @@ protected:
 };
 
 
-class BHScrollBar : public BScrollBar {
+class TScrollBar : public BScrollBar {
 public:
-       BHScrollBar(BRect, const char*, BView*);
+       TScrollBar(const char*, BView*, float, float);
        void SetTitleView(BView*);
 
        // BScrollBar overrides
@@ -890,7 +889,7 @@ BPoseView::MimeTypesInSelection()
 }
 
 
-inline BHScrollBar*
+inline BScrollBar*
 BPoseView::HScrollBar() const
 {
        return fHScrollBar;
@@ -911,6 +910,13 @@ BPoseView::CountView() const
 }
 
 
+inline BTitleView*
+BPoseView::TitleView() const
+{
+       return fTitleView;
+}
+
+
 inline bool
 BPoseView::StateNeedsSaving()
 {
@@ -1164,6 +1170,13 @@ BPoseView::SetSelectionHandler(BLooper* looper)
 
 
 inline void
+TScrollBar::SetTitleView(BView* view)
+{
+       fTitleView = view;
+}
+
+
+inline void
 BPoseView::SetRefFilter(BRefFilter* filter)
 {
        fRefFilter = filter;
@@ -1179,13 +1192,6 @@ BPoseView::RefFilter() const
 }
 
 
-inline void
-BHScrollBar::SetTitleView(BView* view)
-{
-       fTitleView = view;
-}
-
-
 inline BPose*
 BPoseView::FindPose(const Model* model, int32* index) const
 {
diff --git a/src/kits/tracker/QueryContainerWindow.cpp 
b/src/kits/tracker/QueryContainerWindow.cpp
index ad041ce..1d568ac 100644
--- a/src/kits/tracker/QueryContainerWindow.cpp
+++ b/src/kits/tracker/QueryContainerWindow.cpp
@@ -56,19 +56,17 @@ All rights reserved.
 
 
 BQueryContainerWindow::BQueryContainerWindow(LockingList<BWindow>* windowList,
-       uint32 containerWindowFlags, window_look look, window_feel feel,
-       uint32 flags, uint32 workspace)
+       uint32 containerWindowFlags)
        :
-       BContainerWindow(windowList, containerWindowFlags, look, feel,
-               flags, workspace)
+       BContainerWindow(windowList, containerWindowFlags)
 {
 }
 
 
 BPoseView*
-BQueryContainerWindow::NewPoseView(Model* model, BRect rect, uint32)
+BQueryContainerWindow::NewPoseView(Model* model, uint32)
 {
-       return new BQueryPoseView(model, rect);
+       return new BQueryPoseView(model);
 }
 
 
@@ -82,12 +80,11 @@ BQueryContainerWindow::PoseView() const
 void
 BQueryContainerWindow::CreatePoseView(Model* model)
 {
-       BRect rect(Bounds());
-       rect.right -= B_V_SCROLL_BAR_WIDTH;
-       rect.bottom -= B_H_SCROLL_BAR_HEIGHT;
-       fPoseView = NewPoseView(model, rect, kListMode);
+       fPoseView = NewPoseView(model, kListMode);
 
-       AddChild(fPoseView);
+       fBorderedView->GroupLayout()->AddView(fPoseView);
+       fBorderedView->EnableBorderHighlight(false);
+       fBorderedView->GroupLayout()->SetInsets(0, 0, 1, 1);
 }
 
 
diff --git a/src/kits/tracker/QueryContainerWindow.h 
b/src/kits/tracker/QueryContainerWindow.h
index 4b84626..b263ebf 100644
--- a/src/kits/tracker/QueryContainerWindow.h
+++ b/src/kits/tracker/QueryContainerWindow.h
@@ -51,18 +51,14 @@ class BQueryPoseView;
 class BQueryContainerWindow : public BContainerWindow {
 public:
        BQueryContainerWindow(LockingList<BWindow>* windowList,
-               uint32 containerWindowFlags,
-               window_look look = B_DOCUMENT_WINDOW_LOOK,
-               window_feel feel = B_NORMAL_WINDOW_FEEL,
-               uint32 flags = B_WILL_ACCEPT_FIRST_CLICK | 
B_NO_WORKSPACE_ACTIVATION,
-               uint32 workspace = B_CURRENT_WORKSPACE);
+               uint32 containerWindowFlags);
 
        BQueryPoseView* PoseView() const;
        bool ActiveOnDevice(dev_t) const;
 
 protected:
        virtual void CreatePoseView(Model*);
-       virtual BPoseView* NewPoseView(Model* model, BRect rect, uint32 
viewMode);
+       virtual BPoseView* NewPoseView(Model* model, uint32 viewMode);
        virtual void AddWindowMenu(BMenu* menu);
        virtual void AddWindowContextMenus(BMenu* menu);
 
diff --git a/src/kits/tracker/QueryPoseView.cpp 
b/src/kits/tracker/QueryPoseView.cpp
index 1823e20..cdfdd18 100644
--- a/src/kits/tracker/QueryPoseView.cpp
+++ b/src/kits/tracker/QueryPoseView.cpp
@@ -77,9 +77,9 @@ using std::nothrow;
 //     #pragma mark - BQueryPoseView
 
 
-BQueryPoseView::BQueryPoseView(Model* model, BRect frame, uint32 resizeMask)
+BQueryPoseView::BQueryPoseView(Model* model)
        :
-       BPoseView(model, frame, kListMode, resizeMask),
+       BPoseView(model, kListMode),
        fShowResultsFromTrash(false),
        fQueryList(NULL),
        fQueryListContainer(NULL),
diff --git a/src/kits/tracker/QueryPoseView.h b/src/kits/tracker/QueryPoseView.h
index 48b7989..26524ce 100644
--- a/src/kits/tracker/QueryPoseView.h
+++ b/src/kits/tracker/QueryPoseView.h
@@ -49,7 +49,7 @@ class QueryEntryListCollection;
 
 class BQueryPoseView : public BPoseView {
 public:
-       BQueryPoseView(Model*, BRect, uint32 resizeMask = B_FOLLOW_ALL);
+       BQueryPoseView(Model*);
        virtual ~BQueryPoseView();
 
        virtual void MessageReceived(BMessage* message);
diff --git a/src/kits/tracker/TitleView.cpp b/src/kits/tracker/TitleView.cpp
index 9d2c2e8..9d310dc 100644
--- a/src/kits/tracker/TitleView.cpp
+++ b/src/kits/tracker/TitleView.cpp
@@ -102,9 +102,9 @@ _DrawOutline(BView* view, BRect where)
 //     #pragma mark - BTitleView
 
 
-BTitleView::BTitleView(BRect frame, BPoseView* view)
+BTitleView::BTitleView(BPoseView* view)
        :
-       BView(frame, "TitleView", B_FOLLOW_LEFT_RIGHT, B_WILL_DRAW),
+       BView("BTitleView", B_WILL_DRAW),
        fPoseView(view),
        fTitleList(10, true),
        fHorizontalResizeCursor(B_CURSOR_ID_RESIZE_EAST_WEST),
diff --git a/src/kits/tracker/TitleView.h b/src/kits/tracker/TitleView.h
index 3cd917f..959632e 100644
--- a/src/kits/tracker/TitleView.h
+++ b/src/kits/tracker/TitleView.h
@@ -63,7 +63,7 @@ const int32 kColumnStart = 40;
 
 class BTitleView : public BView {
 public:
-       BTitleView(BRect, BPoseView*);
+       BTitleView(BPoseView*);
        virtual ~BTitleView();
 
        virtual void MouseDown(BPoint where);
diff --git a/src/kits/tracker/Tracker.cpp b/src/kits/tracker/Tracker.cpp
index 287b65b..d98c594 100644
--- a/src/kits/tracker/Tracker.cpp
+++ b/src/kits/tracker/Tracker.cpp
@@ -1059,8 +1059,10 @@ TTracker::OpenContainerWindow(Model* model, BMessage* 
originalRefsList,
                window = new BContainerWindow(&fWindowList, openFlags);
        }
 
-       if (model != NULL)
+       if (model != NULL && window->LockLooper()) {
                window->CreatePoseView(model);
+               window->UnlockLooper();
+       }
 
        BMessage restoreStateMessage(kRestoreState);
 
diff --git a/src/kits/tracker/TrackerIcons.h b/src/kits/tracker/TrackerIcons.h
index 2520d99..d7f4b79 100644
--- a/src/kits/tracker/TrackerIcons.h
+++ b/src/kits/tracker/TrackerIcons.h
@@ -96,15 +96,9 @@ enum {
        R_MoveStatusBitmap = 1039,
        R_CopyStatusBitmap = 1040,
        R_TrashStatusBitmap = 1041,
-       R_ResBackNavActive = 1042,
-       R_ResBackNavInactive = 1043,
-       R_ResForwNavActive = 1044,
-       R_ResForwNavInactive = 1045,
-       R_ResUpNavActive = 1046,
-       R_ResUpNavInactive = 1047,
-       R_ResBackNavActiveSel = 1048,
-       R_ResForwNavActiveSel = 1049,
-       R_ResUpNavActiveSel = 1050,
+       R_ResBackNav = 1042,
+       R_ResForwNav = 1043,
+       R_ResUpNav = 1044,
        R_ShareIcon = 1051,
        R_MICN_ShareIcon = 1051
 };
diff --git a/src/kits/tracker/TrackerIcons.rdef 
b/src/kits/tracker/TrackerIcons.rdef
index a2225c5..092c9cc 100644
--- a/src/kits/tracker/TrackerIcons.rdef
+++ b/src/kits/tracker/TrackerIcons.rdef
@@ -704,6 +704,31 @@ resource(R_BookmarkIcon) #'VICN' array {
        $"000A06010C1001178422040A07010C00"
 };
 
+resource(R_ResBackNav) #'VICN' array {
+       $"6E6369660304006603005900020006020000003C6000C000000000004C000048"
+       $"A0000080FF80FF00B300010A0722353622362C482C483E363E3648030A000100"
+       $"1240A32D00000000000040A32444CEA044D04B01178322040A0101001240A32D"
+       $"00000000000040A32442FA1242FD7201178322040A0201000240A32D00000000"
+       $"000040A32442FA1242FD72"
+};
+
+resource(R_ResForwNav) #'VICN' array {
+       $"6E6369660304006603005900020006020000003C6000C000000000004C000048"
+       $"A0000080FF80FF00B300010A0748353448343E223E222C342C3422030A000100"
+       $"1240A32D00000000000040A32444D19644D04B01178322040A0101001240A32D"
+       $"00000000000040A32442FFFF42FD7201178322040A0201000240A32D00000000"
+       $"000040A32442FFFF42FD72"
+};
+

[ *** diff truncated: 354 lines dropped *** ]



Other related posts: