Replaced direct background color values with ui_color(B_PANEL_BACKGROUND_COLOR).

Some minor style changes.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5845 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2003-12-31 04:24:46 +00:00
parent 829d826c09
commit 7518dc085b
2 changed files with 22 additions and 12 deletions

View File

@ -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;

View File

@ -8,15 +8,20 @@
#include <Constants.h>
#include <ReplaceWindow.h>
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:";