Changeset 657e52c in sasview for plottools/src
- Timestamp:
- Dec 14, 2012 2:50:24 PM (12 years ago)
- 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:
- 0203ade
- Parents:
- aa01d07b
- Location:
- plottools/src/danse/common/plottools
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
plottools/src/danse/common/plottools/PlotPanel.py
rf866fb5 r657e52c 2 2 """ 3 3 import logging 4 import wx.lib.newevent 5 4 import wx 6 5 # Try a normal import first 7 6 # If it fails, try specifying a version -
plottools/src/danse/common/plottools/SimpleFont.py
r8f59e95 r657e52c 34 34 self.style = STYLE[0] 35 35 self.weight = WEIGHT[1] 36 36 self.tick_label = None 37 self.tick_label_check = None 37 38 self.InitUI() 38 39 self.Centre() 39 40 self.Show() 40 41 41 42 42 def InitUI(self): 43 43 vbox = wx.BoxSizer(wx.VERTICAL) … … 57 57 self.fontWeight = wx.ComboBox(self,pos=(300,60), 58 58 style=wx.CB_READONLY,size=(100,-1)) 59 59 self.tick_label_check = wx.CheckBox(self, -1, label='', pos=(80, 100), 60 size=(15, -1)) 61 self.tick_label_check.SetValue(False) 60 62 self.okButton = wx.Button(self,wx.ID_OK,'OK',pos=(215,100)) 61 63 self.closeButton = wx.Button(self,wx.ID_CANCEL,'Cancel',pos=(315,100)) 62 64 63 65 self._set_family_list() 64 66 self._set_style_list() 65 67 self._set_weight_list() 66 68 self._set_point_list() 67 69 68 70 familyText = wx.StaticText(self, label='Family:', pos=(10,12)) 69 71 sizeText = wx.StaticText(self, label='Size:',pos=(220,12)) 70 72 styleText = wx.StaticText(self, label='Style:',pos=(10,62)) 71 73 weightText = wx.StaticText(self, label='Weight:',pos=(220,62)) 72 74 tick_label_text = wx.StaticText(self,label='Tick label?', pos=(10, 100)) 75 tick_label_text.SetToolTipString("Apply to tick label too.") 76 73 77 def _set_family_list(self): 74 78 # list of font family … … 95 99 self.fontPoint.Append(str(list[idx]),idx) 96 100 101 def get_ticklabel_check(self): 102 """ 103 Get tick label check value 104 """ 105 self.tick_label = self.tick_label_check.GetValue() 106 return self.tick_label 107 108 def set_ticklabel_check(self, check=False): 109 """ 110 Set tick label check value 111 """ 112 self.tick_label_check.SetValue(check) 97 113 98 114 def set_default_font(self,font): … … 103 119 self.fontPoint.SetSelection(3) 104 120 self.fontStyle.SetSelection(0) 105 106 121 else: 107 self.fontWeight.SetStringSelection(font.get_weight()) 108 self.fontPoint.SetStringSelection(font.get_size()) 109 self.fontFamily.SetStringSelection(font.get_family()) 110 self.fontStyle.SetStringSelection(font.get_style()) 111 112 122 self.fontWeight.SetStringSelection(str(font.get_weight())) 123 self.fontPoint.SetStringSelection(str(int(font.get_size()))) 124 self.fontFamily.SetStringSelection(str(font.get_family()[0])) 125 self.fontStyle.SetStringSelection(str(font.get_style())) 126 113 127 def get_font(self): 114 128 FONT = FontProperties() 115 129 font = FONT.copy() 116 font.set_size(s elf.fontPoint.GetValue())130 font.set_size(str(self.fontPoint.GetValue())) 117 131 font.set_name(str(self.fontFamily.GetValue())) 118 132 font.set_slant(str(self.fontStyle.GetValue())) -
plottools/src/danse/common/plottools/TextDialog.py
r10bfeb3 r657e52c 97 97 self.fontSize.SetMinSize((_BOX_WIDTH, -1)) 98 98 self._set_size_list() 99 self.fontSize.SetSelection( 3)99 self.fontSize.SetSelection(5) 100 100 self.fontSize.SetToolTipString("Font size of the text.") 101 101 #font style
Note: See TracChangeset
for help on using the changeset viewer.