From 73ffe573fb9379b6170d1a7848e6054ed1805618 Mon Sep 17 00:00:00 2001 From: Micke Nordin Date: Thu, 13 Jan 2022 18:19:26 +0100 Subject: [PATCH] revert button styles --- src/Utils/__init__.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Utils/__init__.py b/src/Utils/__init__.py index 5afe83c..930e21d 100644 --- a/src/Utils/__init__.py +++ b/src/Utils/__init__.py @@ -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)