Ticket #8378: ticket_8378.patch

File ticket_8378.patch, 4.7 KB (added by ahartford, 12 years ago)

Patch to fix GUI issues

  • deleted file src/apps/screenshot/PreviewView.cpp

    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 }
  • deleted file src/apps/screenshot/PreviewView.h

    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 */
  • src/apps/screenshot/ScreenshotWindow.cpp

    diff --git a/src/apps/screenshot/ScreenshotWindow.cpp b/src/apps/screenshot/ScreenshotWindow.cpp
    index eea254f..f3bee39 100644
    a b  
    4141#include <TranslationUtils.h>
    4242#include <TranslatorRoster.h>
    4343
    44 #include "PreviewView.h"
    4544#include "Utility.h"
    4645
    4746
    ScreenshotWindow::ScreenshotWindow(const Utility& utility, bool silent,  
    174173
    175174    BMenuField* menuLocation = new BMenuField(B_TRANSLATE("Save in:"),
    176175        fOutputPathMenu);
     176    menuLocation->SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
    177177
    178178    fTranslatorMenu = new BMenu(B_TRANSLATE("Please select"));
    179179    _SetupTranslatorMenu();
    180180    BMenuField* menuFormat = new BMenuField(B_TRANSLATE("Save as:"),
    181181        fTranslatorMenu);
     182    menuFormat->SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
    182183
    183184    BButton* showSettings =  new BButton("", B_TRANSLATE("Settings"B_UTF8_ELLIPSIS),
    184185            new BMessage(kSettings));
    ScreenshotWindow::ScreenshotWindow(const Utility& utility, bool silent,  
    193194    const float kSpacing = be_control_look->DefaultItemSpacing();
    194195    const float kLabelSpacing = be_control_look->DefaultLabelSpacing();
    195196
    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);
    197199
    198200    BLayoutBuilder::Group<>(this, B_VERTICAL, 0)
    199201        .SetInsets(kSpacing)
    200202        .AddGroup(B_HORIZONTAL, kSpacing)
    201             .Add(fPreview)
     203            .Add(previewBox)
    202204            .AddGroup(B_VERTICAL, 0)
    203205                .Add(fActiveWindow)
    204206                .Add(fWindowBorder)
  • src/apps/screenshot/ScreenshotWindow.h

    diff --git a/src/apps/screenshot/ScreenshotWindow.h b/src/apps/screenshot/ScreenshotWindow.h
    index 4b24c1f..036a9b4 100644
    a b class BPath;  
    2626class BTextControl;
    2727class BTextView;
    2828
    29 class PreviewView;
    3029class Utility;
    3130
    3231
    private:  
    5857
    5958    const   Utility&        fUtility;
    6059
    61             PreviewView*    fPreview;
     60            BView*          fPreview;
    6261            BCheckBox*      fActiveWindow;
    6362            BTextControl*   fDelayControl;
    6463            BCheckBox*      fWindowBorder;
  • src/apps/screenshot/Jamfile

    -- 
    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 ;  
    77Application Screenshot :
    88    ScreenshotApp.cpp
    99    ScreenshotWindow.cpp
    10     PreviewView.cpp
    1110    Utility.cpp
    1211    : be $(HAIKU_LOCALE_LIBS) tracker translation $(TARGET_LIBSUPC++)
    1312    : ScreenshotApp.rdef