"""
Shared restrained editor chrome (UI_CRITIQUE).
Grey idle borders and soft sliders; accent only for focus / active states.
Used app-wide via Theme.apply_editor_style; MidiPlayer/Pattern subclass this.
"""
from __future__ import annotations
import tempfile
from functools import lru_cache
from pathlib import Path
from typing import Optional
from PySide6.QtCore import QMargins
from jdxi_editor.ui.style.factory import generate_section_group_style
@lru_cache(maxsize=None)
[docs]
def _icon_file(name: str, color: str, size: int = 12) -> str:
"""
A qtawesome icon saved as PNG, for stylesheet ``image: url(...)``.
Style sheets can only use image files; this draws the icon once per run
(needs a QApplication) into the temp folder.
"""
import qtawesome as qta
folder = Path(tempfile.gettempdir()) / "jdxi_editor_icons"
folder.mkdir(parents=True, exist_ok=True)
path = folder / f"{name.replace('.', '_')}_{color.lstrip('#')}_{size}.png"
if not path.exists():
qta.icon(name, color=color).pixmap(size, size).save(str(path))
return path.as_posix()
# The JD-Xi's finish: rough matte black body (reads as dark grey) with a
# shiny black panel where the controls are
[docs]
BODY_COLOR = "#2C2C2C"
[docs]
BODY_GRAIN = 7 # +/- grey levels of texture noise
[docs]
BODY_PROPERTY = "jdxiBody" # set on an editor's root widget (see mark_editor_body)
[docs]
FLAT_PROPERTY = "jdxiFlat" # set on a tab stack nested in a glossy panel (see mark_flat)
[docs]
SHEEN_PROPERTY = "jdxiSheen" # set on an editor's outermost panels (see mark_sheen_panels)
[docs]
SHEEN_SLICE = 3 # px of the panel image kept unstretched at each edge (rim, top highlight)
# The bottom edge keeps more, so a skin can put a stripe there and have it
# drawn at its own size rather than squashed with the stretched middle
# The top edge keeps more than the sides, so a skin can put a header bar
# there and have it drawn at its own size rather than stretched with the
# middle. The Jupiter-8's red section bars need it; the others just draw
# their highlight in the first row or two of it.
# Marks the trailing block of the stylesheet that belongs to the skin: the
# lettering printed on the faceplate. Kept last so it overrides the rules
# above it, and so switching skin can rewrite it without touching the rest.
[docs]
CHASSIS_MARKER = "/* chassis lettering */"
#: Marks a stylesheet as the faceplate's, so that changing skin can rebuild
#: it. The panel's sheets are set on the widgets themselves and so override
#: the application's, which is where :func:`chassis_rules` letters everything
#: else; without a mark there is no way to tell one of them from any other
#: widget stylesheet during the walk in ``_restyle_application``.
[docs]
PANEL_MARKER = "/* panel lettering */"
#: Set on a faceplate label, holding the style it was given. The legend
#: styles name their colour themselves -- and name more than one red
#: (``FONT_RED`` for most, ``METALLIC_RED`` for the part names) -- so the ink
#: is overridden rather than substituted, and the style as given is kept here
#: so a change of skin can letter it again.
[docs]
PANEL_BASE = "jdxiPanelBase"
#: Set on a faceplate heading, holding the style it was given. Headings are
#: kept apart from :data:`PANEL_BASE` because they are rebuilt differently: a
#: heading takes the skin's ink *and* its heading background.
[docs]
PANEL_HEADING_BASE = "jdxiPanelHeadingBase"
#: Set beside it when the heading belongs on the skin's second bar.
[docs]
PANEL_HEADING_ALT = "jdxiPanelHeadingAlt"
#: Room around a heading's text, so its background reads as a bar across the
#: section rather than a tint behind the letters.
[docs]
HEADING_PADDING = "1px 6px"
[docs]
def in_panel_heading_background_ink(base: str, alt: bool = False) -> str:
"""
*base*, as a section heading in the active skin's colours.
The Juno-106 names each section in white reversed out of a coloured bar;
the JD-Xi prints its headings straight on the panel. A skin that gives no
heading background is therefore left exactly as it was, and the headings
stay whatever their own style says.
Both colours are appended rather than substituted: these styles are plain
declaration blocks, so the last declaration wins, whichever the style
named.
:param base: str the style as written
:param alt: bool the skin's second bar rather than its first
:return: str
"""
from jdxi_editor.ui.style.rack_skin import active_skin
skin = active_skin()
attribute = "panel_heading_background_alt" if alt else "panel_heading_background"
background = getattr(skin, attribute, None)
if not background:
return base # this skin has no bar: leave the heading be
ink = getattr(skin, "panel_text", None)
colour = f"\n color: {ink};" if ink else ""
return (
f"{base}{colour}"
f"\n background-color: {background};"
f"\n padding: {HEADING_PADDING};"
)
[docs]
def panel_heading_background_ink (
widget: "QWidget", base: str, alt: bool = False
) -> None:
"""
Make *widget* a section heading in the active skin's colours.
:param widget: QWidget a heading on the faceplate
:param base: str the style it would otherwise have been given
:param alt: bool the skin's second bar rather than its first
:return: None
"""
widget.setProperty(PANEL_HEADING_BASE, base)
widget.setProperty(PANEL_HEADING_ALT, alt)
widget.setStyleSheet(in_panel_heading_background_ink(base, alt))
[docs]
def in_panel_ink(base: str) -> str:
"""
*base*, lettered in the active skin's panel ink.
The colour is appended rather than replaced: these styles are plain
declaration blocks, so the last ``color`` wins, whichever the style named.
:param base: str the style as written
:return: str
"""
from jdxi_editor.ui.style.rack_skin import active_skin
ink = getattr(active_skin(), "panel_text", None)
if not ink:
return base # the skin letters nothing of its own: leave the style be
return f"{base}\n color: {ink};"
[docs]
def panel_ink(widget: "QWidget", base: str) -> None:
"""
Letter *widget* with *base* in the active skin's ink, and remember how.
:param widget: QWidget a label on the faceplate
:param base: str the style it would otherwise have been given
:return: None
"""
widget.setProperty(PANEL_BASE, base)
widget.setStyleSheet(in_panel_ink(base))
[docs]
def panel_rules() -> str:
"""
The faceplate's chrome: transparent, and lettered in the active skin's ink.
The legends on the instrument panel used to be the JD-Xi's red whatever
skin was chosen, because the colour was written into the stylesheet rather
than taken from the skin. Red lettering is the JD-Xi's own mark; on the
Juno's slate panel the legends are white, and its red belongs to the bar
behind a section name.
Only the lettering follows the skin here. The buttons' border and hover
keep the accent they had, which each skin already sets as its chassis
accent.
:return: str stylesheet rules, led by :data:`PANEL_MARKER`
"""
from jdxi_editor.ui.style.jdxi import JDXiUIStyle
from jdxi_editor.ui.style.rack_skin import active_skin
ink = getattr(active_skin(), "panel_text", None) or JDXiUIStyle.FONT_RED
return f"""{PANEL_MARKER}
QMainWindow, QWidget, QMenuBar {{
background-color: transparent;
color: {ink};
}}
QSlider {{
border: #333333;
}}
QPushButton {{
background-color: transparent;
border: 1px solid red;
color: {ink};
}}
QPushButton:hover {{
background: qlineargradient(x1:0, y1:0, x2:0, y2:1,
stop:0 #660000, stop:1 #ff1a1a);
}}
QStatusBar {{
background-color: transparent;
color: {ink};
}}
"""
[docs]
GLOSS_GRADIENT = (
"qlineargradient(x1:0, y1:0, x2:0, y2:1,"
" stop:0 #161618, stop:0.5 #0A0A0B, stop:1 #050506)"
)
[docs]
def body_texture(width: int, height: int, seed: int = 7, color: Optional[str] = None):
"""
QImage of the matte body: *color* (the active skin's) with fine grain.
:param width: int image width
:param height: int image height
:param seed: int grain seed, so the body is the same every run
:param color: Optional[str] body colour; the active skin's when omitted
"""
import numpy as np
from PySide6.QtGui import QColor, QImage
if color is None:
from jdxi_editor.ui.style.rack_skin import active_skin
color = active_skin().chassis.body
rng = np.random.default_rng(seed) # the same grain every run
base = QColor(color).red()
colour = QColor(color)
grain = rng.integers(-BODY_GRAIN, BODY_GRAIN + 1, size=(height, width))
red = np.clip(colour.red() + grain, 0, 255).astype(np.uint32)
green = np.clip(colour.green() + grain, 0, 255).astype(np.uint32)
blue = np.clip(colour.blue() + grain, 0, 255).astype(np.uint32)
argb = np.ascontiguousarray((0xFF << 24) | (red << 16) | (green << 8) | blue)
image = QImage(argb.data, width, height, width * 4, QImage.Format.Format_RGB32)
return image.copy() # own the pixels (the numpy buffer goes away)
@lru_cache(maxsize=None)
[docs]
def _body_grain_file(size: int = 128, color: Optional[str] = None) -> str:
"""
A tile of the body texture as PNG, for stylesheet background-image.
:param size: int tile size in px
:param color: Optional[str] body colour; the active skin's when omitted
"""
if color is None:
from jdxi_editor.ui.style.rack_skin import active_skin
color = active_skin().chassis.body
folder = Path(tempfile.gettempdir()) / "jdxi_editor_icons"
folder.mkdir(parents=True, exist_ok=True)
path = folder / f"body_grain_{color.lstrip('#')}_{BODY_GRAIN}_{size}.png"
body_texture(size, size, color=color).save(str(path))
return path.as_posix()
[docs]
def mark_editor_body(widget) -> None:
"""Paint *widget* (an editor's root) with the matte body finish."""
from PySide6.QtCore import Qt
widget.setProperty(BODY_PROPERTY, True)
widget.setAttribute(Qt.WidgetAttribute.WA_StyledBackground, True)
@lru_cache(maxsize=None)
[docs]
def gloss_panel_file(width: int = 1000, height: int = 420) -> str:
"""
The active skin's faceplate as PNG, for stylesheet border-image on editor
panels.
The default skin is the Instrument window's glossy panel (gradient,
diagonal sheen, rim and top highlight), so this is unchanged until another
skin is chosen; see :mod:`jdxi_editor.ui.style.rack_skin`.
"""
from PySide6.QtCore import QRectF, Qt
from PySide6.QtGui import QImage, QPainter
from jdxi_editor.ui.style.rack_skin import active_skin
skin = active_skin()
folder = Path(tempfile.gettempdir()) / "jdxi_editor_icons"
folder.mkdir(parents=True, exist_ok=True)
# The skin is part of the name, so one skin cannot read another's image
# back out of the folder
path = folder / f"gloss_panel_{skin.skin_id}_{width}x{height}.png"
# Always rendered, never reused from disk: the file outlives the run, so
# a skin whose painting changed would otherwise keep serving the old
# image for ever. The lru_cache already keeps it to once per skin per run.
image = QImage(width, height, QImage.Format.Format_ARGB32_Premultiplied)
image.fill(Qt.GlobalColor.transparent)
painter = QPainter(image)
painter.setRenderHint(QPainter.RenderHint.Antialiasing)
skin.paint_face(painter, QRectF(0.5, 0.5, width - 1, height - 1))
painter.end()
image.save(str(path))
return path.as_posix()
#: The previous name, kept for anything still calling it
[docs]
_gloss_panel_file = gloss_panel_file
[docs]
def chassis_rules() -> str:
"""
Everything in the chrome that belongs to the active skin: the body the
editors are mounted on, the tabs standing on it, and the lettering
printed on the faceplate.
These are gathered in one trailing block, after the rules they override,
for two reasons. Changing skin can then rewrite the block wholesale
instead of trying to substitute colours in place, which would also catch
the controls; and it keeps the skin's reach in one readable place.
Only labels and group text take the faceplate's lettering: tabs, fields
and lists are control surfaces standing on the panel, and keep dark
backgrounds with light text whatever the chassis is made of. A pale skin
therefore needs this rather than an inverted palette.
A skin that prints ink legends (the brushed plate) also overrides the
section rule and title here, which are otherwise the accent. One that
mounts its controls shades idle buttons as caps and combo boxes as
wells. Checked and focused states are left alone, so a lamp stays red.
:return: str stylesheet rules, led by :data:`CHASSIS_MARKER`
"""
from jdxi_editor.ui.style.rack_skin import active_skin
skin = active_skin()
chassis = skin.chassis
grain = _body_grain_file(color=chassis.body)
plate = ""
if skin.ink_legends:
plate += f"""
QGroupBox {{ border-top: 1px solid {skin.foreground.rule}; }}
QGroupBox::title {{ color: {skin.foreground.text}; }}"""
if skin.mounted_controls:
# Idle only. :checked and :focus stay with the rules above, so Play
# and a focused field keep the red lamp.
plate += """
QPushButton {
background: qlineargradient(x1:0, y1:0, x2:0, y2:1,
stop:0 #4A4A46, stop:0.45 #2A2A28, stop:1 #121210);
border: 1px solid #121210;
}
QComboBox {
border-top: 1px solid #0E0E0C;
border-left: 1px solid #0E0E0C;
border-right: 1px solid #6E6E68;
border-bottom: 1px solid #8A8A82;
}"""
return f"""{CHASSIS_MARKER}
QLabel, QGroupBox {{ color: {skin.foreground.text}; }}
QWidget[{BODY_PROPERTY}="true"] {{
background-color: {chassis.body};
background-image: url({grain});
}}
QAbstractItemView, QTextEdit, QPlainTextEdit, QMenu, QToolTip {{
background-color: {chassis.surface};
}}
QTabBar::tab {{
background-color: {chassis.surface_alt};
color: {AppEditorStyle.TEXT_SECONDARY};
}}
QTabBar::tab:selected {{
background-color: {chassis.surface};
color: {AppEditorStyle.TEXT};
border-bottom: 2px solid {chassis.accent};
}}
QTabBar::tab:hover {{
color: {AppEditorStyle.TEXT};
border-bottom: 2px solid {chassis.accent};
}}
QTabWidget::pane {{ border: 1px solid {chassis.border}; }}{plate}"""
[docs]
def mark_sheen_panels(editor) -> None:
"""
Give *editor*'s outermost panels (tab panes and groups not inside another
one) the Instrument window's glossy sheen. Panels inside them keep the
plain gradient, so the reflection is not repeated.
"""
from PySide6.QtWidgets import QGroupBox, QTabWidget, QWidget
from jdxi_editor.ui.widgets.rack.panel import RackPanel
# A RackPanel is the faceplate (it paints its own cheeks), so the groups
# inside it stay flat sections and do not take the sheen image as well.
panel_types = (QGroupBox, QTabWidget, RackPanel)
for widget in editor.findChildren(QWidget):
if not isinstance(widget, panel_types) or widget.property(FLAT_PROPERTY):
continue
parent = widget.parentWidget()
while parent is not None and parent is not editor:
if isinstance(parent, panel_types):
break
parent = parent.parentWidget()
if parent is editor:
mark_sheen(widget)
[docs]
def mark_sheen(widget) -> None:
"""Give *widget* (a QGroupBox or QTabWidget panel) the Instrument window's glossy sheen."""
widget.setProperty(SHEEN_PROPERTY, True)
widget.style().unpolish(widget)
widget.style().polish(widget)
[docs]
def mark_flat(widget) -> None:
"""
Draw the groups inside *widget* (nested in a glossy panel) flat on that
panel, as sections; a tab widget's pane is drawn flat too.
"""
widget.setProperty(FLAT_PROPERTY, True)
widget.style().unpolish(widget)
widget.style().polish(widget)
[docs]
def _jdxi_slider_rules(analog: bool = False) -> str:
"""
The one slider look (both orientations): black handle with a neon border,
dark groove, filled part in a neon gradient. Red, or the Analog neon blue.
Vertical rules are the same as JDXiUIStyle.ADSR / ADSR_ANALOG, which the
synth sections apply, so every slider of a kind looks alike.
"""
from jdxi_editor.ui.style.jdxi import JDXiUIStyle as S
neon = S.SLIDER_NEON_ANALOG if analog else S.SLIDER_NEON
stop = S.SLIDER_NEON_GRADIENT_STOP_ANALOG if analog else S.SLIDER_NEON_GRADIENT_STOP
hover = "#3399ff" if analog else "#ff3333"
return f"""
QSlider::groove:vertical {{
background: #111;
width: 6px;
border-radius: 3px;
}}
QSlider::handle:vertical {{
background: black;
border: 2px solid {neon};
width: 10px;
height: 10px;
margin: -8px;
margin-bottom: 2px;
margin-top: 1px; /* else a handle at maximum is clipped at the top */
}}
QSlider::handle:vertical:hover {{
border: 2px solid {hover};
background: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 {stop}, stop:1 {neon});
}}
QSlider::sub-page:vertical {{
background: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 {stop}, stop:1 {neon});
border-radius: 3px;
}}
QSlider::add-page:vertical {{
background: #222;
border-radius: 3px;
}}
QSlider::groove:horizontal {{
background: #111;
height: 6px;
border-radius: 3px;
}}
QSlider::handle:horizontal {{
background: black;
border: 2px solid {neon};
width: 10px;
height: 10px;
margin: -4px 0;
}}
QSlider::handle:horizontal:hover {{
border: 2px solid {hover};
background: qlineargradient(x1:0, y1:0, x2:1, y2:0, stop:0 {stop}, stop:1 {neon});
}}
QSlider::sub-page:horizontal {{
background: qlineargradient(x1:0, y1:0, x2:1, y2:0, stop:0 {stop}, stop:1 {neon});
border-radius: 3px;
}}
QSlider::add-page:horizontal {{
background: #222;
border-radius: 3px;
}}
QSlider::handle:disabled {{
border: 2px solid #333333;
}}
QSlider::sub-page:disabled {{
background: #333333;
}}
"""
[docs]
class AppEditorStyle:
"""Design tokens + chrome stylesheet for all editors."""
[docs]
SURFACE_ALT = "#292929"
[docs]
BORDER_HOVER = "#555555"
# JD-Xi identity: metallic for sections, illuminated for active, LCD for displays
[docs]
ACCENT = "#E04435" # illuminated red (active / focus)
[docs]
ACCENT_HOVER = "#F05A5A"
[docs]
LCD_ORANGE_DIM = "#CC5500"
[docs]
LCD_BG_EDGE = "#1A0A0A"
[docs]
LCD_BG_GLOW = "#551100"
[docs]
TEXT_SECONDARY = "#999999"
[docs]
FONT_TRACK_NAME = "12px"
[docs]
FONT_TRACK_SECONDARY = "10px"
[docs]
MARGINS = QMargins(0, 0, 0, 0)
@classmethod
[docs]
def editor_stylesheet(cls, *, accent: Optional[str] = None) -> str:
"""
Restrained editor chrome.
GroupBoxes are JD-Xi sections: centred title over one rule, in the accent.
``accent`` tints focus/hover/checked only (e.g. Analog cyan).
"""
focus = accent or cls.ACCENT
# Prefer a lighter hover when using default red; otherwise reuse accent
hover = cls.ACCENT_HOVER if accent is None else accent
# Section chrome uses metallic red for selected tab underline (digital path)
section = accent or cls.METALLIC_RED
# The panel behind an editor's outermost groups comes from the active
# skin, which also says how much of its edge must not be stretched
# Every skin keeps its rim inside the same slice, so switching skin is
# only a change of image (see rack_skin._restyle_application)
panel_slice = SHEEN_SLICE
panel_slice_top = SHEEN_SLICE_TOP
panel_slice_bottom = SHEEN_SLICE_BOTTOM
panel_image = gloss_panel_file()
chassis = chassis_rules()
return f"""
/* JD-Xi finish: the editor's root is the rough matte body; panels
(group boxes, tab panes) are glossy black; everything between is
transparent so the finish shows through */
QWidget {{
background-color: transparent;
color: {cls.TEXT};
font-size: {cls.FONT_CONTROL};
}}
QWidget[{BODY_PROPERTY}="true"] {{
background-color: {BODY_COLOR};
background-image: url({_body_grain_file()});
}}
QAbstractItemView, QTextEdit, QPlainTextEdit, QMenu, QToolTip {{
background-color: {cls.SURFACE};
}}
/* Groups are sections printed on the panel, as on the JD-Xi: the
title centred in the section colour over one rule; no box */
{generate_section_group_style(focus)}
QGroupBox {{
font-size: {cls.FONT_PANEL};
color: {cls.TEXT};
}}
QLabel {{
color: {cls.TEXT};
font-size: {cls.FONT_CONTROL};
}}
{_jdxi_slider_rules(analog=accent is not None)}
QCheckBox::indicator:checked {{
border: 2px solid {focus};
}}
QLineEdit {{
background-color: {cls.SURFACE_ALT};
border: 1px solid {cls.BORDER};
border-radius: 3px;
color: {cls.TEXT};
padding: 2px 4px;
font-size: {cls.FONT_TRACK_NAME};
}}
QLineEdit:focus {{
border-color: {focus};
}}
/* Plain buttons (round JD-Xi buttons style themselves) */
QPushButton {{
background-color: {cls.SURFACE_ALT};
border: 1px solid {cls.BORDER};
border-radius: 3px;
padding: 3px 8px;
color: {cls.TEXT};
}}
QPushButton:hover {{
border-color: {cls.BORDER_HOVER};
}}
QPushButton:pressed {{
background-color: {cls.SURFACE};
}}
QPushButton:disabled {{
color: {cls.TEXT_SECONDARY};
}}
QComboBox {{
background-color: {cls.SURFACE_ALT};
border: 1px solid {cls.BORDER};
border-radius: 3px;
padding: 2px 6px;
color: {cls.TEXT};
}}
QComboBox:hover {{
border-color: {cls.BORDER_HOVER};
}}
QComboBox:focus {{
border-color: {focus};
}}
QComboBox::drop-down {{
border: none;
width: 18px;
}}
QComboBox::down-arrow {{
image: url({_icon_file("mdi.chevron-down", cls.TEXT_SECONDARY)});
width: 12px;
height: 12px;
}}
QComboBox::down-arrow:hover, QComboBox::down-arrow:on {{
image: url({_icon_file("mdi.chevron-down", cls.TEXT)});
}}
QComboBox QAbstractItemView {{
background-color: {cls.SURFACE};
border: 1px solid {cls.BORDER};
selection-background-color: {cls.SURFACE_ALT};
selection-color: {cls.TEXT};
}}
QSpinBox, QDoubleSpinBox {{
background-color: {cls.SURFACE_ALT};
border: 1px solid {cls.BORDER};
border-radius: 3px;
padding: 2px 4px;
color: {cls.TEXT};
}}
QSpinBox:focus, QDoubleSpinBox:focus {{
border-color: {focus};
}}
QTabWidget::pane {{
border: 1px solid #000000;
border-top: 1px solid #3A3A3C;
background: {GLOSS_GRADIENT};
}}
/* An editor's outermost panels: the Instrument window's glossy panel */
QGroupBox[{SHEEN_PROPERTY}="true"] {{
margin-top: 4px; /* outer panels are untitled */
padding: {cls.PANEL_PADDING}px;
}}
QGroupBox[{SHEEN_PROPERTY}="true"],
QTabWidget[{SHEEN_PROPERTY}="true"]::pane {{
background: transparent;
border-width: {panel_slice_top}px {panel_slice}px {panel_slice_bottom}px {panel_slice}px;
border-image: url({panel_image}) {panel_slice_top} {panel_slice} {panel_slice_bottom} {panel_slice} stretch stretch;
}}
/* A tab stack marked flat (mark_flat) sits on the glossy panel
around it. Marked explicitly: a descendant selector would also
match every editor, as all of them sit in the main window's tabs. */
QTabWidget[{FLAT_PROPERTY}="true"]::pane {{
background: transparent;
border: none;
border-top: 1px solid #2E2E30;
border-radius: 0;
}}
QTabBar::tab {{
background-color: {cls.SURFACE_ALT};
border: none;
border-bottom: 2px solid transparent;
color: {cls.TEXT_SECONDARY};
padding: 6px 12px;
margin-right: 2px;
}}
QTabBar::tab:selected {{
color: {cls.TEXT};
background-color: {cls.SURFACE};
border-bottom: 2px solid {section};
}}
QTabBar::tab:hover {{
color: {cls.TEXT};
border-bottom: 2px solid {cls.BORDER_HOVER};
}}
/* Thin grey scrollbars */
QScrollBar:horizontal {{
background: {cls.BACKGROUND};
border: none;
height: 10px;
margin: 0;
}}
QScrollBar:vertical {{
background: {cls.BACKGROUND};
border: none;
width: 10px;
margin: 0;
}}
QScrollBar::handle:horizontal, QScrollBar::handle:vertical {{
background: {cls.BORDER};
border: none;
border-radius: 4px;
min-width: 24px;
min-height: 24px;
}}
QScrollBar::handle:hover {{
background: {cls.BORDER_HOVER};
}}
QScrollBar::add-line, QScrollBar::sub-line {{
width: 0;
height: 0;
border: none;
}}
QScrollBar::add-page, QScrollBar::sub-page {{
background: none;
}}
{chassis}
"""
# Alias used as JDXi.UI.EditorStyle
[docs]
EditorStyle = AppEditorStyle