Removed "Stippled Zooming" item and made dithering automatic in 8-bit screen mode
"Keep Proportions" in resizing window became "Keep Original Proportions", which was suggested by korli and is the best suggestion IMO Bilinear scaling is on by default I like ShowImage's menus now. :^) git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19877 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
211a7c8308
commit
a9ab9d2c21
@ -43,7 +43,7 @@
|
||||
|
||||
static const char* kWidthLabel = "Width:";
|
||||
static const char* kHeightLabel = "Height:";
|
||||
static const char* kKeepAspectRatioLabel = "Keep Proportions";
|
||||
static const char* kKeepAspectRatioLabel = "Keep Original Proportions";
|
||||
static const char* kApplyLabel = "Apply";
|
||||
|
||||
static const float kLineDistance = 5;
|
||||
@ -65,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 = 15 + back_view->StringWidth(kKeepAspectRatioLabel);
|
||||
const float keepAspectRatioLabelWidth = 20 + back_view->StringWidth(kKeepAspectRatioLabel);
|
||||
const float width2 = 2 * kHorizontalIndent + max_c(textControlWidth, keepAspectRatioLabelWidth);
|
||||
|
||||
ResizeTo(width2+1, Bounds().Height()+1);
|
||||
|
@ -181,7 +181,7 @@ ShowImageView::ShowImageView(BRect rect, const char *name, uint32 resizingMode,
|
||||
settings = my_app->Settings();
|
||||
|
||||
InitPatterns();
|
||||
fDither = false;
|
||||
fDither = BScreen().ColorSpace() == B_CMAP8;
|
||||
fBitmap = NULL;
|
||||
fDisplayBitmap = NULL;
|
||||
fSelBitmap = NULL;
|
||||
@ -197,7 +197,7 @@ ShowImageView::ShowImageView(BRect rect, const char *name, uint32 resizingMode,
|
||||
fShowCaption = false;
|
||||
fZoom = 1.0;
|
||||
fMovesImage = false;
|
||||
fScaleBilinear = false;
|
||||
fScaleBilinear = true;
|
||||
fScaler = NULL;
|
||||
#if DELAYED_SCALING
|
||||
fScalingCountDown = SCALING_DELAY_TIME;
|
||||
|
@ -246,7 +246,6 @@ ShowImageWindow::BuildViewMenu(BMenu *menu, bool popupMenu)
|
||||
menu->AddSeparatorItem();
|
||||
|
||||
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();
|
||||
|
||||
@ -1197,4 +1196,9 @@ ShowImageWindow::QuitRequested()
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
ShowImageWindow::ScreenChanged(BRect frame, color_space mode)
|
||||
{
|
||||
fImageView->SetDither(mode == B_CMAP8);
|
||||
}
|
||||
|
||||
|
@ -43,6 +43,7 @@ class ShowImageWindow : public BWindow {
|
||||
virtual void FrameResized(float width, float height);
|
||||
virtual void MessageReceived(BMessage *message);
|
||||
virtual bool QuitRequested();
|
||||
virtual void ScreenChanged(BRect frame, color_space mode);
|
||||
// virtual void Zoom(BPoint origin, float width, float height);
|
||||
|
||||
status_t InitCheck();
|
||||
|
Loading…
x
Reference in New Issue
Block a user