From 84e20a7a4b189a0b89c77a726a07092f3e6d95db Mon Sep 17 00:00:00 2001 From: HomeWorld Date: Mon, 16 May 2011 13:48:19 +0300 Subject: [PATCH] Added a little arrow to race filtering window --- gui/shipBrowser.py | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/gui/shipBrowser.py b/gui/shipBrowser.py index 6eb4b8786..49bd730aa 100644 --- a/gui/shipBrowser.py +++ b/gui/shipBrowser.py @@ -83,6 +83,18 @@ class RaceSelector(wx.Window): self.buttonsBarPos = (4,0) self.buttonsPadding = 4 + self.bmpArrow = bitmapLoader.getBitmap("down-arrow2","icons") + # Make the bitmaps have the same color as window text + + sysTextColour = wx.SystemSettings.GetColour( wx.SYS_COLOUR_WINDOWTEXT ) + + img = self.bmpArrow.ConvertToImage() + img = img.Rotate90(False) + img.Replace(0, 0, 0, sysTextColour[0], sysTextColour[1], sysTextColour[2]) + img = img.Scale(self.minWidth, 8, wx.IMAGE_QUALITY_HIGH) + + self.bmpArrow = wx.BitmapFromImage(img) + self.RebuildRaces(self.shipBrowser.RACE_ORDER) self.Bind(wx.EVT_ENTER_WINDOW, self.OnWindowEnter) @@ -137,7 +149,7 @@ class RaceSelector(wx.Window): rect = self.GetRect() windowColor = wx.SystemSettings_GetColour(wx.SYS_COLOUR_WINDOW) - bkColor = colorUtils.GetSuitableColor(windowColor, 0.05) + bkColor = colorUtils.GetSuitableColor(windowColor, 0.1) sepColor = colorUtils.GetSuitableColor(windowColor, 0.6) mdc = wx.BufferedPaintDC(self) @@ -160,7 +172,8 @@ class RaceSelector(wx.Window): mdc.DrawBitmap(bmp, x, y) y+=raceBmp.GetHeight() + 4 - + if self.direction < 1: + mdc.DrawBitmap(self.bmpArrow, -2, rect.height/2) def OnTimer(self,event):