Fixed minor UI issues in Screenshot (Ticket #8378)
Signed-off-by: Alex Wilson <[email protected]>
This commit is contained in:
committed by
Alex Wilson
parent
fd04f5cc26
commit
8522ef247b
@@ -7,7 +7,6 @@ UsePrivateHeaders interface ;
|
|||||||
Application Screenshot :
|
Application Screenshot :
|
||||||
ScreenshotApp.cpp
|
ScreenshotApp.cpp
|
||||||
ScreenshotWindow.cpp
|
ScreenshotWindow.cpp
|
||||||
PreviewView.cpp
|
|
||||||
Utility.cpp
|
Utility.cpp
|
||||||
: be $(HAIKU_LOCALE_LIBS) tracker translation $(TARGET_LIBSUPC++)
|
: be $(HAIKU_LOCALE_LIBS) tracker translation $(TARGET_LIBSUPC++)
|
||||||
: ScreenshotApp.rdef
|
: ScreenshotApp.rdef
|
||||||
|
|||||||
@@ -1,30 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright 2009, Philippe Saint-Pierre, [email protected]
|
|
||||||
* 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));
|
|
||||||
}
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright 2009, Philippe Saint-Pierre, [email protected]
|
|
||||||
* 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 */
|
|
||||||
@@ -41,7 +41,6 @@
|
|||||||
#include <TranslationUtils.h>
|
#include <TranslationUtils.h>
|
||||||
#include <TranslatorRoster.h>
|
#include <TranslatorRoster.h>
|
||||||
|
|
||||||
#include "PreviewView.h"
|
|
||||||
#include "Utility.h"
|
#include "Utility.h"
|
||||||
|
|
||||||
|
|
||||||
@@ -174,11 +173,13 @@ ScreenshotWindow::ScreenshotWindow(const Utility& utility, bool silent,
|
|||||||
|
|
||||||
BMenuField* menuLocation = new BMenuField(B_TRANSLATE("Save in:"),
|
BMenuField* menuLocation = new BMenuField(B_TRANSLATE("Save in:"),
|
||||||
fOutputPathMenu);
|
fOutputPathMenu);
|
||||||
|
menuLocation->SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
|
||||||
|
|
||||||
fTranslatorMenu = new BMenu(B_TRANSLATE("Please select"));
|
fTranslatorMenu = new BMenu(B_TRANSLATE("Please select"));
|
||||||
_SetupTranslatorMenu();
|
_SetupTranslatorMenu();
|
||||||
BMenuField* menuFormat = new BMenuField(B_TRANSLATE("Save as:"),
|
BMenuField* menuFormat = new BMenuField(B_TRANSLATE("Save as:"),
|
||||||
fTranslatorMenu);
|
fTranslatorMenu);
|
||||||
|
menuFormat->SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
|
||||||
|
|
||||||
BButton* showSettings = new BButton("", B_TRANSLATE("Settings"B_UTF8_ELLIPSIS),
|
BButton* showSettings = new BButton("", B_TRANSLATE("Settings"B_UTF8_ELLIPSIS),
|
||||||
new BMessage(kSettings));
|
new BMessage(kSettings));
|
||||||
@@ -193,12 +194,13 @@ ScreenshotWindow::ScreenshotWindow(const Utility& utility, bool silent,
|
|||||||
const float kSpacing = be_control_look->DefaultItemSpacing();
|
const float kSpacing = be_control_look->DefaultItemSpacing();
|
||||||
const float kLabelSpacing = be_control_look->DefaultLabelSpacing();
|
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)
|
BLayoutBuilder::Group<>(this, B_VERTICAL, 0)
|
||||||
.SetInsets(kSpacing)
|
.SetInsets(kSpacing)
|
||||||
.AddGroup(B_HORIZONTAL, kSpacing)
|
.AddGroup(B_HORIZONTAL, kSpacing)
|
||||||
.Add(fPreview)
|
.Add(previewBox)
|
||||||
.AddGroup(B_VERTICAL, 0)
|
.AddGroup(B_VERTICAL, 0)
|
||||||
.Add(fActiveWindow)
|
.Add(fActiveWindow)
|
||||||
.Add(fWindowBorder)
|
.Add(fWindowBorder)
|
||||||
|
|||||||
@@ -26,7 +26,6 @@ class BPath;
|
|||||||
class BTextControl;
|
class BTextControl;
|
||||||
class BTextView;
|
class BTextView;
|
||||||
|
|
||||||
class PreviewView;
|
|
||||||
class Utility;
|
class Utility;
|
||||||
|
|
||||||
|
|
||||||
@@ -58,7 +57,7 @@ private:
|
|||||||
|
|
||||||
const Utility& fUtility;
|
const Utility& fUtility;
|
||||||
|
|
||||||
PreviewView* fPreview;
|
BView* fPreview;
|
||||||
BCheckBox* fActiveWindow;
|
BCheckBox* fActiveWindow;
|
||||||
BTextControl* fDelayControl;
|
BTextControl* fDelayControl;
|
||||||
BCheckBox* fWindowBorder;
|
BCheckBox* fWindowBorder;
|
||||||
|
|||||||
Reference in New Issue
Block a user