diff --git a/src/apps/stylededit/FindWindow.cpp b/src/apps/stylededit/FindWindow.cpp index 1ed530a1b5..0c9e7790fd 100644 --- a/src/apps/stylededit/FindWindow.cpp +++ b/src/apps/stylededit/FindWindow.cpp @@ -7,13 +7,18 @@ #include "Constants.h" #include "FindWindow.h" + // FindWindow::FindWindow() -FindWindow::FindWindow(BRect frame, BHandler *_handler, BString *searchString, bool *caseState, bool *wrapState, bool *backState) - : BWindow(frame,"FindWindow", B_MODAL_WINDOW, B_NOT_RESIZABLE|B_ASYNCHRONOUS_CONTROLS, B_CURRENT_WORKSPACE) +FindWindow::FindWindow(BRect frame, BHandler *_handler, BString *searchString, + bool *caseState, bool *wrapState, bool *backState) + : BWindow(frame, "FindWindow", B_MODAL_WINDOW, + B_NOT_RESIZABLE | B_ASYNCHRONOUS_CONTROLS, + B_CURRENT_WORKSPACE) { - AddChild(fFindView=new BBox(Bounds(),"FindView",B_FOLLOW_ALL,B_WILL_DRAW,B_PLAIN_BORDER)); - fFindView->SetViewColor(221,222,221); - + fFindView = new BBox(Bounds(), "FindView", B_FOLLOW_ALL, B_WILL_DRAW, B_PLAIN_BORDER); + fFindView->SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR)); + AddChild(fFindView); + font_height height; fFindView->GetFontHeight(&height); float lineHeight = height.ascent+height.descent+height.leading; diff --git a/src/apps/stylededit/ReplaceWindow.cpp b/src/apps/stylededit/ReplaceWindow.cpp index 3a1369f2fb..0541bdd3f5 100644 --- a/src/apps/stylededit/ReplaceWindow.cpp +++ b/src/apps/stylededit/ReplaceWindow.cpp @@ -8,15 +8,20 @@ #include #include -ReplaceWindow::ReplaceWindow(BRect frame, BHandler *_handler, BString *searchString, BString *replaceString, bool *caseState, bool *wrapState, bool *backState) - : BWindow(frame, "ReplaceWindow", B_MODAL_WINDOW, B_NOT_RESIZABLE|B_ASYNCHRONOUS_CONTROLS, B_CURRENT_WORKSPACE) + +ReplaceWindow::ReplaceWindow(BRect frame, BHandler *_handler, BString *searchString, + BString *replaceString, bool *caseState, bool *wrapState, bool *backState) + : BWindow(frame, "ReplaceWindow", B_MODAL_WINDOW, + B_NOT_RESIZABLE | B_ASYNCHRONOUS_CONTROLS, + B_CURRENT_WORKSPACE) { - AddChild(fReplaceView=new BBox(Bounds(),"ReplaceView",B_FOLLOW_ALL,B_WILL_DRAW,B_PLAIN_BORDER)); - fReplaceView->SetViewColor(216,216,216); - - char * findLabel = "Find:"; + fReplaceView = new BBox(Bounds(), "ReplaceView", B_FOLLOW_ALL, B_WILL_DRAW, B_PLAIN_BORDER); + fReplaceView->SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR)); + AddChild(fReplaceView); + + char *findLabel = "Find:"; float findWidth = fReplaceView->StringWidth(findLabel); - fReplaceView->AddChild (fSearchString= new BTextControl(BRect(5,10,290,50), "", findLabel,NULL, NULL, + fReplaceView->AddChild(fSearchString= new BTextControl(BRect(5,10,290,50), "", findLabel,NULL, NULL, B_FOLLOW_LEFT|B_FOLLOW_TOP,B_WILL_DRAW|B_NAVIGABLE)); char * replaceWithLabel = "Replace with:";