From 4a97045d814d38aed961cf565162afd3b26846d2 Mon Sep 17 00:00:00 2001 From: Jeffrey Pfau Date: Sat, 25 Apr 2015 14:52:53 -0700 Subject: [PATCH] Add hack for removing background from text controlers, per comex --- Source/Core/DolphinWX/AboutDolphin.cpp | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/Source/Core/DolphinWX/AboutDolphin.cpp b/Source/Core/DolphinWX/AboutDolphin.cpp index a837c5230b..f2f85ae4fb 100644 --- a/Source/Core/DolphinWX/AboutDolphin.cpp +++ b/Source/Core/DolphinWX/AboutDolphin.cpp @@ -17,10 +17,22 @@ #include #include +#ifdef __APPLE__ +#import +#endif + #include "Common/Common.h" #include "DolphinWX/AboutDolphin.h" #include "DolphinWX/resources/dolphin_logo.cpp" +static void BanishBackground(wxTextCtrl* ctrl) +{ +#ifdef __APPLE__ + NSTextField* tf = (NSTextField*)ctrl->GetHandle(); + tf.drawsBackground = NO; +#endif +} + AboutDolphin::AboutDolphin(wxWindow *parent, wxWindowID id, const wxString &title, const wxPoint &position, const wxSize& size, long style) @@ -61,9 +73,11 @@ AboutDolphin::AboutDolphin(wxWindow *parent, wxWindowID id, const wxString SupportText = _("Support"); wxStaticText* const Dolphin = new wxStaticText(this, wxID_ANY, DolphinText); - wxTextCtrl* const Revision = new wxTextCtrl(this, wxID_ANY, RevisionText, wxDefaultPosition, wxDefaultSize, wxNO_BORDER); + wxTextCtrl* const Revision = new wxTextCtrl(this, wxID_ANY, RevisionText, wxDefaultPosition, wxDefaultSize, wxNO_BORDER | wxTE_NO_VSCROLL); + BanishBackground(Revision); wxStaticText* const Copyright = new wxStaticText(this, wxID_ANY, CopyrightText); - wxTextCtrl* const Branch = new wxTextCtrl(this, wxID_ANY, "", wxDefaultPosition, wxSize(300, 50), wxTE_MULTILINE | wxNO_BORDER | wxTE_NO_VSCROLL); + wxTextCtrl* const Branch = new wxTextCtrl(this, wxID_ANY, "", wxDefaultPosition, wxSize(300, 50), wxNO_BORDER | wxTE_NO_VSCROLL); + BanishBackground(Branch); wxStaticText* const Message = new wxStaticText(this, wxID_ANY, Text); wxStaticText* const Update = new wxStaticText(this, wxID_ANY, CheckUpdateText); wxStaticText* const FirstSpacer = new wxStaticText(this, wxID_ANY, wxString(" | "));