Changeset 2668


Ignore:
Timestamp:
Jan 27, 2017 6:03:36 PM (5 years ago)
Author:
toby
Message:

white letters for dark element colors (Mac/Linux?)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIElemGUI.py

    r2666 r2668  
    8888                El = wx.ComboBox(choices=name, parent=self, pos=pos, size=wx.Size(butWid,27),
    8989                    style=wx.CB_DROPDOWN, value=name[0]+' ') # add an invisible space
     90                if sum(color)/3 < 128: # background is mostly dark, use white letters
     91                    El.SetForegroundColour((255,255,255))
    9092            else:
    9193                El = wx.ComboBox(choices=name, parent=self, pos=pos, size=wx.Size(butWid,23),
     
    333335        return DeleteElement.El
    334336       
    335 
     337if __name__ == '__main__':
     338    app = wx.PySimpleApp()
     339    GSASIIpath.InvokeDebugOpts()
     340    G2frame = wx.Frame(None) # create a frame
     341    G2frame.Show(True)
     342
     343    PE = PickElement(G2frame)
     344    if PE.ShowModal() == wx.ID_OK:
     345        print PE.Elem
     346    PE.Destroy()
     347
Note: See TracChangeset for help on using the changeset viewer.