schrodinger.ui.qt.standard.design_tokens module

Design tokens refer to values set by the UX team in the PanelX design system. These tokens define the single source of truth for typography, coloring, and dimensions.

New token classes must be added to _TOKEN_CLASSES to appear in the stylesheet.

class schrodinger.ui.qt.standard.design_tokens.PrimaryColors

Bases: object

The hex values for the only non-gray colors used in PanelX. These colors are variations of blues. Tints are lighter variations of the primary blue. Shades are darker variations of the primary blue.

TINT_30 = '#7AC7EA'
TINT_50 = '#A0D7F0'
TINT_90 = '#ECF7FC'
PRIMARY = '#41B1E1'
SHADE_10 = '#3B9FCB'
SHADE_20 = '#338CB2'
SHADE_60 = '#19475A'
class schrodinger.ui.qt.standard.design_tokens.GrayColors

Bases: object

The hex values for the only gray-scale colors used in PanelX.

WHITE = '#FFFFFF'
GRAY_05 = '#F3F3F3'
GRAY_10 = '#E6E6E6'
GRAY_20 = '#CCCCCC'
GRAY_30 = '#B3B3B3'
GRAY_40 = '#999999'
GRAY_90 = '#191919'
BLACK = '#000000'
class schrodinger.ui.qt.standard.design_tokens.StateColors

Bases: object

Colors for different widget states.

ACTIVE = '#41B1E1'
HOVER = '#A0D7F0'
PRESSED = '#338CB2'
DISABLED = '#B3B3B3'
class schrodinger.ui.qt.standard.design_tokens.TextColors

Bases: object

DEFAULT = '#191919'
LIGHT = '#B3B3B3'
DISABLED = '#CCCCCC'
ACTIVE = '#41B1E1'
HOVER = '#A0D7F0'
PRESSED = '#338CB2'
WHITE = '#FFFFFF'
class schrodinger.ui.qt.standard.design_tokens.ColorGradients

Bases: object

Gradient colors for different widgets

DEFAULT_VERTICAL = 'qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 #41B1E1, stop:1 #3B9FCB)'
DEFAULT_HORIZONTAL = 'qlineargradient(x1:0, y1:0, x2:1, y2:0, stop:0 #41B1E1, stop:1 #3B9FCB)'
HOVER_VERTICAL = 'qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 #A0D7F0, stop:1 #41B1E1)'
HOVER_HORIZONTAL = 'qlineargradient(x1:0, y1:0, x2:1, y2:0, stop:0 #A0D7F0, stop:1 #41B1E1)'
PRESSED_VERTICAL = 'qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 #338CB2, stop:1 #19475A)'
PRESSED_HORIZONTAL = 'qlineargradient(x1:0, y1:0, x2:1, y2:0, stop:0 #338CB2, stop:1 #19475A)'
class schrodinger.ui.qt.standard.design_tokens.BorderColors

Bases: object

Colors for widget borders.

ACTIVE = '#41B1E1'
DEFAULT = '#CCCCCC'
HOVER = '#A0D7F0'
PRESSED = '#338CB2'
DISABLED = '#B3B3B3'
class schrodinger.ui.qt.standard.design_tokens.BackgroundColors

Bases: object

Colors for widget backgrounds.

WHITE = '#FFFFFF'
PANEL = '#F3F3F3'
DISABLED_FORM_FIELD = '#F3F3F3'
DISABLED_BUTTON = '#E6E6E6'
class schrodinger.ui.qt.standard.design_tokens.FontSizes

Bases: object

DEFAULT = 12
MD = 20
LG = 26
XL = 28
class schrodinger.ui.qt.standard.design_tokens.FontWeights

Bases: object

DEFAULT = 400
BOLD = 600
class schrodinger.ui.qt.standard.design_tokens.BorderSizes

Bases: object

DEFAULT = 1
class schrodinger.ui.qt.standard.design_tokens.PaddingSizes

Bases: object

VERT_NO_BORDER = 5
VERT_W_BORDER = 4
class schrodinger.ui.qt.standard.design_tokens.CheckboxIcons

Bases: object

Resources for Checkbox widgets

