schrodinger.ui.qt.style module

Module to manage Schrodinger-wide Qt style sheet. The function apply_style_sheet() will read the

Copyright Schrodinger, LLC. All rights reserved.

schrodinger.ui.qt.style.apply_styles()
schrodinger.ui.qt.style.apply_style_sheet(inmodule=False)

Read the schrodinger-wide style sheet and set that as the Application-level style sheet. If running in Maestro then we don’t bother doing that as Maestro will have already performed this operation.

Parameters:

immodule – True when called from inside style.py. This is the only valid way to call this function

schrodinger.ui.qt.style.get_style_sheet_text(style_file_name)

Return the contents of the style sheet file at $SCHRODINGER/mmshare-v*/data/{style_file_name}.

Parameters:

style_file_name (str) – the name of a .sty file in the mmshare build data directory

Returns:

the contents of the style file, if it can be retrieved

Return type:

str or NoneType

schrodinger.ui.qt.style.apply_legacy_spacing_style(widget)

Attempt to set the legacy spacing style sheet on the supplied widget.

Parameters:

widget (QtWidgets.QWidget) – a widget

schrodinger.ui.qt.style.skip_legacy_spacing_style(widget: QWidget)

Instruct the given widget to ignore legacy spacing styling from the legacy spacing style sheet.

Parameters:

widget – a widget