Commit 9dfad88a authored by Paul McCarthy's avatar Paul McCarthy 🚵
Browse files

RF: Better default colours for textoverlay/dialog

parent 838cb977
......@@ -96,10 +96,11 @@ class SimpleMessageDialog(wx.Dialog):
self.__sizer.Add(self.__message,
border=25,
proportion=1,
flag=wx.EXPAND | wx.CENTRE | wx.ALL)
flag=wx.CENTRE | wx.ALL)
self.SetTransparent(240)
self.SetBackgroundColour((225, 225, 255))
self.SetBackgroundColour(
wx.SystemSettings.GetColour(wx.SYS_COLOUR_INFOBK))
self.SetSizer(self.__sizer)
......@@ -714,7 +715,9 @@ class FSLDirDialog(wx.Dialog):
label='Hint: Press \u2318+\u21e7+G in the file '
'dialog to manually type in a location.')
self.__hint.SetForegroundColour('#888888')
self.__hint.SetForegroundColour(
wx.SystemSettings.GetColour(wx.SYS_COLOUR_WINDOWTEXT)
.ChangeLightness(75))
self.__contentSizer.Insert(2, self.__hint, flag=wx.EXPAND)
self.__contentSizer.Insert(3, (1, 20))
......@@ -882,7 +885,9 @@ class CheckBoxMessageDialog(wx.Dialog):
if hintText is not None:
self.__hint = wx.StaticText(self, label=hintText)
self.__hint.SetForegroundColour('#888888')
self.__hint.SetForegroundColour(
wx.SystemSettings.GetColour(wx.SYS_COLOUR_WINDOWTEXT)
.ChangeLightness(75))
else:
self.__hint = None
......
......@@ -20,8 +20,8 @@ import wx
def textOverlay(target,
text,
box=True,
bgColour=(205, 205, 255),
fgColour=(0, 0, 0)):
bgColour=None,
fgColour=None):
"""Shows the given ``text`` on the given ``target``.
:arg target: ``wx.Window`` object
......@@ -36,6 +36,11 @@ def textOverlay(target,
:arg fgColour: Colour to draw the text in
"""
if bgColour is None:
bgColour = wx.SystemSettings.GetColour(wx.SYS_COLOUR_INFOBK)
if fgColour is None:
fgColour = wx.SystemSettings.GetColour(wx.SYS_COLOUR_INFOTEXT)
dc = wx.ClientDC(target)
w, h = dc.GetSize().Get()
w = dc.DeviceToLogicalX(w)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment