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:
@@ -19,8 +19,6 @@ CacheView::CacheView(BRect rect, int minVal, int maxVal, int32 printCurrVal, int
|
|||||||
: BView(rect, "CacheView", B_FOLLOW_ALL, B_WILL_DRAW)
|
: BView(rect, "CacheView", B_FOLLOW_ALL, B_WILL_DRAW)
|
||||||
{
|
{
|
||||||
|
|
||||||
float x;
|
|
||||||
float y;
|
|
||||||
BRect viewSize = Bounds();
|
BRect viewSize = Bounds();
|
||||||
char sliderMinLabel[10];
|
char sliderMinLabel[10];
|
||||||
char sliderMaxLabel[10];
|
char sliderMaxLabel[10];
|
||||||
@@ -37,7 +35,7 @@ CacheView::CacheView(BRect rect, int minVal, int maxVal, int32 printCurrVal, int
|
|||||||
|
|
||||||
viewSize.InsetBy(15, 10);
|
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)),
|
screenFCS = new BSlider(*(new BRect(viewSize.left, viewSize.top, viewSize.right, viewSize.top + 25.0)),
|
||||||
"screenFontCache",
|
"screenFontCache",
|
||||||
@@ -57,7 +55,7 @@ CacheView::CacheView(BRect rect, int minVal, int maxVal, int32 printCurrVal, int
|
|||||||
|
|
||||||
viewSize.top = viewSize.top + 65.0;
|
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)),
|
printFCS = new BSlider(*(new BRect(viewSize.left, viewSize.top, viewSize.right, viewSize.top + 25.0)),
|
||||||
"printFontCache",
|
"printFontCache",
|
||||||
|
|||||||
@@ -87,10 +87,18 @@ FontSelectionView::FontSelectionView(BRect rect, const char *name, int type)
|
|||||||
fontListField->SetDivider(7 * x);
|
fontListField->SetDivider(7 * x);
|
||||||
sizeListField = new BMenuField(*(new BRect((27 * x), y, (36 * x), (3 * y))), "fontField", "Size", sizeList);
|
sizeListField = new BMenuField(*(new BRect((27 * x), y, (36 * x), (3 * y))), "fontField", "Size", sizeList);
|
||||||
sizeListField->SetDivider(31 * x);
|
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);
|
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);
|
fontList->SetLabelFromMarked(true);
|
||||||
|
|
||||||
buildMenus();
|
buildMenus();
|
||||||
@@ -98,7 +106,7 @@ FontSelectionView::FontSelectionView(BRect rect, const char *name, int type)
|
|||||||
SetViewColor(216, 216, 216, 0);
|
SetViewColor(216, 216, 216, 0);
|
||||||
|
|
||||||
AddChild(testTextBox);
|
AddChild(testTextBox);
|
||||||
AddChild(testText);
|
testTextBox->AddChild(testText);
|
||||||
AddChild(sizeListField);
|
AddChild(sizeListField);
|
||||||
AddChild(fontListField);
|
AddChild(fontListField);
|
||||||
|
|
||||||
|
|||||||
@@ -48,9 +48,9 @@ MainWindow::MainWindow(BRect frame)
|
|||||||
|
|
||||||
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_NO_BORDER);
|
||||||
|
|
||||||
AddChild(buttonView);
|
|
||||||
AddChild(tabView);
|
|
||||||
AddChild(topLevelView);
|
AddChild(topLevelView);
|
||||||
|
topLevelView->AddChild(buttonView);
|
||||||
|
topLevelView->AddChild(tabView);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user