Usability fixes:

Moved Dither Image to the View menu (where it really belongs)
Made some menu item labels less technical
A couple of capitalization fixes
Fixed layout problems in the Resize window


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19852 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
DarkWyrm 2007-01-17 23:58:06 +00:00
parent 7b1b33ed8c
commit a5360d40c6
2 changed files with 14 additions and 16 deletions

View File

@ -43,7 +43,7 @@
static const char* kWidthLabel = "Width:";
static const char* kHeightLabel = "Height:";
static const char* kKeepAspectRatioLabel = "Keep Aspect Ratio";
static const char* kKeepAspectRatioLabel = "Keep Proportions";
static const char* kApplyLabel = "Apply";
static const float kLineDistance = 5;
@ -56,7 +56,8 @@ ResizerWindow::ResizerWindow(BMessenger target, int32 width, int32 height)
, fOriginalHeight(height)
, fTarget(target)
{
BView* back_view = new BBox(Bounds(), "", B_FOLLOW_ALL);
BView* back_view = new BView(Bounds(), "", B_FOLLOW_ALL, B_WILL_DRAW);
back_view->SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
AddChild(back_view);
const float widthLabelWidth = back_view->StringWidth(kWidthLabel);
@ -64,7 +65,7 @@ ResizerWindow::ResizerWindow(BMessenger target, int32 width, int32 height)
const float column2 = max_c(widthLabelWidth, heightLabelWidth);
const float textControlWidth = column2 + back_view->StringWidth("999999");
const float keepAspectRatioLabelWidth = back_view->StringWidth(kKeepAspectRatioLabel);
const float keepAspectRatioLabelWidth = 15 + back_view->StringWidth(kKeepAspectRatioLabel);
const float width2 = 2 * kHorizontalIndent + max_c(textControlWidth, keepAspectRatioLabelWidth);
ResizeTo(width2+1, Bounds().Height()+1);
@ -89,8 +90,6 @@ ResizerWindow::ResizerWindow(BMessenger target, int32 width, int32 height)
fAspectRatio->SetValue(B_CONTROL_ON);
AddControl(back_view, fAspectRatio, column2, rect);
AddSeparatorLine(back_view, rect);
fApply = new BButton(rect, "apply", kApplyLabel, new BMessage(kApplyMsg));
fApply->MakeDefault(true);
AddControl(back_view, fApply, column2, rect);

View File

@ -245,7 +245,8 @@ ShowImageWindow::BuildViewMenu(BMenu *menu, bool popupMenu)
menu->AddSeparatorItem();
AddItemMenu(menu, "Scale Bilinear", MSG_SCALE_BILINEAR, 0, 0, 'W', true);
AddItemMenu(menu, "High-Quality Zooming", MSG_SCALE_BILINEAR, 0, 0, 'W', true);
AddItemMenu(menu, "Stippled Zooming", MSG_DITHER_IMAGE, 0, 0, 'W', true);
menu->AddSeparatorItem();
@ -326,7 +327,7 @@ ShowImageWindow::AddMenus(BMenuBar *bar)
AddItemMenu(menu, "Last Page", MSG_PAGE_LAST, B_RIGHT_ARROW, B_SHIFT_KEY, 'W', true);
AddItemMenu(menu, "Previous Page", MSG_PAGE_PREV, B_LEFT_ARROW, 0, 'W', true);
AddItemMenu(menu, "Next Page", MSG_PAGE_NEXT, B_RIGHT_ARROW, 0, 'W', true);
fGoToPageMenu = new BMenu("Go To Page");
fGoToPageMenu = new BMenu("Go to Page");
fGoToPageMenu->SetRadioMode(true);
menu->AddItem(fGoToPageMenu);
menu->AddSeparatorItem();
@ -335,20 +336,18 @@ ShowImageWindow::AddMenus(BMenuBar *bar)
bar->AddItem(menu);
menu = new BMenu("Image");
AddItemMenu(menu, "Dither Image", MSG_DITHER_IMAGE, 0, 0, 'W', true);
AddItemMenu(menu, "Rotate Counterclockwise", MSG_ROTATE_270, '[', 0, 'W', true);
AddItemMenu(menu, "Rotate Clockwise", MSG_ROTATE_90, ']', 0, 'W', true);
menu->AddSeparatorItem();
AddItemMenu(menu, "Rotate -90°", MSG_ROTATE_270, '[', 0, 'W', true);
AddItemMenu(menu, "Rotate +90°", MSG_ROTATE_90, ']', 0, 'W', true);
AddItemMenu(menu, "Flip Left to Right", MSG_FLIP_LEFT_TO_RIGHT, 0, 0, 'W', true);
AddItemMenu(menu, "Flip Top to Bottom", MSG_FLIP_TOP_TO_BOTTOM, 0, 0, 'W', true);
menu->AddSeparatorItem();
AddItemMenu(menu, "Flip Left To Right", MSG_FLIP_LEFT_TO_RIGHT, 0, 0, 'W', true);
AddItemMenu(menu, "Flip Top To Bottom", MSG_FLIP_TOP_TO_BOTTOM, 0, 0, 'W', true);
AddItemMenu(menu, "Invert Colors", MSG_INVERT, 0, 0, 'W', true);
menu->AddSeparatorItem();
AddItemMenu(menu, "Invert", MSG_INVERT, 0, 0, 'W', true);
menu->AddSeparatorItem();
AddItemMenu(menu, "Resize " B_UTF8_ELLIPSIS, MSG_OPEN_RESIZER_WINDOW, 0, 0, 'W', true);
AddItemMenu(menu, "Resize" B_UTF8_ELLIPSIS, MSG_OPEN_RESIZER_WINDOW, 0, 0, 'W', true);
bar->AddItem(menu);
menu->AddSeparatorItem();
AddItemMenu(menu, "As Desktop Background", MSG_DESKTOP_BACKGROUND, 0, 0, 'W', true);
AddItemMenu(menu, "Use as Desktop Background", MSG_DESKTOP_BACKGROUND, 0, 0, 'W', true);
}