UNCHECKED_DEFAULT = PosixPath('/scr/buildbot/savedbuilds/2024-4/NB/build-117/internal/lib/python3.11/site-packages/schrodinger/ui/qt/standard/_panelx_icons/QCheckBox/unchecked.png')
UNCHECKED_HOVER = PosixPath('/scr/buildbot/savedbuilds/2024-4/NB/build-117/internal/lib/python3.11/site-packages/schrodinger/ui/qt/standard/_panelx_icons/QCheckBox/unchecked_hover.png')
UNCHECKED_PRESSED = PosixPath('/scr/buildbot/savedbuilds/2024-4/NB/build-117/internal/lib/python3.11/site-packages/schrodinger/ui/qt/standard/_panelx_icons/QCheckBox/unchecked_pressed.png')
UNCHECKED_DISABLED = PosixPath('/scr/buildbot/savedbuilds/2024-4/NB/build-117/internal/lib/python3.11/site-packages/schrodinger/ui/qt/standard/_panelx_icons/QCheckBox/unchecked_disabled.png')
CHECKED_DEFAULT = PosixPath('/scr/buildbot/savedbuilds/2024-4/NB/build-117/internal/lib/python3.11/site-packages/schrodinger/ui/qt/standard/_panelx_icons/QCheckBox/checked.png')
CHECKED_HOVER = PosixPath('/scr/buildbot/savedbuilds/2024-4/NB/build-117/internal/lib/python3.11/site-packages/schrodinger/ui/qt/standard/_panelx_icons/QCheckBox/checked_hover.png')
CHECKED_PRESSED = PosixPath('/scr/buildbot/savedbuilds/2024-4/NB/build-117/internal/lib/python3.11/site-packages/schrodinger/ui/qt/standard/_panelx_icons/QCheckBox/checked_pressed.png')
CHECKED_DISABLED = PosixPath('/scr/buildbot/savedbuilds/2024-4/NB/build-117/internal/lib/python3.11/site-packages/schrodinger/ui/qt/standard/_panelx_icons/QCheckBox/checked_disabled.png')
IND_DEFAULT = PosixPath('/scr/buildbot/savedbuilds/2024-4/NB/build-117/internal/lib/python3.11/site-packages/schrodinger/ui/qt/standard/_panelx_icons/QCheckBox/indeterminate.png')
IND_HOVER = PosixPath('/scr/buildbot/savedbuilds/2024-4/NB/build-117/internal/lib/python3.11/site-packages/schrodinger/ui/qt/standard/_panelx_icons/QCheckBox/indeterminate_hover.png')
IND_PRESSED = PosixPath('/scr/buildbot/savedbuilds/2024-4/NB/build-117/internal/lib/python3.11/site-packages/schrodinger/ui/qt/standard/_panelx_icons/QCheckBox/indeterminate_pressed.png')
IND_DISABLED = PosixPath('/scr/buildbot/savedbuilds/2024-4/NB/build-117/internal/lib/python3.11/site-packages/schrodinger/ui/qt/standard/_panelx_icons/QCheckBox/indeterminate_disabled.png')
class schrodinger.ui.qt.standard.design_tokens.RadioButtonIcons

Bases: object

Resources for Radio Button widgets

UNCHECKED_DEFAULT = PosixPath('/scr/buildbot/savedbuilds/2024-4/NB/build-117/internal/lib/python3.11/site-packages/schrodinger/ui/qt/standard/_panelx_icons/QRadioButton/unselected.png')
UNCHECKED_HOVER = PosixPath('/scr/buildbot/savedbuilds/2024-4/NB/build-117/internal/lib/python3.11/site-packages/schrodinger/ui/qt/standard/_panelx_icons/QRadioButton/unselected_hover.png')
UNCHECKED_PRESSED = PosixPath('/scr/buildbot/savedbuilds/2024-4/NB/build-117/internal/lib/python3.11/site-packages/schrodinger/ui/qt/standard/_panelx_icons/QRadioButton/unselected_pressed.png')
UNCHECKED_DISABLED = PosixPath('/scr/buildbot/savedbuilds/2024-4/NB/build-117/internal/lib/python3.11/site-packages/schrodinger/ui/qt/standard/_panelx_icons/QRadioButton/unselected_disabled.png')
CHECKED_DEFAULT = PosixPath('/scr/buildbot/savedbuilds/2024-4/NB/build-117/internal/lib/python3.11/site-packages/schrodinger/ui/qt/standard/_panelx_icons/QRadioButton/selected.png')
CHECKED_HOVER = PosixPath('/scr/buildbot/savedbuilds/2024-4/NB/build-117/internal/lib/python3.11/site-packages/schrodinger/ui/qt/standard/_panelx_icons/QRadioButton/selected_hover.png')
CHECKED_PRESSED = PosixPath('/scr/buildbot/savedbuilds/2024-4/NB/build-117/internal/lib/python3.11/site-packages/schrodinger/ui/qt/standard/_panelx_icons/QRadioButton/selected_pressed.png')
CHECKED_DISABLED = PosixPath('/scr/buildbot/savedbuilds/2024-4/NB/build-117/internal/lib/python3.11/site-packages/schrodinger/ui/qt/standard/_panelx_icons/QRadioButton/selected_disabled.png')
class schrodinger.ui.qt.standard.design_tokens.ScrollbarIcons

Bases: object

