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: PyQt6.QtWidgets.QWidget)

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

Parameters

widget – a widget

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

Apply the PanelX style sheet on the supplied widget and ignore the legacy spacing style sheet.

Parameters

widget (QtWidgets.QWidget) – a widget

schrodinger.ui.qt.style.apply_panelx_combo_settings(combo_box: PyQt6.QtWidgets.QComboBox)

Apply necessary settings for PanelX on the given combo box.

Parameters

combo_box – A QComboBox