PyTitleBar#

class ansys.aedt.toolkits.common.ui.utils.widgets.py_title_bar.py_title_bar.PyTitleBar(parent, app_parent, logo_image='ansys-primary-logo-white.svg', logo_width=10, dark_one='#1b1e23', bg_color='#343b48', div_color='#3c4454', btn_bg_color='#343b48', btn_bg_color_hover='#3c4454', btn_bg_color_pressed='#2c313c', icon_color='#c3ccdf', icon_color_hover='#dce1ec', icon_color_pressed='#edf0f5', icon_color_active='#f5f6f9', context_color='#6c99f4', text_foreground='#8a95aa', radius=8, font_family='Segoe UI', title_size=10)[source]#

Custom title bar for the application window.

Parameters:
parentQWidget

The parent widget.

app_parentQWidget

The main application window.

logo_imagestr, optional

The path to the logo image file, by default “ansys-primary-logo-white.svg”.

logo_widthint, optional

The width of the logo, by default 10.

dark_onestr, optional

The color for the dark theme, by default “#1b1e23”.

bg_colorstr, optional

The background color, by default “#343b48”.

div_colorstr, optional

The color for dividers, by default “#3c4454”.

btn_bg_colorstr, optional

The background color for buttons, by default “#343b48”.

btn_bg_color_hoverstr, optional

The background color for buttons on hover, by default “#3c4454”.

btn_bg_color_pressedstr, optional

The background color for buttons on pressed state, by default “#2c313c”.

icon_colorstr, optional

The default icon color, by default “#c3ccdf”.

icon_color_hoverstr, optional

The icon color on hover, by default “#dce1ec”.

icon_color_pressedstr, optional

The icon color on pressed state, by default “#edf0f5”.

icon_color_activestr, optional

The icon color for the active state, by default “#f5f6f9”.

context_colorstr, optional

The context color, by default “#6c99f4”.

text_foregroundstr, optional

The text color, by default “#8a95aa”.

radiusint, optional

The border radius, by default 8.

font_familystr, optional

The font family, by default “Segoe UI”.

title_sizeint, optional

The font size for the title, by default 10.

add_menus(parameters)[source]#

Add custom menus to the title bar.

Parameters:
parameterslist of dict

List of dictionaries, each containing information about a menu button. Each dictionary should have the following keys: - btn_icon: str, the icon file for the button. - btn_id: str, the ID of the button. - btn_tooltip: str, the tooltip text for the button. - is_active: bool, whether the button is initially active or not.

btn_clicked()[source]#

Handle the button click event.

btn_released()[source]#

Handle the button release event.

maximize_restore()[source]#

Maximize or restore the application window.

set_title(title)[source]#

Set the title of the application.

Parameters:
titlestr

The title to be set.

setup_ui()[source]#

Set up the user interface for the title bar.