aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Hartford <adam.s.hartford@gmail.com>2012-06-18 23:35:10 +0000
committerAlex Wilson <yourpalal2@gmail.com>2012-07-09 11:03:35 +1200
commit8522ef247b89a52a01ddde1813911eb63108e7d9 (patch)
tree718e30a7b54baba7bcb3ee63feb841182e824160
parentfd04f5cc265e20901cad75b29ca22b211f13ff8b (diff)
Fixed minor UI issues in Screenshot (Ticket #8378)hrev44297
Signed-off-by: Alex Wilson <yourpalal2@gmail.com>
-rw-r--r--src/apps/screenshot/Jamfile1
-rw-r--r--src/apps/screenshot/PreviewView.cpp30
-rw-r--r--src/apps/screenshot/PreviewView.h21
-rw-r--r--src/apps/screenshot/ScreenshotWindow.cpp8
-rw-r--r--src/apps/screenshot/ScreenshotWindow.h3
5 files changed, 6 insertions, 57 deletions
diff --git a/src/apps/screenshot/Jamfile b/src/apps/screenshot/Jamfile
index 32ccccd9fe..182e475ec2 100644
--- a/src/apps/screenshot/Jamfile
+++ b/src/apps/screenshot/Jamfile
@@ -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
diff --git a/src/apps/screenshot/PreviewView.cpp b/src/apps/screenshot/PreviewView.cpp
deleted file mode 100644
index 8bedac23df..0000000000
--- a/src/apps/screenshot/PreviewView.cpp
+++ /dev/null
@@ -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));
-}
diff --git a/src/apps/screenshot/PreviewView.h b/src/apps/screenshot/PreviewView.h
deleted file mode 100644
index de34d089be..0000000000
--- a/src/apps/screenshot/PreviewView.h
+++ /dev/null
@@ -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 */
diff --git a/src/apps/screenshot/ScreenshotWindow.cpp b/src/apps/screenshot/ScreenshotWindow.cpp
index eea254ffdd..f3bee39381 100644
--- a/src/apps/screenshot/ScreenshotWindow.cpp
+++ b/src/apps/screenshot/ScreenshotWindow.cpp
@@ -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)
diff --git a/src/apps/screenshot/ScreenshotWindow.h b/src/apps/screenshot/ScreenshotWindow.h
index 4b24c1f0c0..036a9b4380 100644
--- a/src/apps/screenshot/ScreenshotWindow.h
+++ b/src/apps/screenshot/ScreenshotWindow.h
@@ -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;