def _create_close_button(self): bmp = spBitmap(CANCEL_ICON, theme=self.preferences.GetValue("M_ICON_THEME")) color = self.preferences.GetValue("M_BG_COLOUR") self.btn_close = CreateGenButton(self, wx.ID_OK, bmp, text=" Close", tooltip="Close this frame", colour=color) self.btn_close.SetFont(self.preferences.GetValue("M_FONT")) self.btn_close.SetDefault() self.btn_close.SetFocus() self.SetAffirmativeId(wx.ID_OK)
def _init_infos(self): wx.GetApp().SetAppName("useragreement") # icon _icon = wx.EmptyIcon() _icon.CopyFromBitmap(spBitmap(APP_ICON)) self.SetIcon(_icon) # colors self.SetBackgroundColour(self.preferences.GetValue("M_BG_COLOUR")) self.SetForegroundColour(self.preferences.GetValue("M_FG_COLOUR")) self.SetFont(self.preferences.GetValue("M_FONT"))
def _create_title_label(self): self.title_layout = wx.BoxSizer(wx.HORIZONTAL) bmp = wx.BitmapButton(self, bitmap=spBitmap(TIER_PREVIEW, 32, theme=self.preferences.GetValue('M_ICON_THEME')), style=wx.NO_BORDER) font = self.preferences.GetValue('M_FONT') font.SetWeight(wx.BOLD) font.SetPointSize(font.GetPointSize() + 2) self.title_label = wx.StaticText(self, label="Preview of tier(s)", style=wx.ALIGN_CENTER) self.title_label.SetFont( font ) self.title_layout.Add(bmp, flag=wx.TOP|wx.RIGHT|wx.ALIGN_RIGHT, border=5) self.title_layout.Add(self.title_label, flag=wx.EXPAND|wx.ALL|wx.wx.ALIGN_CENTER_VERTICAL, border=5)
def _create_title_label(self): self.title_layout = wx.BoxSizer(wx.HORIZONTAL) bmp = wx.BitmapButton( self, bitmap=spBitmap(USERCHECK, 32, theme=self.preferences.GetValue("M_ICON_THEME")), style=wx.NO_BORDER ) font = self.preferences.GetValue("M_FONT") font.SetWeight(wx.BOLD) font.SetPointSize(font.GetPointSize() + 2) self.title_label = wx.StaticText(self, label="User agreement of 2 tiers", style=wx.ALIGN_CENTER) self.title_label.SetFont(font) self.title_layout.Add(bmp, flag=wx.TOP | wx.RIGHT | wx.ALIGN_RIGHT, border=5) self.title_layout.Add(self.title_label, flag=wx.EXPAND | wx.ALL | wx.wx.ALIGN_CENTER_VERTICAL, border=5)