Resources for Scrollbar widgets

UP_ARROW = PosixPath('/scr/buildbot/savedbuilds/2024-4/NB/build-117/internal/lib/python3.11/site-packages/schrodinger/ui/qt/standard/_panelx_icons/QScrollBar/up_arrow.png')
DOWN_ARROW = PosixPath('/scr/buildbot/savedbuilds/2024-4/NB/build-117/internal/lib/python3.11/site-packages/schrodinger/ui/qt/standard/_panelx_icons/QScrollBar/down_arrow.png')
LEFT_ARROW = PosixPath('/scr/buildbot/savedbuilds/2024-4/NB/build-117/internal/lib/python3.11/site-packages/schrodinger/ui/qt/standard/_panelx_icons/QScrollBar/left_arrow.png')
RIGHT_ARROW = PosixPath('/scr/buildbot/savedbuilds/2024-4/NB/build-117/internal/lib/python3.11/site-packages/schrodinger/ui/qt/standard/_panelx_icons/QScrollBar/right_arrow.png')
class schrodinger.ui.qt.standard.design_tokens.QSliderIcons

Bases: object

Resources for QSlider widgets

HANDLE_ENABLED = PosixPath('/scr/buildbot/savedbuilds/2024-4/NB/build-117/internal/lib/python3.11/site-packages/schrodinger/ui/qt/standard/_panelx_icons/QSlider/handle_enabled.png')
HANDLE_DISABLED = PosixPath('/scr/buildbot/savedbuilds/2024-4/NB/build-117/internal/lib/python3.11/site-packages/schrodinger/ui/qt/standard/_panelx_icons/QSlider/handle_disabled.png')
HANDLE_HOVER = PosixPath('/scr/buildbot/savedbuilds/2024-4/NB/build-117/internal/lib/python3.11/site-packages/schrodinger/ui/qt/standard/_panelx_icons/QSlider/handle_hover.png')
HANDLE_PRESSED = PosixPath('/scr/buildbot/savedbuilds/2024-4/NB/build-117/internal/lib/python3.11/site-packages/schrodinger/ui/qt/standard/_panelx_icons/QSlider/handle_pressed.png')
class schrodinger.ui.qt.standard.design_tokens.GeneralIcons

Bases: object

General Icon Resources

MOVE_UP_LB = '/scr/buildbot/savedbuilds/2024-4/NB/build-117/internal/lib/python3.11/site-packages/schrodinger/ui/qt/standard/icons/icon_data/move-up/move-up_lb.png'
MOVE_DOWN_LB = '/scr/buildbot/savedbuilds/2024-4/NB/build-117/internal/lib/python3.11/site-packages/schrodinger/ui/qt/standard/icons/icon_data/move-down/move-down_lb.png'
class schrodinger.ui.qt.standard.design_tokens.PropertyNames(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: enum.StrEnum

Names for QProperty fields to assign to widgets for PanelX styling.

BUTTON_TYPE = 'button_type'
class schrodinger.ui.qt.standard.design_tokens.ButtonTypes(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: enum.StrEnum

Button types for PanelX button-derived widgets.

PRIMARY_BUTTON = 'primary_button'
SECONDARY_BUTTON = 'secondary_button'
DROPDOWN_BUTTON = 'dropdown_button'
schrodinger.ui.qt.standard.design_tokens.pascal_case_to_snake(name)

Return a fully-capitalized snake case version of the input string written in pascal case e.g:

TextInPascalCase -> TEXT_IN_PASCAL_CASE
Parameters

name (str) – Input to convert to snake case

Return type

str

schrodinger.ui.qt.standard.design_tokens.derive_token_name(cls, member)

Return a formatted version of a token name connecting an attribute to its parent class.

Classes and attributes passed through this particular function will be parsed into the following pattern e.g:

TokenClass.Attribute -> TOKEN_CLASS_ATTRIBUTE
schrodinger.ui.qt.standard.design_tokens.get_public_class_tokens_by_name(cls: type) dict[str, Any]

Returns a dictionary which maps class token attributes to their corresponding values.

Classes and attributes passed through this particular function should be parsed into the pattern e.g:

TokenClass.Attribute = "foo" -> {'TOKEN_CLASS_ATTRIBUTE': "foo"}
Parameters

cls – A token class

schrodinger.ui.qt.standard.design_tokens.get_tokens_by_name()

Return a dictionary mapping dynamically generated keys to their corresponding token values.

The stylesheet used by PanelX is an instance of String’s Template class, which can perform substitutions using values provided by a mappable object. The substitutions require string identifiers declared explicitly or generated dynamically.

This method generates said identifers into a dictionary to be used by the stylesheet at runtime, thus removing the need to otherwise declare tokens by handwriting a dictionary object containing said values.

Return type

dict