yasmin_editor.editor_gui.runtime_ui module

Runtime presentation helpers shared by the editor runtime UI.

The runtime mixin contains the window-orchestration code, but the color and formatting rules used by the runtime badge, runtime log, and runtime buttons are easier to maintain as small pure helpers. Keeping these rules in one module also makes them directly unit-testable without driving a live editor window.

class yasmin_editor.editor_gui.runtime_ui.ColorToken

Bases: str

Tiny color wrapper that mirrors the QColor.name() API used in tests.

name() str
class yasmin_editor.editor_gui.runtime_ui.RuntimePaletteTokens(text_primary: str, ui_input_bg: str, ui_button_bg: str, ui_border: str, ui_selection_bg: str, ui_selection_text: str, runtime_mode_button_bg: str, runtime_mode_button_text: str, runtime_canvas_border: str, runtime_log_default: str, runtime_log_status: str, runtime_log_info: str, runtime_log_debug: str, runtime_log_warn: str, runtime_log_error: str, runtime_log_system: str)

Bases: object

Palette subset needed by the runtime UI helpers.

runtime_canvas_border: str
runtime_log_debug: str
runtime_log_default: str
runtime_log_error: str
runtime_log_info: str
runtime_log_status: str
runtime_log_system: str
runtime_log_warn: str
runtime_mode_button_bg: str
runtime_mode_button_text: str
text_primary: str
ui_border: str
ui_button_bg: str
ui_input_bg: str
ui_selection_bg: str
ui_selection_text: str
yasmin_editor.editor_gui.runtime_ui.format_runtime_log_entry(message: str) str

Convert a runtime log message into the styled HTML fragment shown in the UI.

yasmin_editor.editor_gui.runtime_ui.runtime_canvas_frame_style(border_width: int, border_color) str

Return the stylesheet for the canvas frame shown around the editor scene.

yasmin_editor.editor_gui.runtime_ui.runtime_log_line_color(message: str) str

Return the configured HTML color for one runtime log line.

yasmin_editor.editor_gui.runtime_ui.runtime_log_view_style() str

Return the stylesheet used by the runtime log widget.

yasmin_editor.editor_gui.runtime_ui.runtime_mode_button_style(active: bool) str

Return the stylesheet for the main runtime-mode toolbar button.

yasmin_editor.editor_gui.runtime_ui.runtime_status_badge_colors(status: str)

Return background, foreground, and border colors for a status badge.

yasmin_editor.editor_gui.runtime_ui.runtime_status_badge_style(status: str) str

Return the stylesheet used by the runtime status badge.

yasmin_editor.editor_gui.runtime_ui.runtime_toggle_button_style(checked: bool) str

Return the stylesheet for the auto-follow style toggle buttons.