Browse Source

Added additional convenience methods

subparsing
chriskiehl 9 years ago
parent
commit
1f3f2deefb
1 changed files with 13 additions and 1 deletions
  1. 14
      gooey/gui/styling.py

14
gooey/gui/styling.py

@ -30,11 +30,23 @@ def H1(parent, label):
text.SetFont(font)
return text
def H2(parent, label):
text = wx.StaticText(parent, label=label)
font_size = text.GetFont().GetPointSize()
font = wx.Font(font_size * 1.2, wx.FONTFAMILY_DEFAULT, wx.FONTWEIGHT_NORMAL, wx.FONTWEIGHT_NORMAL, False)
text.SetFont(font)
return text
def HorizontalRule(parent):
line = wx.StaticLine(parent, -1, style=wx.LI_HORIZONTAL)
line.SetSize((10, 10))
return line
def vertical_rule(parent):
line = wx.StaticLine(parent, -1, style=wx.LI_VERTICAL)
line.SetSize((10, 10))
return line
def MakeDarkGrey(statictext):
darkgray = (54, 54, 54)
statictext.SetForegroundColour(darkgray)
statictext.SetForegroundColour(darkgray)
Loading…
Cancel
Save