diff --git a/src/preferences/screensaver/PreviewView.cpp b/src/preferences/screensaver/PreviewView.cpp index 4160cc3212..629f1b16b3 100644 --- a/src/preferences/screensaver/PreviewView.cpp +++ b/src/preferences/screensaver/PreviewView.cpp @@ -9,7 +9,6 @@ #include "PreviewView.h" -#include "Constants.h" #include "Utility.h" #include @@ -63,13 +62,45 @@ PreviewView::~PreviewView() } +void +PreviewView::Draw(BRect update) +{ + SetHighColor(184, 184, 184); + FillRoundRect(scale2(0, 9, 0, 3, Bounds()), 4, 4); + // Outer shape + FillRoundRect(scale2(2, 7, 3, 6, Bounds()), 2, 2); + // control console outline + + SetHighColor(96, 96, 96); + StrokeRoundRect(scale2(2, 7, 3, 6, Bounds()), 2, 2); + // control console outline + StrokeRoundRect(scale2(0, 9, 0, 3, Bounds()), 4, 4); + // Outline outer shape + + SetHighColor(0, 0, 0); + FillRect(scale2(1, 8, 1, 2, Bounds())); + + SetHighColor(184, 184, 184); + BRect outerShape = scale2(2, 7, 2, 6, Bounds()); + outerShape.InsetBy(1, 1); + FillRoundRect(outerShape, 4, 4); + // Outer shape + + SetHighColor(0, 255, 0); + FillRect(scale2(3, 4, 4, 5, Bounds())); + SetHighColor(96, 96, 96); + FillRect(scale2(5, 6, 4, 5, Bounds())); +} + + BView* PreviewView::AddPreview() { BRect rect = scale2(1, 8, 1, 2, Bounds()); - rect.InsetBy(1, 1); - fSaverView = new BView(rect, "preview", B_FOLLOW_NONE, B_WILL_DRAW); + fSaverView = new BView(rect.InsetBySelf(1, 1), "preview", B_FOLLOW_NONE, + B_WILL_DRAW); fSaverView->SetViewColor(0, 0, 0); + fSaverView->SetLowColor(0, 0, 0); AddChild(fSaverView); return fSaverView; @@ -86,34 +117,3 @@ PreviewView::RemovePreview() fSaverView = NULL; return saverView; } - - -void -PreviewView::Draw(BRect update) -{ - SetHighColor(184, 184, 184); - FillRoundRect(scale2(0, 9, 0, 3, Bounds()), 4, 4); - // Outer shape - FillRoundRect(scale2(2, 7, 3, 6, Bounds()), 2, 2); - // control console outline - - SetHighColor(96, 96, 96); - StrokeRoundRect(scale2(2, 7, 3, 6, Bounds()), 2, 2); - // control console outline - StrokeRoundRect(scale2(0, 9, 0, 3, Bounds()), 4, 4); - // Outline outer shape - - SetHighColor(kBlack); - FillRect(scale2(1, 8, 1, 2, Bounds())); - - SetHighColor(184, 184, 184); - BRect outerShape = scale2(2, 7, 2, 6, Bounds()); - outerShape.InsetBy(1, 1); - FillRoundRect(outerShape, 4, 4); - // Outer shape - - SetHighColor(0, 255, 0); - FillRect(scale2(3, 4, 4, 5, Bounds())); - SetHighColor(96, 96, 96); - FillRect(scale2(5, 6, 4, 5, Bounds())); -}