Changeset 649806d in sasview
- Timestamp:
- Jul 4, 2015 1:39:50 AM (9 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:
- 1170492
- Parents:
- 805f07a
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/plottools/TextDialog.py
r3477478 r649806d 8 8 FONT_VARIANT = 1 9 9 PNL_WIDTH = 500 10 FAMILY = ['serif', 'sa s-serif', 'fantasy', 'monospace']10 FAMILY = ['serif', 'sans-serif', 'fantasy', 'monospace'] 11 11 SIZE = [8, 9, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 36, 48, 72] 12 12 STYLE = ['normal', 'italic'] … … 20 20 Dialog window pops- up when selecting 'Add Text' on the toolbar 21 21 """ 22 wx.Dialog.__init__(self, parent, id, title, size=(PNL_WIDTH, 280))22 wx.Dialog.__init__(self, parent, id, title, size=(PNL_WIDTH, 300)) 23 23 self.parent = parent 24 24 # Font … … 35 35 text_box = wx.BoxSizer(wx.HORIZONTAL) 36 36 sizer = wx.GridBagSizer(1, 3) 37 _BOX_WIDTH = 6038 font_description = wx.StaticBox(self, -1, 'Font' , size=(PNL_WIDTH - 20, 70))37 _BOX_WIDTH = 70 38 font_description = wx.StaticBox(self, -1, 'Font') 39 39 font_box = wx.StaticBoxSizer(font_description, wx.VERTICAL) 40 40 family_box = wx.BoxSizer(wx.HORIZONTAL) … … 103 103 self.font_style.SetToolTipString("Font style of the text.") 104 104 # font color 105 self.font_color = wx.ComboBox(self, -1, style =wx.CB_READONLY)105 self.font_color = wx.ComboBox(self, -1, style = wx.CB_READONLY) 106 106 wx.EVT_COMBOBOX(self.font_color, -1, self.on_color) 107 107 self.font_color.SetMinSize((_BOX_WIDTH, -1)) … … 111 111 # Buttons on the bottom 112 112 self.static_line_1 = wx.StaticLine(self, -1) 113 self.ok_button = wx.Button(self, wx.ID_OK, 'OK', size=(_BOX_WIDTH, 25)) 114 self.close_button = wx.Button(self, wx.ID_CANCEL, 'Cancel', size=(_BOX_WIDTH, 25)) 113 self.ok_button = wx.Button(self, wx.ID_OK, 'OK', 114 size = (_BOX_WIDTH, 25)) 115 self.close_button = wx.Button(self, wx.ID_CANCEL, 'Cancel', 116 size = (_BOX_WIDTH, 25)) 115 117 116 118 # Intro … … 121 123 sizer.Add(wx.StaticText(self, -1, explanation), (iy, ix), 122 124 (1, 1), wx.LEFT | wx.EXPAND | wx.ADJUST_MINSIZE, 15) 123 family_box.Add(wx.StaticText(self, -1, 'Family :'), -1, 0) 124 family_box.Add(self.font_family, -1, 0) 125 family_box.Add(wx.StaticText(self, -1, 'Family :', size = (50, -1)), 126 0, wx.TOP, 5) 127 family_box.Add(self.font_family, 0, 0) 125 128 family_box.Add((_BOX_WIDTH / 2, -1)) 126 family_box.Add(wx.StaticText(self, -1, 'Size :'), -1, 0) 127 family_box.Add(self.font_size, -1, 0) 129 family_box.Add(wx.StaticText(self, -1, 'Size :', size = (50, -1)), 130 0, wx.TOP, 5) 131 family_box.Add(self.font_size, 0, 0) 128 132 if unit_box != None: 129 133 family_box.Add((_BOX_WIDTH / 2, -1)) 130 family_box.Add(tick_label_text, -1, 0) 131 family_box.Add(self.tick_label_check, -1, 0) 132 style_box.Add(wx.StaticText(self, -1, 'Style :'), -1, 0) 133 style_box.Add(self.font_style, -1, 0) 134 family_box.Add(tick_label_text, 0, 0) 135 family_box.Add(self.tick_label_check, 0, 0) 136 style_box.Add(wx.StaticText(self, -1, 'Style :', size = (50, -1)), 137 0, wx.TOP, 5) 138 style_box.Add(self.font_style, 0, 0) 134 139 style_box.Add((_BOX_WIDTH / 2, -1)) 135 style_box.Add(wx.StaticText(self, -1, 'Weight :'), -1, 0) 136 style_box.Add(self.font_weight, -1, 0) 140 style_box.Add(wx.StaticText(self, -1, 'Weight :', size = (50, -1)), 141 0, wx.TOP, 5) 142 style_box.Add(self.font_weight, 0, 0) 137 143 style_box.Add((_BOX_WIDTH / 2, -1)) 138 style_box.Add(wx.StaticText(self, -1, 'Color :'), -1, 0) 139 style_box.Add(self.font_color, -1, 0) 140 font_box.Add(family_box, -1, 10) 141 font_box.Add(style_box, -1, 10) 144 style_box.Add(wx.StaticText(self, -1, 'Color :', size = (45, -1)), 145 0, wx.TOP, 5) 146 style_box.Add(self.font_color, 0, 0) 147 font_box.Add(family_box, 0, 10) 148 font_box.Add((0,5)) 149 font_box.Add(style_box, 0, 10) 142 150 iy += 1 143 151 ix = 0 … … 152 160 vbox.Add(text_box, 0, wx.EXPAND, 15) 153 161 if unit_box != None: 154 unit_box.Add(unit_text, -1, 0)155 unit_box.Add(self.unit_ctrl, -1, 0)162 unit_box.Add(unit_text, 0, 0) 163 unit_box.Add(self.unit_ctrl, 0, 0) 156 164 vbox.Add((5, 5)) 157 165 vbox.Add(unit_box, 0, wx.LEFT, 15)
Note: See TracChangeset
for help on using the changeset viewer.