From dee42ee0e96321c4c43908b68897ceac4b988ea5 Mon Sep 17 00:00:00 2001 From: Philippe Houdoin Date: Sat, 22 Feb 2003 23:42:41 +0000 Subject: [PATCH] Very little visual fixes: make these prefs apps's windows panel looking as belevel as original ones (hint: BBox with B_PLAIN_BORDER flag). git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2795 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/prefs/backgrounds/BGView.cpp | 4 ++-- src/prefs/backgrounds/BGView.h | 2 +- src/prefs/menu/MenuWindow.cpp | 15 +++++++-------- src/prefs/virtualmemory/MainWindow.cpp | 2 +- 4 files changed, 11 insertions(+), 12 deletions(-) diff --git a/src/prefs/backgrounds/BGView.cpp b/src/prefs/backgrounds/BGView.cpp index 7255dbf8ee..cddd5ca68b 100644 --- a/src/prefs/backgrounds/BGView.cpp +++ b/src/prefs/backgrounds/BGView.cpp @@ -92,13 +92,13 @@ uint8 hand_cursor_data[68] = }; BGView::BGView(BRect frame, const char *name, int32 resize, int32 flags) - :BView(frame,name,resize,flags), + :BBox(frame, name, resize, flags | B_WILL_DRAW | B_FRAME_EVENTS, B_PLAIN_BORDER), fCurrent(NULL), fCurrentInfo(NULL), fPathList(1, true), fImageList(1, true) { - SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR)); + // SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR)); /* the preview box */ diff --git a/src/prefs/backgrounds/BGView.h b/src/prefs/backgrounds/BGView.h index 6f9f820098..267f31c2e3 100644 --- a/src/prefs/backgrounds/BGView.h +++ b/src/prefs/backgrounds/BGView.h @@ -100,7 +100,7 @@ class PreView : public BControl { }; -class BGView : public BView { +class BGView : public BBox { public: BGView(BRect frame, const char *name, int32 resize, int32 flags); ~BGView(void); diff --git a/src/prefs/menu/MenuWindow.cpp b/src/prefs/menu/MenuWindow.cpp index 9ff073e164..0e0322d10d 100644 --- a/src/prefs/menu/MenuWindow.cpp +++ b/src/prefs/menu/MenuWindow.cpp @@ -13,16 +13,13 @@ revert = false; MoveTo((rect.left += 100),(rect.top += 100)); - BRect r = Bounds(); - r.left -= 1; - r.top -= 1; - menuView = new BBox(r, "menuView", - B_FOLLOW_ALL, B_WILL_DRAW | B_FULL_UPDATE_ON_RESIZE); - menuView->SetViewColor(219,219,219,255); + + menuView = new BBox(Bounds(), "menuView", B_FOLLOW_ALL_SIDES, + B_WILL_DRAW | B_FRAME_EVENTS | B_NAVIGABLE_JUMP, B_PLAIN_BORDER); + AddChild(menuView); + menuBar = new MenuBar(); menuView->AddChild(menuBar); - AddChild(menuView); - menuView->ResizeTo((Frame().right),(Frame().bottom)); defaultButton = new BButton(BRect(10,0,85,20), "Default", "Defaults", new BMessage(MENU_DEFAULT), B_FOLLOW_LEFT | B_FOLLOW_BOTTOM, B_WILL_DRAW | B_NAVIGABLE); revertButton = new BButton(BRect(95,0,175,20), "Revert", "Revert", @@ -32,6 +29,8 @@ menuView->AddChild(defaultButton); menuView->AddChild(revertButton); + menuView->MakeFocus(); + Update(); } diff --git a/src/prefs/virtualmemory/MainWindow.cpp b/src/prefs/virtualmemory/MainWindow.cpp index 2fcc9d28dc..879475f2d4 100644 --- a/src/prefs/virtualmemory/MainWindow.cpp +++ b/src/prefs/virtualmemory/MainWindow.cpp @@ -99,7 +99,7 @@ MainWindow::MainWindow(BRect frame, int physMemVal, int currSwapVal, int minVal, revertButton = new BButton(*(new BRect(95, 138, 170, 158)), "RevertButton", "Revert", new BMessage(REVERT_BUTTON_MSG), B_FOLLOW_ALL, B_WILL_DRAW); revertButton->SetEnabled(false); - topLevelView = new BBox(Bounds(), "TopLevelView", B_FOLLOW_ALL, B_WILL_DRAW, B_NO_BORDER); + topLevelView = new BBox(Bounds(), "TopLevelView", B_FOLLOW_ALL, B_WILL_DRAW, B_PLAIN_BORDER); topLevelView->AddChild(boxView); topLevelView->AddChild(defaultButton); topLevelView->AddChild(revertButton);