Ignore:
Timestamp:
Jun 6, 2021 2:22:19 PM (6 months ago)
Author:
toby
Message:

improve version notice display

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIctrlGUI.py

    r4921 r4922  
    54195419      .gpx file
    54205420    '''
    5421     def tblLine():
    5422         txtbox = wx.StaticText(dlg,wx.ID_ANY,'',size=(-1,3))
     5421    def tblLine(dlg,pixels=3):
     5422        'place line in table'
     5423        txtbox = wx.StaticText(dlg,wx.ID_ANY,'',size=(-1,pixels))
    54235424        txtbox.SetBackgroundColour(wx.Colour(0,0,0))
    54245425        tblSizer.Add(txtbox,0,wx.EXPAND)
    5425         txtbox = wx.StaticText(dlg,wx.ID_ANY,'',size=(-1,3))
     5426        txtbox = wx.StaticText(dlg,wx.ID_ANY,'',size=(-1,pixels))
    54265427        txtbox.SetBackgroundColour(wx.Colour(0,0,0))
    54275428        tblSizer.Add(txtbox,0,wx.EXPAND)
    5428 
     5429    size = (700,500)
    54295430    rev = GSASIIpath.svnGetRev()
    54305431    if rev is None: rev = GSASIIpath.GetVersionNumber()
     
    54775478    sizer = wx.BoxSizer(wx.VERTICAL)
    54785479    txtbox = wx.StaticText(dlg,wx.ID_ANY,
    5479             'Please read the notices below about GSAS-II updates since'
     5480            'Please read the notices below about major GSAS-II updates since'
    54805481            ' this project was last saved')
    5481     txtbox.Wrap(490)
    54825482    sizer.Add(txtbox,0)
     5483    txtbox.Wrap(size[0]-10)
    54835484    sizer.Add((10,10))
     5485    panel = wxscroll.ScrolledPanel(dlg, wx.ID_ANY, size=(size[0]-20, size[1]))
     5486    sizer.Add(panel,1,wx.EXPAND,1)
    54845487    tblSizer = wx.FlexGridSizer(0,2,5,10)
    5485     tblLine()
    5486     txtbox = wx.StaticText(dlg,wx.ID_ANY,'version')
     5488    tblLine(panel)
     5489    txtbox = wx.StaticText(panel,wx.ID_ANY,'Version')
    54875490    tblSizer.Add(txtbox,0,wx.ALIGN_CENTER|wx.ALIGN_CENTER_VERTICAL)
    5488     txtbox = wx.StaticText(dlg,wx.ID_ANY,'notice')
     5491    txtbox = wx.StaticText(panel,wx.ID_ANY,'Notice')
    54895492    tblSizer.Add(txtbox,0,wx.ALIGN_CENTER_VERTICAL|wx.EXPAND)
    5490     tblLine()
    5491     sizer.Add(tblSizer)
     5493    tblLine(panel)
    54925494    sizer.Add((10,10))
    54935495    btnsizer = wx.StdDialogButtonSizer()
     
    55035505    sizer.Add((-1,5))
    55045506    sizer.Add(btnsizer,0,wx.ALIGN_CENTER,50)
    5505     for key in reversed(sorted(list(noticeDict.keys()))):
    5506         txtbox = wx.StaticText(dlg,wx.ID_ANY,str(key))
     5507    for i,key in enumerate(sorted(noticeDict,reverse=True)):
     5508        if i != 0: tblLine(panel,1)
     5509        txtbox = wx.StaticText(panel,wx.ID_ANY,str(key))
    55075510        txtbox.SetBackgroundColour(wx.Colour(250,250,250))
    55085511        tblSizer.Add(txtbox,0,wx.ALIGN_CENTER|wx.ALIGN_CENTER_VERTICAL)
    5509         txtbox = wx.StaticText(dlg,wx.ID_ANY,noticeDict[key])
    5510         txtbox.Wrap(420)
     5512        txtbox = wx.StaticText(panel,wx.ID_ANY,noticeDict[key])
     5513        txtbox.Wrap(size[0]-110)
    55115514        txtbox.SetBackgroundColour(wx.Colour(250,250,250))
    55125515        tblSizer.Add(txtbox)
    5513     tblLine()
    5514    
     5516    tblLine(panel)
     5517    panel.SetSizer(tblSizer)
     5518    panel.SetAutoLayout(1)
     5519    panel.SetupScrolling()
    55155520    dlg.SetSizer(sizer)
    55165521    sizer.Fit(dlg)
Note: See TracChangeset for help on using the changeset viewer.