DarkModeButton#

class ansys.tools.visualization_interface.backends.pyvista.widgets.dark_mode.DarkModeButton(plotter: ansys.tools.visualization_interface.backends.pyvista.pyvista.Plotter, dark_mode: bool = False)#

Bases: ansys.tools.visualization_interface.backends.pyvista.widgets.widget.PlotterWidget

Provides the dark mode widget for the Visualization Interface Tool Plotter class.

Parameters:
plotter_helperPlotterHelper

Plotter to add the dark mode widget to.

dark_modebool, optional

Whether to activate the dark mode or not.

Overview#

callback

Remove or add the dark mode widget actor upon click.

update

Define the dark mode widget button parameters.

Import detail#

from ansys.tools.visualization_interface.backends.pyvista.widgets.dark_mode import DarkModeButton

Method detail#

DarkModeButton.callback(state: bool) None#

Remove or add the dark mode widget actor upon click.

Parameters:
statebool

Whether the state of the button, which is inherited from PyVista, is active.

DarkModeButton.update() None#

Define the dark mode widget button parameters.