From a5360d40c6b11765dce11c50ae8de930c40cf921 Mon Sep 17 00:00:00 2001 From: DarkWyrm Date: Wed, 17 Jan 2007 23:58:06 +0000 Subject: [PATCH] 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 --- src/apps/showimage/ResizerWindow.cpp | 9 ++++----- src/apps/showimage/ShowImageWindow.cpp | 21 ++++++++++----------- 2 files changed, 14 insertions(+), 16 deletions(-) diff --git a/src/apps/showimage/ResizerWindow.cpp b/src/apps/showimage/ResizerWindow.cpp index 8c1f1f7402..c62588e3bf 100644 --- a/src/apps/showimage/ResizerWindow.cpp +++ b/src/apps/showimage/ResizerWindow.cpp @@ -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); diff --git a/src/apps/showimage/ShowImageWindow.cpp b/src/apps/showimage/ShowImageWindow.cpp index f5e82c0dfa..ca22cf6618 100644 --- a/src/apps/showimage/ShowImageWindow.cpp +++ b/src/apps/showimage/ShowImageWindow.cpp @@ -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); }