Magnify: fix layout with big font sizes
* Move the menu to the left side so it doesn't overlap the status. * Fixes #6934.
This commit is contained in:
@@ -134,7 +134,8 @@ BuildInfoMenu(BMenu *menu)
|
||||
menuItem = new BMenuItem(B_TRANSLATE("Save image"),
|
||||
new BMessage(msg_save), 'S');
|
||||
menu->AddItem(menuItem);
|
||||
// menuItem = new BMenuItem(B_TRANSLATE("Save selection"), new BMessage(msg_save),'S');
|
||||
// menuItem = new BMenuItem(B_TRANSLATE("Save selection"),
|
||||
// new BMessage(msg_save), 'S');
|
||||
// menu->AddItem(menuItem);
|
||||
menuItem = new BMenuItem(B_TRANSLATE("Copy image"),
|
||||
new BMessage(msg_copy_image), 'C');
|
||||
@@ -827,7 +828,7 @@ TInfoView::Draw(BRect updateRect)
|
||||
dynamic_cast<TWindow*>(Window())->PixelCount(&hPixelCount, &vPixelCount);
|
||||
int32 pixelSize = dynamic_cast<TWindow*>(Window())->PixelSize();
|
||||
|
||||
MovePenTo(10, fFontHeight + 5);
|
||||
MovePenTo(15 + fPopUp->Bounds().Width(), fFontHeight + 5);
|
||||
|
||||
static BMessageFormat format(B_TRANSLATE("%width x %height @ {0, plural, "
|
||||
"one{# pixel/pixel} other{# pixels/pixel}}"));
|
||||
@@ -857,7 +858,7 @@ TInfoView::Draw(BRect updateRect)
|
||||
snprintf(str, sizeof(str), "R: %i G: %i B: %i (#%02x%02x%02x)",
|
||||
color.red, color.green, color.blue, color.red, color.green, color.blue);
|
||||
|
||||
MovePenTo(10, fFontHeight*2+5);
|
||||
MovePenTo(15 + fPopUp->Bounds().Width(), fFontHeight*2+5);
|
||||
invalRect.Set(10, fFontHeight+7, 10 + StringWidth(fRGBStr), fFontHeight*2+7);
|
||||
SetHighColor(ViewColor());
|
||||
FillRect(invalRect);
|
||||
@@ -928,9 +929,9 @@ TInfoView::AddMenu()
|
||||
fMenu = new TMenu(dynamic_cast<TWindow*>(Window()), "");
|
||||
BuildInfoMenu(fMenu);
|
||||
|
||||
BRect r(Bounds().Width()-27, 11, Bounds().Width()-11, 27);
|
||||
BRect r(9, 11, 22, 27);
|
||||
fPopUp = new BMenuField( r, "region menu", NULL, fMenu, true,
|
||||
B_FOLLOW_RIGHT | B_FOLLOW_TOP);
|
||||
B_FOLLOW_LEFT | B_FOLLOW_TOP);
|
||||
AddChild(fPopUp);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user