Fixed minor UI issues in Screenshot (Ticket #8378)

Signed-off-by: Alex Wilson <yourpalal2@gmail.com>
This commit is contained in:
Adam Hartford 2012-06-18 23:35:10 +00:00 committed by Alex Wilson
parent fd04f5cc26
commit 8522ef247b
5 changed files with 6 additions and 57 deletions

View File

@ -7,7 +7,6 @@ UsePrivateHeaders interface ;
Application Screenshot :
ScreenshotApp.cpp
ScreenshotWindow.cpp
PreviewView.cpp
Utility.cpp
: be $(HAIKU_LOCALE_LIBS) tracker translation $(TARGET_LIBSUPC++)
: ScreenshotApp.rdef

View File

@ -1,30 +0,0 @@
/*
* Copyright 2009, Philippe Saint-Pierre, stpere@gmail.com
* Distributed under the terms of the MIT License.
*/
#include "PreviewView.h"
#include <ControlLook.h>
PreviewView::PreviewView()
:
BView("preview", B_WILL_DRAW | B_FULL_UPDATE_ON_RESIZE)
{
}
PreviewView::~PreviewView()
{
}
void
PreviewView::Draw(BRect updateRect)
{
BRect rect = Frame();
be_control_look->DrawTextControlBorder(this, rect, rect,
ui_color(B_PANEL_BACKGROUND_COLOR));
}

View File

@ -1,21 +0,0 @@
/*
* Copyright 2009, Philippe Saint-Pierre, stpere@gmail.com
* Distributed under the terms of the MIT License.
*/
#ifndef PREVIEW_VIEW_H
#define PREVIEW_VIEW_H
#include <View.h>
class PreviewView : public BView {
public:
PreviewView();
~PreviewView();
protected:
virtual void Draw(BRect updateRect);
};
#endif /* PREVIEW_VIEW_H */

View File

@ -41,7 +41,6 @@
#include <TranslationUtils.h>
#include <TranslatorRoster.h>
#include "PreviewView.h"
#include "Utility.h"
@ -174,11 +173,13 @@ ScreenshotWindow::ScreenshotWindow(const Utility& utility, bool silent,
BMenuField* menuLocation = new BMenuField(B_TRANSLATE("Save in:"),
fOutputPathMenu);
menuLocation->SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
fTranslatorMenu = new BMenu(B_TRANSLATE("Please select"));
_SetupTranslatorMenu();
BMenuField* menuFormat = new BMenuField(B_TRANSLATE("Save as:"),
fTranslatorMenu);
menuFormat->SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
BButton* showSettings = new BButton("", B_TRANSLATE("Settings"B_UTF8_ELLIPSIS),
new BMessage(kSettings));
@ -193,12 +194,13 @@ ScreenshotWindow::ScreenshotWindow(const Utility& utility, bool silent,
const float kSpacing = be_control_look->DefaultItemSpacing();
const float kLabelSpacing = be_control_look->DefaultLabelSpacing();
fPreview = new PreviewView();
fPreview = new BView("preview", B_WILL_DRAW | B_FULL_UPDATE_ON_RESIZE);
BBox *previewBox = new BBox(B_FANCY_BORDER, fPreview);
BLayoutBuilder::Group<>(this, B_VERTICAL, 0)
.SetInsets(kSpacing)
.AddGroup(B_HORIZONTAL, kSpacing)
.Add(fPreview)
.Add(previewBox)
.AddGroup(B_VERTICAL, 0)
.Add(fActiveWindow)
.Add(fWindowBorder)

View File

@ -26,7 +26,6 @@ class BPath;
class BTextControl;
class BTextView;
class PreviewView;
class Utility;
@ -58,7 +57,7 @@ private:
const Utility& fUtility;
PreviewView* fPreview;
BView* fPreview;
BCheckBox* fActiveWindow;
BTextControl* fDelayControl;
BCheckBox* fWindowBorder;