From 6ea6652d1388507099e3615103523b2147e0cd84 Mon Sep 17 00:00:00 2001
From: Adam Hartford <adam.s.hartford@gmail.com>
Date: Mon, 18 Jun 2012 23:35:10 +0000
Subject: [PATCH 1/2] Fixed minor UI issues (Ticket #8378)
---
src/apps/screenshot/PreviewView.cpp | 30 ------------------------------
src/apps/screenshot/PreviewView.h | 21 ---------------------
src/apps/screenshot/ScreenshotWindow.cpp | 8 +++++---
src/apps/screenshot/ScreenshotWindow.h | 3 +--
4 files changed, 6 insertions(+), 56 deletions(-)
delete mode 100644 src/apps/screenshot/PreviewView.cpp
delete mode 100644 src/apps/screenshot/PreviewView.h
diff --git a/src/apps/screenshot/PreviewView.cpp b/src/apps/screenshot/PreviewView.cpp
deleted file mode 100644
index 8bedac2..0000000
+
|
-
|
|
1 | | /* |
2 | | * Copyright 2009, Philippe Saint-Pierre, stpere@gmail.com |
3 | | * Distributed under the terms of the MIT License. |
4 | | */ |
5 | | |
6 | | #include "PreviewView.h" |
7 | | |
8 | | |
9 | | #include <ControlLook.h> |
10 | | |
11 | | |
12 | | PreviewView::PreviewView() |
13 | | : |
14 | | BView("preview", B_WILL_DRAW | B_FULL_UPDATE_ON_RESIZE) |
15 | | { |
16 | | } |
17 | | |
18 | | |
19 | | PreviewView::~PreviewView() |
20 | | { |
21 | | } |
22 | | |
23 | | |
24 | | void |
25 | | PreviewView::Draw(BRect updateRect) |
26 | | { |
27 | | BRect rect = Frame(); |
28 | | be_control_look->DrawTextControlBorder(this, rect, rect, |
29 | | ui_color(B_PANEL_BACKGROUND_COLOR)); |
30 | | } |
diff --git a/src/apps/screenshot/PreviewView.h b/src/apps/screenshot/PreviewView.h
deleted file mode 100644
index de34d08..0000000
+
|
-
|
|
1 | | /* |
2 | | * Copyright 2009, Philippe Saint-Pierre, stpere@gmail.com |
3 | | * Distributed under the terms of the MIT License. |
4 | | */ |
5 | | #ifndef PREVIEW_VIEW_H |
6 | | #define PREVIEW_VIEW_H |
7 | | |
8 | | |
9 | | #include <View.h> |
10 | | |
11 | | |
12 | | class PreviewView : public BView { |
13 | | public: |
14 | | PreviewView(); |
15 | | ~PreviewView(); |
16 | | |
17 | | protected: |
18 | | virtual void Draw(BRect updateRect); |
19 | | }; |
20 | | |
21 | | #endif /* PREVIEW_VIEW_H */ |
diff --git a/src/apps/screenshot/ScreenshotWindow.cpp b/src/apps/screenshot/ScreenshotWindow.cpp
index eea254f..f3bee39 100644
a
|
b
|
|
41 | 41 | #include <TranslationUtils.h> |
42 | 42 | #include <TranslatorRoster.h> |
43 | 43 | |
44 | | #include "PreviewView.h" |
45 | 44 | #include "Utility.h" |
46 | 45 | |
47 | 46 | |
… |
… |
ScreenshotWindow::ScreenshotWindow(const Utility& utility, bool silent,
|
174 | 173 | |
175 | 174 | BMenuField* menuLocation = new BMenuField(B_TRANSLATE("Save in:"), |
176 | 175 | fOutputPathMenu); |
| 176 | menuLocation->SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR)); |
177 | 177 | |
178 | 178 | fTranslatorMenu = new BMenu(B_TRANSLATE("Please select")); |
179 | 179 | _SetupTranslatorMenu(); |
180 | 180 | BMenuField* menuFormat = new BMenuField(B_TRANSLATE("Save as:"), |
181 | 181 | fTranslatorMenu); |
| 182 | menuFormat->SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR)); |
182 | 183 | |
183 | 184 | BButton* showSettings = new BButton("", B_TRANSLATE("Settings"B_UTF8_ELLIPSIS), |
184 | 185 | new BMessage(kSettings)); |
… |
… |
ScreenshotWindow::ScreenshotWindow(const Utility& utility, bool silent,
|
193 | 194 | const float kSpacing = be_control_look->DefaultItemSpacing(); |
194 | 195 | const float kLabelSpacing = be_control_look->DefaultLabelSpacing(); |
195 | 196 | |
196 | | fPreview = new PreviewView(); |
| 197 | fPreview = new BView("preview", B_WILL_DRAW | B_FULL_UPDATE_ON_RESIZE); |
| 198 | BBox *previewBox = new BBox(B_FANCY_BORDER, fPreview); |
197 | 199 | |
198 | 200 | BLayoutBuilder::Group<>(this, B_VERTICAL, 0) |
199 | 201 | .SetInsets(kSpacing) |
200 | 202 | .AddGroup(B_HORIZONTAL, kSpacing) |
201 | | .Add(fPreview) |
| 203 | .Add(previewBox) |
202 | 204 | .AddGroup(B_VERTICAL, 0) |
203 | 205 | .Add(fActiveWindow) |
204 | 206 | .Add(fWindowBorder) |
diff --git a/src/apps/screenshot/ScreenshotWindow.h b/src/apps/screenshot/ScreenshotWindow.h
index 4b24c1f..036a9b4 100644
a
|
b
|
class BPath;
|
26 | 26 | class BTextControl; |
27 | 27 | class BTextView; |
28 | 28 | |
29 | | class PreviewView; |
30 | 29 | class Utility; |
31 | 30 | |
32 | 31 | |
… |
… |
private:
|
58 | 57 | |
59 | 58 | const Utility& fUtility; |
60 | 59 | |
61 | | PreviewView* fPreview; |
| 60 | BView* fPreview; |
62 | 61 | BCheckBox* fActiveWindow; |
63 | 62 | BTextControl* fDelayControl; |
64 | 63 | BCheckBox* fWindowBorder; |
--
1.7.7.2
From 33e95e1faf7ad05abf37448e989cf2a3b007e306 Mon Sep 17 00:00:00 2001
From: Adam Hartford <adam.s.hartford@gmail.com>
Date: Mon, 18 Jun 2012 23:43:22 +0000
Subject: [PATCH 2/2] Removed unused PreviewView.cpp
---
src/apps/screenshot/Jamfile | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/src/apps/screenshot/Jamfile b/src/apps/screenshot/Jamfile
index 32ccccd..182e475 100644
a
|
b
|
UsePrivateHeaders interface ;
|
7 | 7 | Application Screenshot : |
8 | 8 | ScreenshotApp.cpp |
9 | 9 | ScreenshotWindow.cpp |
10 | | PreviewView.cpp |
11 | 10 | Utility.cpp |
12 | 11 | : be $(HAIKU_LOCALE_LIBS) tracker translation $(TARGET_LIBSUPC++) |
13 | 12 | : ScreenshotApp.rdef |