tik_manager4.ui.widgets.common

Common usage basic widgets.

Attributes

BUTTON_STYLE

FONT

Classes

ClickableFrame

Clickable frame widget.

HeaderLabel

Label with bold font and indent.

HorizontalSeparator

Simple horizontal separator.

ResolvedText

Label for resolved paths, names etc.

StyleFrame

Frame with custom styling support.

TikButton

Unified button class for the whole app.

TikButtonBox

Unified button box class for the whole app.

TikIconButton

Button specific for fixed sized icons.

TikLabel

Unified label class for the whole app.

TikLabelButton

Customize the button to be used next to the header.

TikMessageBox

Message box with custom font.

VerticalSeparator

Simple vertical separator.

Functions

lighten_color(color_str[, factor])

Lightens the given color.

Module Contents

class ClickableFrame(*args, **kwargs)

Bases: tik_manager4.ui.Qt.QtWidgets.QFrame

Clickable frame widget.

mousePressEvent(event)
clicked
class HeaderLabel(*args, **kwargs)

Bases: TikLabel

Label with bold font and indent.

set_font_size(font_size, bold=True)
style_sheet = Multiline-String
Show Value
"""
QLabel
{
    background-color: #404040;
    border-width: 1px;
    border-color: #1e1e1e;
    border-style: solid;
    padding: 5px;
    font-size: 12x;
    border-radius: 14px;
}
"""
class HorizontalSeparator(color=(100, 100, 100), height=1, width=None)

Bases: tik_manager4.ui.Qt.QtWidgets.QLabel

Simple horizontal separator.

set_color(color)
class ResolvedText(*args, **kwargs)

Bases: TikLabel

Label for resolved paths, names etc.

set_font_size(font_size, bold=True)
class StyleFrame(*args, **kwargs)

Bases: ClickableFrame

Frame with custom styling support.

set_style(stylesheet)

Set the stylesheet for this frame.

class TikButton(text='', font_size=10, text_color=None, border_color=None, background_color=None, parent=None, **kwargs)

Bases: tik_manager4.ui.Qt.QtWidgets.QPushButton

Unified button class for the whole app.

set_color(text_color=None, background_color=None, border_color=None)

Set the button colors.

Args:

text_color: Color for text (hex string or RGB tuple/list) background_color: Color for background (hex string or RGB tuple/list) border_color: Color for border (hex string or RGB tuple/list)

set_font_size(font_size)
DEFAULT_BACKGROUND_COLOR = '#404040'
DEFAULT_BORDER_COLOR = '#1e1e1e'
DEFAULT_TEXT_COLOR = '#b1b1b1'
class TikButtonBox(*args, font_size=10, **kwargs)

Bases: tik_manager4.ui.Qt.QtWidgets.QDialogButtonBox

Unified button box class for the whole app.

event(event)
modifyButton(button)
set_font_size(font_size)
class TikIconButton(icon_name=None, circle=True, size=22, icon_size=None, *args, **kwargs)

Bases: TikButton

Button specific for fixed sized icons.

set_icon(icon_name)
set_size(size)
static square_to_circle_multiplier(side_length)
class TikLabel(text='', font_size=10, bold=False, color=(255, 255, 255), parent=None, **kwargs)

Bases: tik_manager4.ui.Qt.QtWidgets.QLabel

Unified label class for the whole app.

set_color(text_color=None, background_color=None, border_color=None)

Set the label colors.

Args:

text_color: Color for text (hex string or RGB tuple/list) background_color: Unused, kept for API compatibility border_color: Color for border (hex string or RGB tuple/list)

set_font_size(font_size, bold=False)
set_text(text)
DEFAULT_BORDER_COLOR = '#1e1e1e'
DEFAULT_TEXT_COLOR = '#b1b1b1'
class TikLabelButton(*args, color=(255, 255, 255), **kwargs)

Bases: TikButton

Customize the button to be used next to the header.

set_state_text(checked)
style_sheet = Multiline-String
Show Value
"""
    QPushButton
    {{
        color: {0};
        background-color: #404040;
        border-width: 1px;
        border-color: {0};
        border-style: solid;
        padding: 5px;
        font-size: 12x;
        border-radius: 0px;
    }}"""
class TikMessageBox(*args, font_size=10, **kwargs)

Bases: tik_manager4.ui.Qt.QtWidgets.QMessageBox

Message box with custom font.

set_font_size(font_size)
class VerticalSeparator(color=(100, 100, 100), height=25, width=20)

Bases: tik_manager4.ui.Qt.QtWidgets.QLabel

Simple vertical separator.

set_color(color)
lighten_color(color_str, factor=110)

Lightens the given color.

Args:

color_str (str): The color to lighten as a hex string. factor (int): The percentage to lighten (100 = no change, >100 = lighter, <100 = darker).

Returns:

str: A lighter color as a hex string.

BUTTON_STYLE = Multiline-String
Show Value
"""
QPushButton
{
    color: #b1b1b1;
    background-color: #404040;
    border-width: 1px;
    border-color: #1e1e1e;
    border-style: solid;
    padding: 5px;
    font-size: 12x;
    border-radius: 4px;
}

QPushButton:hover
{
    background-color: #505050;
    border: 1px solid #ff8d1c;
}

QPushButton:hover[circle=true]
{
    background-color: #505050;
    border: 2px solid #ff8d1c;
}

QPushButton:disabled {
    color: #505050;
    background-color: #303030;
    border: 1px solid #404040;
    border-width: 1px;
    border-color: #1e1e1e;
    border-style: solid;
    padding: 5px;
    font-size: 12x;
}

QPushButton:pressed {
  background-color: #ff8d1c;
  border: 1px solid #ff8d1c;
}
"""
FONT = 'Arial'