Package schrodinger :: Package ui :: Package widget :: Module default
[hide private]
[frames] | no frames]

Module default

Functions to set up defaults so that Tkinter widgets match the old Schrodinger GUI style.

Copyright Schrodinger, LLC. All rights reserved.

Functions [hide private]
 
_read_font_res(loc)
Read a single font resource file to get the font definitions.
 
font_catcher()
Utility for grabbing prefered Fonts just as Maestro does.
Variables [hide private]
  _fonts = {'bold': '-b&h-lucida-bold-r-normal-sans-12-*', 'fixe...
  MAIN_FONT = '-b&h-lucida-medium-r-normal-sans-12-*'
  BOLD_FONT = '-b&h-lucida-bold-r-normal-sans-12-*'
  SMALL_FONT = '-b&h-lucida-bold-r-normal-sans-10-*'
  FIXED_WIDTH_FONT = '-b&h-lucidatypewriter-medium-r-normal-sans...
Below we set all Maestro Defaults to appropriate variables.
  MAESTRO_BACKGROUND = 'gray90'
  MAESTRO_FOREGROUND = 'black'
  MAESTRO_DISABLED_FOREGROUND = 'gray'
  MAESTRO_TEXT_BACKGROUND = 'whitesmoke'
  MAESTRO_TEXTENTRY_BACKGROUND = 'whitesmoke'
  MAESTRO_NONEDITABLE_BACKGROUND = 'gray90'
  MAESTRO_AUTOHELP_BACKGROUND = 'AntiqueWhite'
  MAESTRO_WORKSPACEFEEDBACK_BACKGROUND = 'AntiqueWhite'
  MAESTRO_DIALOG_BACKGROUND = 'gray90'
  MAESTRO_DIALOGNONEDITABLE_BACKGROUND = 'gray90'
  MAESTRO_DIALOGTEXT_BACKGROUND = 'whitesmoke'
  MAESTRO_ASLFRAME_BACKGROUND = 'gray90'
  MAESTRO_ASL_BACKGROUND = 'LightSlateGray'
  MAESTRO_ASLNONEDITABLE_BACKGROUND = 'gray90'
  MAESTRO_ASLTEXT_BACKGROUND = 'whitesmoke'
  MAESTRO_JOBLAUNCH_BACKGROUND = 'gray90'
  MAESTRO_JOBLAUNCHNONEDITABLE_BACKGROUND = 'gray90'
  MAESTRO_JOBLAUNCHTEXT_BACKGROUND = 'whitesmoke'
  MAESTRO_PT_SELECTEDROW_BACKGROUND = 'LemonChiffon'
  MAESTRO_PT_GRIDLINE_COLOR = 'gray60'
  MAESTRO_PT_HEADERROW_BACKGROUND = 'LightSkyBlue'
  MAESTRO_PT_ROWCOLUMN_DARKBACKGROUND = 'LightSkyBlue'
  MAESTRO_PT_ROWCOLUMN_LIGHTBACKGROUND = '#94dfff'
  MAESTRO_PT_OTHERCOLUMN_DARKBACKGROUND = '#9db3ce'
  MAESTRO_PT_OTHERCOLUMN_LIGHTBACKGROUND = '#adc3de'
  MAESTRO_PT_CELL_DARKBACKGROUND = 'gray80'
  MAESTRO_PT_CELL_LIGHTBACKGROUND = 'gray85'
  MAESTRO_TABLESELECTEDROW_BACKGROUND = 'LemonChiffon'
  MAESTRO_TABLEHEADING_BACKGROUND = 'LightSkyBlue'
  MAESTRO_TABLEGRIDLINE_COLOR = 'gray60'
  MAESTRO_TABLECELL_BACKGROUND = 'whitesmoke'
  MAESTRO_TABLENONEDITABLE_BACKGROUND = 'gray90'
  MAESTRO_BUTTON_UNDERLINE = None
hash(x)
  MAESTRO_LABEL_UNDERLINE = None
hash(x)
  dflts = {'balloon': {'asl': {}, 'dialog': {}, 'generic': {}, '...
  __package__ = 'schrodinger.ui.widget'
Function Details [hide private]

_read_font_res(loc)

 

Read a single font resource file to get the font definitions.

Return a dictionary of font resource names indexed by the general font definition name.

font_catcher()

 

Utility for grabbing prefered Fonts just as Maestro does. The preference files are parsed, and if no preferences are set, defaults are used. Also, since defaults have changed in the past, we attempt to use the proper defaults given the version of Maestro that is being used. Defaults also used to depend on monitor resolution. font_catcher determines the monitor resolution and attempts to take appropriate action.


Variables Details [hide private]

_fonts

Value:
{'bold': '-b&h-lucida-bold-r-normal-sans-12-*',
 'fixed_width': '-b&h-lucidatypewriter-medium-r-normal-sans-12-*',
 'normal': '-b&h-lucida-medium-r-normal-sans-12-*',
 'small': '-b&h-lucida-bold-r-normal-sans-10-*'}

FIXED_WIDTH_FONT

Below we set all Maestro Defaults to appropriate variables. NOTE: The variable names here do not perfectly correspond to those from Maestro.

Value:
'-b&h-lucidatypewriter-medium-r-normal-sans-12-*'

dflts

Value:
{'balloon': {'asl': {},
             'dialog': {},
             'generic': {},
             'joblaunch': {},
             'normal': {}},
 'balloonlabel': {'asl': {},
                  'dialog': {},
                  'generic': {'background': 'AntiqueWhite', 'font': '-\
...