From 36fcedde19a096c2bf5ab01fa4cf980828435158 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niklas=20B=C3=B6lter?= Date: Sat, 20 Nov 2010 21:49:42 +0100 Subject: [PATCH] Fixed minor display issues on Mac OS X including a silly hack --- gui/chromeTabs.py | 9 ++++++++- gui/marketBrowser.py | 2 +- gui/shipBrowser.py | 10 +++++----- 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/gui/chromeTabs.py b/gui/chromeTabs.py index 03034147b..e3787ea1f 100644 --- a/gui/chromeTabs.py +++ b/gui/chromeTabs.py @@ -989,7 +989,14 @@ class PFTabsContainer(wx.Panel): mdc.SelectObject(canvas) selected = 0 - color = wx.SystemSettings_GetColour(wx.SYS_COLOUR_3DFACE) + # TODO + # This is a hack because on mac os the system colour constants are somehow wrong, + # additionally somehow the colors get changed when drawing (all RGB values are off by 4) + # TODO + if 'wxMac' in wx.PlatformInfo: + color = wx.Colour(232, 232, 232) + else: + color = wx.SystemSettings_GetColour(wx.SYS_COLOUR_3DFACE) mdc.SetBackground (wx.Brush(color)) # mdc.SetBackground (wx.Brush((66,113,202))) diff --git a/gui/marketBrowser.py b/gui/marketBrowser.py index 4cd24f6cd..906716391 100644 --- a/gui/marketBrowser.py +++ b/gui/marketBrowser.py @@ -43,7 +43,7 @@ class MarketBrowser(wx.Panel): vbox.Add(p, 0, wx.EXPAND) self.search = SearchBox(p) sizer.Add(self.search, 1, wx.ALIGN_CENTER_VERTICAL | wx.ALL, 2) - p.SetMinSize((wx.SIZE_AUTO_WIDTH, 27)) + p.SetMinSize((wx.SIZE_AUTO_WIDTH, 33)) self.splitter = wx.SplitterWindow(self, style = wx.SP_LIVE_UPDATE) vbox.Add(self.splitter, 1, wx.EXPAND) diff --git a/gui/shipBrowser.py b/gui/shipBrowser.py index fdff546df..bc32619fd 100644 --- a/gui/shipBrowser.py +++ b/gui/shipBrowser.py @@ -317,12 +317,12 @@ class HeaderPane (wx.Panel): self.sbReset = PFGenBitmapButton( self, wx.ID_ANY, self.resetBmp, wx.DefaultPosition, bmpSize, wx.BORDER_NONE ) mainSizer.Add(self.sbReset, 0, wx.LEFT | wx.TOP | wx.BOTTOM | wx.ALIGN_CENTER_VERTICAL , 5) - self.sbReset.SetBackgroundColour( wx.SystemSettings.GetColour( wx.SYS_COLOUR_BTNFACE ) ) + self.sbReset.SetBackgroundColour( wx.Colour(0, 0, 0, 0) ) self.sbReset.SetBitmapSelected(self.resetBmp) self.sbRewind = PFGenBitmapButton( self, wx.ID_ANY, self.rewBmp, wx.DefaultPosition, bmpSize, wx.BORDER_NONE ) mainSizer.Add(self.sbRewind, 0, wx.LEFT | wx.TOP | wx.BOTTOM | wx.ALIGN_CENTER_VERTICAL , 5) - self.sbRewind.SetBackgroundColour( wx.SystemSettings.GetColour( wx.SYS_COLOUR_BTNFACE ) ) + self.sbRewind.SetBackgroundColour( wx.Colour(0, 0, 0, 0) ) self.sbRewind.SetBitmapSelected(self.rewBmp) self.sl1 = wx.StaticLine( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_VERTICAL ) @@ -330,11 +330,11 @@ class HeaderPane (wx.Panel): self.sbNewFit = PFGenBitmapButton( self, wx.ID_ANY, self.newBmp, wx.DefaultPosition, bmpSize, wx.BORDER_NONE ) mainSizer.Add(self.sbNewFit, 0, wx.LEFT | wx.TOP | wx.BOTTOM | wx.ALIGN_CENTER_VERTICAL , 5) - self.sbNewFit.SetBackgroundColour( wx.SystemSettings.GetColour( wx.SYS_COLOUR_BTNFACE ) ) + self.sbNewFit.SetBackgroundColour( wx.Colour(0, 0, 0, 0) ) self.sbSwitchFitView = PFGenBitmapButton( self, wx.ID_ANY, self.switchBmp, wx.DefaultPosition, bmpSize, wx.BORDER_NONE ) mainSizer.Add(self.sbSwitchFitView, 0, wx.LEFT | wx.TOP | wx.BOTTOM | wx.ALIGN_CENTER_VERTICAL , 5) - self.sbSwitchFitView.SetBackgroundColour( wx.SystemSettings.GetColour( wx.SYS_COLOUR_BTNFACE ) ) + self.sbSwitchFitView.SetBackgroundColour( wx.Colour(0, 0, 0, 0) ) self.stStatus = wx.StaticText( self, wx.ID_ANY, "", wx.DefaultPosition, wx.DefaultSize, 0 ) @@ -356,7 +356,7 @@ class HeaderPane (wx.Panel): self.sbSearch = PFGenBitmapButton( self, wx.ID_ANY, self.searchBmp, wx.DefaultPosition, bmpSize, wx.BORDER_NONE ) mainSizer.Add(self.sbSearch, 0, wx.ALL | wx.ALIGN_CENTER_VERTICAL , 5) - self.sbSearch.SetBackgroundColour( wx.SystemSettings.GetColour( wx.SYS_COLOUR_BTNFACE ) ) + self.sbSearch.SetBackgroundColour( wx.Colour(0, 0, 0, 0) ) self.SetSizer(mainSizer)