Changeset 0318c4f in sasview for sansguiframe/src/sans/guiframe


Ignore:
Timestamp:
Apr 26, 2012 12:40:33 PM (13 years ago)
Author:
Jae Cho <jhjcho@…>
Branches:
master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
b582d6bc
Parents:
2d0756a5
Message:

better bookmark toolbar icon style

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sansguiframe/src/sans/guiframe/gui_toolbar.py

    r8c347a6 r0318c4f  
    66from sans.guiframe.gui_style import GUIFRAME_ID 
    77from sans.guiframe.gui_style import GUIFRAME_ICON 
    8 from wx.lib.platebtn import PB_STYLE_SQUARE, PB_STYLE_DROPARROW 
     8from wx.lib.platebtn import PB_STYLE_DEFAULT, PB_STYLE_DROPARROW,PB_STYLE_NOBG 
    99#Control panel width  
    1010import sys 
     
    7676                   disable_report_bmp, button_type,'Report') 
    7777        self.AddSeparator() 
    78         #print_im = GUIFRAME_ICON.PRINT_ICON 
    79         #print_im.Rescale(tbar_size[0], tbar_size[1], wx.IMAGE_QUALITY_HIGH) 
    80         #print_bmp = print_im.ConvertToBitmap() 
    81          
    82         #disable_print_bmp = wx.NullBitmap 
    83         #self.AddLabelTool(GUIFRAME_ID.PRINT_ID, 'Print', print_bmp, 
    84         #                  disable_print_bmp, button_type, 'Print') 
    85         #self.AddSeparator() 
    8678        undo_im = GUIFRAME_ICON.UNDO_ICON 
    8779        undo_im.Rescale(tbar_size[0], tbar_size[1], wx.IMAGE_QUALITY_HIGH) 
    8880        undo_bmp = undo_im.ConvertToBitmap() 
    89         #disable_undo_bmp = clear_image(undo_im).ConvertToBitmap() 
    9081        disable_undo_bmp = wx.NullBitmap 
    9182        self.AddLabelTool(GUIFRAME_ID.UNDO_ID, 'Undo', undo_bmp, 
     
    9586        redo_im.Rescale(tbar_size[0], tbar_size[1], wx.IMAGE_QUALITY_HIGH) 
    9687        redo_bmp = redo_im.ConvertToBitmap() 
    97         #disable_redo_bmp = clear_image(redo_im).ConvertToBitmap() 
    9888        disable_redo_bmp = wx.NullBitmap 
    9989        self.AddLabelTool(GUIFRAME_ID.REDO_ID, 'Redo', redo_bmp, 
     
    10393        copy_im.Rescale(tbar_size[0], tbar_size[1], wx.IMAGE_QUALITY_HIGH) 
    10494        copy_bmp = copy_im.ConvertToBitmap() 
    105         #disable_undo_bmp = clear_image(undo_im).ConvertToBitmap() 
    10695        disable_copy_bmp = wx.NullBitmap 
    10796        self.AddLabelTool(GUIFRAME_ID.COPY_ID, 'Copy', copy_bmp, 
     
    111100        paste_im.Rescale(tbar_size[0], tbar_size[1], wx.IMAGE_QUALITY_HIGH) 
    112101        paste_bmp = paste_im.ConvertToBitmap() 
    113         #disable_redo_bmp = clear_image(redo_im).ConvertToBitmap() 
    114102        disable_paste_bmp = wx.NullBitmap 
    115103        self.AddLabelTool(GUIFRAME_ID.PASTE_ID, 'Paste', paste_bmp, 
    116104                          disable_paste_bmp, button_type,'Paste parameter values') 
    117  
    118         self.AddSeparator() 
    119         #add button for the current application 
    120         #self.button_application = wx.StaticText(self, -1, 'Welcome') 
    121         #self.button_application.SetForegroundColour('black') 
    122         #self.button_application.SetBackgroundColour('#1874CD') 
    123         #hint = 'Active Application' 
    124         #self.button_application.SetToolTipString(hint) 
    125         #self.AddControl(self.button_application) 
    126         #self.AddSeparator() 
    127          
    128         self._bookmark_bt = PlateButton(self, -1, 'bookmark',  
    129                          GUIFRAME_ICON.BOOKMARK_ICON.ConvertToBitmap(),  
    130                          style=PB_STYLE_SQUARE|PB_STYLE_DROPARROW) 
     105        self.AddSeparator() 
     106        self._bookmark_bt = PlateButton(self, -1, 'Bookmarks', 
     107                        GUIFRAME_ICON.BOOKMARK_ICON.ConvertToBitmap(),  
     108                        style=PB_STYLE_DEFAULT|PB_STYLE_DROPARROW|PB_STYLE_NOBG) 
     109        self._bookmark_bt.SetWindowVariant(FONT_VARIANT) 
    131110        self._bookmark_bt.Disable() 
    132111        self._bookmark_menu = wx.Menu() 
    133112        self.add_bookmark_default() 
    134          
    135          
    136113        self._bookmark_bt.SetMenu(self._bookmark_menu) 
    137114        self.AddControl(self._bookmark_bt) 
    138  
    139115        self.SetToolBitmapSize(tbar_size) 
    140116        self.AddSeparator() 
     
    144120                                          size=NAME_BOX, 
    145121                                          style=wx.SUNKEN_BORDER|wx.ALIGN_LEFT) 
    146         #self.button_panel.SetForegroundColour('black') 
    147         #self.button_panel.SetBackgroundColour('white') 
    148122        button_panel_font = self.button_panel.GetFont() 
    149123        button_panel_font.SetWeight(wx.BOLD) 
    150124        self.button_panel.SetFont(button_panel_font) 
    151         #self.button_panel.SetClientSize((80,20)) 
    152125        hint = 'Control Panel on Focus' 
    153126        self.button_panel.SetToolTipString(hint) 
     
    161134        """ 
    162135        id = wx.NewId() 
    163         self._bookmark_menu.Append(id, 'Add bookmark') 
     136        self._bookmark_menu.Append(id, 'Bookmark This Page State') 
    164137        self._bookmark_menu.AppendSeparator() 
    165138        wx.EVT_MENU(self, id, self.on_bookmark) 
     
    167140    def on_bind_button(self): 
    168141        """ 
     142        Bind the buttons 
    169143        """ 
    170144        if self.parent is not None: 
Note: See TracChangeset for help on using the changeset viewer.