|
|
|
@ -236,23 +236,23 @@ def make_sized_button(parent_pnl: wx.Panel, bitmap_or_str: Union[wx.Bitmap,
|
|
|
|
|
bitmap = wx.Bitmap(bitmap_or_str, wx.BITMAP_TYPE_ANY)
|
|
|
|
|
else:
|
|
|
|
|
bitmap = bitmap_or_str
|
|
|
|
|
btn_logo_style = wx.BU_AUTODRAW | wx.BU_EXACTFIT | wx.BU_NOTEXT | wx.BORDER_NONE#| wx.BOTTOM | wx.RIGHT | wx.TOP
|
|
|
|
|
btn_style = wx.BORDER_NONE | wx.BU_AUTODRAW | wx.BU_EXACTFIT | wx.BU_NOTEXT
|
|
|
|
|
btn_logo = wx.BitmapButton(parent_pnl,
|
|
|
|
|
wx.ID_ANY,
|
|
|
|
|
bitmap,
|
|
|
|
|
style=btn_logo_style,
|
|
|
|
|
size=SIZE)
|
|
|
|
|
style=btn_style,
|
|
|
|
|
size=bitmap.GetSize())
|
|
|
|
|
btn_logo.SetToolTip(text)
|
|
|
|
|
btn_sizer.Add(btn_logo, 0, wx.EXPAND, 1)
|
|
|
|
|
btn_sizer.Add(btn_logo, 0, wx.BOTTOM | wx.EXPAND | wx.LEFT | wx.TOP, 1)
|
|
|
|
|
|
|
|
|
|
btn_text = wx.Button(parent_pnl,
|
|
|
|
|
wx.ID_ANY,
|
|
|
|
|
text,
|
|
|
|
|
style=wx.BU_AUTODRAW | wx.BOTTOM | wx.LEFT | wx.TOP | wx.BORDER_NONE,
|
|
|
|
|
style=wx.BORDER_NONE | wx.BU_AUTODRAW,
|
|
|
|
|
size=wx.Size(SCREEN_WIDTH - SIZE.GetWidth(),
|
|
|
|
|
SIZE.GetHeight()))
|
|
|
|
|
btn_text.SetToolTip(text)
|
|
|
|
|
btn_sizer.Add(btn_text, 0, wx.EXPAND, 1)
|
|
|
|
|
btn_sizer.Add(btn_text, 0, wx.BOTTOM | wx.RIGHT | wx.TOP | wx.EXPAND, 1)
|
|
|
|
|
parent_pnl.Bind(wx.EVT_BUTTON, callback, btn_logo)
|
|
|
|
|
parent_pnl.Bind(wx.EVT_BUTTON, callback, btn_text)
|
|
|
|
|
|
|
|
|
|