Apply old patch by AnevilYak, fix BMenuField border drawing
Should have been part of the previous commit, sorry
This commit is contained in:
@@ -6,7 +6,7 @@
|
|||||||
* Mark Hogben
|
* Mark Hogben
|
||||||
* DarkWyrm <[email protected]>
|
* DarkWyrm <[email protected]>
|
||||||
* Axel Dörfler, [email protected]
|
* Axel Dörfler, [email protected]
|
||||||
* Philippe Saint-Pierre, [email protected]
|
* Philippe Saint-Pierre, [email protected]
|
||||||
* Stephan Aßmus <[email protected]>
|
* Stephan Aßmus <[email protected]>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -59,14 +59,14 @@ FontSelectionView::FontSelectionView(const char* name, const char* label,
|
|||||||
fFontsMenu = new BPopUpMenu("font menu");
|
fFontsMenu = new BPopUpMenu("font menu");
|
||||||
|
|
||||||
// font menu
|
// font menu
|
||||||
fFontsMenuField = new BMenuField("fonts", label, fFontsMenu, NULL);
|
fFontsMenuField = new BMenuField("fonts", label, fFontsMenu, B_WILL_DRAW);
|
||||||
fFontsMenuField->SetFont(be_bold_font);
|
fFontsMenuField->SetFont(be_bold_font);
|
||||||
|
|
||||||
// styles menu, if desired
|
// styles menu, if desired
|
||||||
if (separateStyles) {
|
if (separateStyles) {
|
||||||
fStylesMenu = new BPopUpMenu("styles menu");
|
fStylesMenu = new BPopUpMenu("styles menu");
|
||||||
fStylesMenuField = new BMenuField("styles", B_TRANSLATE("Style:"),
|
fStylesMenuField = new BMenuField("styles", B_TRANSLATE("Style:"),
|
||||||
fStylesMenu, NULL);
|
fStylesMenu, B_WILL_DRAW);
|
||||||
} else {
|
} else {
|
||||||
fStylesMenu = NULL;
|
fStylesMenu = NULL;
|
||||||
fStylesMenuField = NULL;
|
fStylesMenuField = NULL;
|
||||||
@@ -74,17 +74,17 @@ FontSelectionView::FontSelectionView(const char* name, const char* label,
|
|||||||
|
|
||||||
// size menu
|
// size menu
|
||||||
fSizesMenuField = new BMenuField("size", B_TRANSLATE("Size:"), fSizesMenu,
|
fSizesMenuField = new BMenuField("size", B_TRANSLATE("Size:"), fSizesMenu,
|
||||||
NULL);
|
B_WILL_DRAW);
|
||||||
fSizesMenuField->SetAlignment(B_ALIGN_RIGHT);
|
fSizesMenuField->SetAlignment(B_ALIGN_RIGHT);
|
||||||
|
|
||||||
// preview
|
// preview
|
||||||
fPreviewText = new BStringView("preview text",
|
fPreviewText = new BStringView("preview text",
|
||||||
B_TRANSLATE_COMMENT("The quick brown fox jumps over the lazy dog.",
|
B_TRANSLATE_COMMENT("The quick brown fox jumps over the lazy dog.",
|
||||||
"Don't translate this literally ! Use a phrase showing all "
|
"Don't translate this literally ! Use a phrase showing all "
|
||||||
"chars from A to Z."));
|
"chars from A to Z."));
|
||||||
|
|
||||||
fPreviewText->SetExplicitMaxSize(BSize(B_SIZE_UNLIMITED,
|
fPreviewText->SetExplicitMaxSize(BSize(B_SIZE_UNLIMITED,
|
||||||
B_SIZE_UNLIMITED));
|
B_SIZE_UNLIMITED));
|
||||||
fPreviewText->SetHighColor(tint_color(ui_color(B_PANEL_BACKGROUND_COLOR),
|
fPreviewText->SetHighColor(tint_color(ui_color(B_PANEL_BACKGROUND_COLOR),
|
||||||
1.65));
|
1.65));
|
||||||
fPreviewText->SetAlignment(B_ALIGN_RIGHT);
|
fPreviewText->SetAlignment(B_ALIGN_RIGHT);
|
||||||
@@ -351,35 +351,35 @@ FontSelectionView::UpdateFontsMenu()
|
|||||||
// #pragma mark - private
|
// #pragma mark - private
|
||||||
|
|
||||||
|
|
||||||
BLayoutItem*
|
BLayoutItem*
|
||||||
FontSelectionView::CreateSizesLabelLayoutItem()
|
FontSelectionView::CreateSizesLabelLayoutItem()
|
||||||
{
|
{
|
||||||
return fSizesMenuField->CreateLabelLayoutItem();
|
return fSizesMenuField->CreateLabelLayoutItem();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
BLayoutItem*
|
BLayoutItem*
|
||||||
FontSelectionView::CreateSizesMenuBarLayoutItem()
|
FontSelectionView::CreateSizesMenuBarLayoutItem()
|
||||||
{
|
{
|
||||||
return fSizesMenuField->CreateMenuBarLayoutItem();
|
return fSizesMenuField->CreateMenuBarLayoutItem();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
BLayoutItem*
|
BLayoutItem*
|
||||||
FontSelectionView::CreateFontsLabelLayoutItem()
|
FontSelectionView::CreateFontsLabelLayoutItem()
|
||||||
{
|
{
|
||||||
return fFontsMenuField->CreateLabelLayoutItem();
|
return fFontsMenuField->CreateLabelLayoutItem();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
BLayoutItem*
|
BLayoutItem*
|
||||||
FontSelectionView::CreateFontsMenuBarLayoutItem()
|
FontSelectionView::CreateFontsMenuBarLayoutItem()
|
||||||
{
|
{
|
||||||
return fFontsMenuField->CreateMenuBarLayoutItem();
|
return fFontsMenuField->CreateMenuBarLayoutItem();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
BLayoutItem*
|
BLayoutItem*
|
||||||
FontSelectionView::CreateStylesLabelLayoutItem()
|
FontSelectionView::CreateStylesLabelLayoutItem()
|
||||||
{
|
{
|
||||||
if (fStylesMenuField)
|
if (fStylesMenuField)
|
||||||
@@ -388,7 +388,7 @@ FontSelectionView::CreateStylesLabelLayoutItem()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
BLayoutItem*
|
BLayoutItem*
|
||||||
FontSelectionView::CreateStylesMenuBarLayoutItem()
|
FontSelectionView::CreateStylesMenuBarLayoutItem()
|
||||||
{
|
{
|
||||||
if (fStylesMenuField)
|
if (fStylesMenuField)
|
||||||
@@ -484,7 +484,7 @@ FontSelectionView::_BuildSizesMenu()
|
|||||||
|
|
||||||
BMessage* message = new BMessage(kMsgSetSize);
|
BMessage* message = new BMessage(kMsgSetSize);
|
||||||
message->AddInt32("size", size);
|
message->AddInt32("size", size);
|
||||||
message->AddString("name", Name());
|
message->AddString("name", Name());
|
||||||
|
|
||||||
BMenuItem* item = new BMenuItem(label, message);
|
BMenuItem* item = new BMenuItem(label, message);
|
||||||
if (size == fCurrentFont.Size())
|
if (size == fCurrentFont.Size())
|
||||||
|
|||||||
Reference in New Issue
Block a user