Updates by Mark Hogben

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8444 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Phil Greenway 2004-07-21 06:17:50 +00:00
parent de9dab516d
commit a0c20849b5
3 changed files with 15 additions and 9 deletions

View File

@ -19,8 +19,6 @@ CacheView::CacheView(BRect rect, int minVal, int maxVal, int32 printCurrVal, int
: BView(rect, "CacheView", B_FOLLOW_ALL, B_WILL_DRAW)
{
float x;
float y;
BRect viewSize = Bounds();
char sliderMinLabel[10];
char sliderMaxLabel[10];
@ -37,7 +35,7 @@ CacheView::CacheView(BRect rect, int minVal, int maxVal, int32 printCurrVal, int
viewSize.InsetBy(15, 10);
sprintf(msg, "Screen font cache size : %d kB", screenCurrVal);
sprintf(msg, "Screen font cache size : %d kB", static_cast<int>(screenCurrVal));
screenFCS = new BSlider(*(new BRect(viewSize.left, viewSize.top, viewSize.right, viewSize.top + 25.0)),
"screenFontCache",
@ -57,7 +55,7 @@ CacheView::CacheView(BRect rect, int minVal, int maxVal, int32 printCurrVal, int
viewSize.top = viewSize.top + 65.0;
sprintf(msg, "Printing font cache size : %d kB", printCurrVal);
sprintf(msg, "Printing font cache size : %d kB", static_cast<int>(printCurrVal));
printFCS = new BSlider(*(new BRect(viewSize.left, viewSize.top, viewSize.right, viewSize.top + 25.0)),
"printFontCache",

View File

@ -87,9 +87,17 @@ FontSelectionView::FontSelectionView(BRect rect, const char *name, int type)
fontListField->SetDivider(7 * x);
sizeListField = new BMenuField(*(new BRect((27 * x), y, (36 * x), (3 * y))), "fontField", "Size", sizeList);
sizeListField->SetDivider(31 * x);
testText = new BStringView(*(new BRect((8 * x), (5 * y), (35 * x), (8 * y))), "testText", "The quick brown fox jumped over the lazy dog.", B_FOLLOW_ALL, B_WILL_DRAW);
testText->SetFont(&workingFont);
testTextBox = new BBox(*(new BRect((8 * x), (5 * y), (36 * x), (8 * y))), "TestTextBox", B_FOLLOW_ALL, B_WILL_DRAW, B_FANCY_BORDER);
// Place the text slightly inside the entire box area, so it doesn't overlap the box outline.
BRect testTextRect(testTextBox->Bounds());
testTextRect.top = 2;
testTextRect.left = 4;
testTextRect.bottom = testTextRect.bottom - 2;
testTextRect.right = testTextRect.right - 4;
testText = new BStringView(testTextRect, "testText", "The quick brown fox jumped over the lazy dog.", B_FOLLOW_ALL, B_WILL_DRAW);
testText->SetFont(&workingFont);
fontList->SetLabelFromMarked(true);
@ -98,7 +106,7 @@ FontSelectionView::FontSelectionView(BRect rect, const char *name, int type)
SetViewColor(216, 216, 216, 0);
AddChild(testTextBox);
AddChild(testText);
testTextBox->AddChild(testText);
AddChild(sizeListField);
AddChild(fontListField);

View File

@ -48,9 +48,9 @@ MainWindow::MainWindow(BRect frame)
topLevelView = new BBox(Bounds(), "TopLevelView", B_FOLLOW_ALL, B_WILL_DRAW, B_NO_BORDER);
AddChild(buttonView);
AddChild(tabView);
AddChild(topLevelView);
topLevelView->AddChild(buttonView);
topLevelView->AddChild(tabView);
}