/* ============================================================================= Catppuccin Mocha Theme for FreeCAD Bundled with ztools addon https://catppuccin.com/ ============================================================================= */ /* ============================================================================= Global Defaults ============================================================================= */ * { color: #cdd6f4; font-family: "Segoe UI", "Ubuntu", "Noto Sans", sans-serif; } QWidget { background-color: #1e1e2e; color: #cdd6f4; selection-background-color: #585b70; selection-color: #cdd6f4; } /* ============================================================================= Main Window and MDI Area ============================================================================= */ QMainWindow { background-color: #181825; } QMainWindow::separator { background-color: #313244; width: 4px; height: 4px; } QMainWindow::separator:hover { background-color: #cba6f7; } QMdiArea { background-color: #11111b; } QMdiSubWindow { background-color: #1e1e2e; border: 1px solid #45475a; } QMdiSubWindow > QWidget { background-color: #1e1e2e; } /* ============================================================================= Menu Bar ============================================================================= */ QMenuBar { background-color: #181825; color: #cdd6f4; border-bottom: 1px solid #313244; padding: 2px; } QMenuBar::item { background-color: transparent; padding: 4px 8px; border-radius: 4px; } QMenuBar::item:selected { background-color: #313244; } QMenuBar::item:pressed { background-color: #45475a; } /* ============================================================================= Menus ============================================================================= */ QMenu { background-color: #313244; color: #cdd6f4; border: 1px solid #45475a; border-radius: 6px; padding: 4px; } QMenu::item { padding: 6px 24px 6px 8px; border-radius: 4px; } QMenu::item:selected { background-color: #45475a; color: #cdd6f4; } QMenu::item:disabled { color: #6c7086; } QMenu::separator { height: 1px; background-color: #45475a; margin: 4px 8px; } QMenu::icon { margin-left: 8px; } QMenu::indicator { width: 16px; height: 16px; margin-left: 4px; } /* ============================================================================= Toolbars ============================================================================= */ QToolBar { background-color: #181825; border: none; spacing: 2px; padding: 2px; } QToolBar::handle { background-color: #45475a; width: 8px; margin: 2px; border-radius: 2px; } QToolBar::handle:horizontal { width: 8px; } QToolBar::handle:vertical { height: 8px; } QToolBar::separator { background-color: #45475a; width: 1px; margin: 4px 2px; } /* ============================================================================= Tool Buttons (Toolbar icons) ============================================================================= */ QToolButton { background-color: transparent; border: 1px solid transparent; border-radius: 4px; padding: 4px; margin: 1px; } QToolButton:hover { background-color: #313244; border: 1px solid #45475a; } QToolButton:pressed { background-color: #45475a; } QToolButton:checked { background-color: #45475a; border: 1px solid #cba6f7; } QToolButton:disabled { color: #6c7086; } QToolButton[popupMode="1"] { padding-right: 16px; } QToolButton::menu-button { border: none; width: 14px; } QToolButton::menu-arrow { width: 10px; height: 10px; } /* ============================================================================= Push Buttons ============================================================================= */ QPushButton { background-color: #313244; color: #cdd6f4; border: 1px solid #45475a; border-radius: 6px; padding: 6px 16px; min-height: 20px; } QPushButton:hover { background-color: #45475a; border-color: #585b70; } QPushButton:pressed { background-color: #585b70; } QPushButton:checked { background-color: #cba6f7; color: #11111b; border-color: #cba6f7; } QPushButton:disabled { background-color: #313244; color: #6c7086; border-color: #313244; } QPushButton:default { border: 2px solid #cba6f7; } /* ============================================================================= Dock Widgets ============================================================================= */ QDockWidget { background-color: #1e1e2e; color: #cdd6f4; titlebar-close-icon: none; titlebar-normal-icon: none; } QDockWidget::title { background-color: #181825; color: #cdd6f4; font-weight: bold; text-align: left; padding: 8px 6px; border-bottom: 1px solid #313244; min-height: 18px; } QDockWidget::close-button, QDockWidget::float-button { background-color: transparent; border: none; padding: 2px; } QDockWidget::close-button:hover, QDockWidget::float-button:hover { background-color: #313244; border-radius: 4px; } /* ============================================================================= Tab Widgets ============================================================================= */ QTabWidget::pane { background-color: #1e1e2e; border: 1px solid #45475a; border-radius: 4px; top: -1px; } QTabBar { background-color: transparent; } QTabBar::tab { background-color: #313244; color: #bac2de; border: 1px solid #45475a; padding: 6px 12px; margin-right: 2px; border-top-left-radius: 6px; border-top-right-radius: 6px; } QTabBar::tab:selected { background-color: #1e1e2e; color: #cdd6f4; border-bottom-color: #1e1e2e; } QTabBar::tab:hover:!selected { background-color: #45475a; color: #cdd6f4; } QTabBar::tab:disabled { color: #6c7086; } QTabBar::close-button { margin-left: 4px; } QTabBar::close-button:hover { background-color: #f38ba8; border-radius: 2px; } /* ============================================================================= Scroll Bars ============================================================================= */ QScrollBar:horizontal { background-color: #181825; height: 12px; margin: 0 12px 0 12px; border-radius: 6px; } QScrollBar:vertical { background-color: #181825; width: 12px; margin: 12px 0 12px 0; border-radius: 6px; } QScrollBar::handle:horizontal { background-color: #45475a; min-width: 20px; border-radius: 5px; margin: 1px; } QScrollBar::handle:vertical { background-color: #45475a; min-height: 20px; border-radius: 5px; margin: 1px; } QScrollBar::handle:horizontal:hover, QScrollBar::handle:vertical:hover { background-color: #585b70; } QScrollBar::add-line:horizontal, QScrollBar::sub-line:horizontal, QScrollBar::add-line:vertical, QScrollBar::sub-line:vertical { width: 12px; height: 12px; background-color: #313244; border-radius: 6px; } QScrollBar::add-line:horizontal:hover, QScrollBar::sub-line:horizontal:hover, QScrollBar::add-line:vertical:hover, QScrollBar::sub-line:vertical:hover { background-color: #45475a; } QScrollBar::add-page:horizontal, QScrollBar::sub-page:horizontal, QScrollBar::add-page:vertical, QScrollBar::sub-page:vertical { background-color: transparent; } /* ============================================================================= Input Fields ============================================================================= */ QLineEdit { background-color: #313244; color: #cdd6f4; border: 1px solid #45475a; border-radius: 4px; padding: 4px 8px; selection-background-color: #cba6f7; selection-color: #11111b; } QLineEdit:focus { border-color: #cba6f7; } QLineEdit:disabled { background-color: #181825; color: #6c7086; } QLineEdit:read-only { background-color: #181825; } QTextEdit, QPlainTextEdit { background-color: #313244; color: #cdd6f4; border: 1px solid #45475a; border-radius: 4px; selection-background-color: #cba6f7; selection-color: #11111b; } QTextEdit:focus, QPlainTextEdit:focus { border-color: #cba6f7; } /* ============================================================================= Spin Boxes ============================================================================= */ QSpinBox, QDoubleSpinBox { background-color: #313244; color: #cdd6f4; border: 1px solid #45475a; border-radius: 4px; padding: 4px; padding-right: 20px; } QSpinBox:focus, QDoubleSpinBox:focus { border-color: #cba6f7; } QSpinBox:disabled, QDoubleSpinBox:disabled { background-color: #181825; color: #6c7086; } QSpinBox::up-button, QDoubleSpinBox::up-button { subcontrol-origin: border; subcontrol-position: top right; width: 16px; border-left: 1px solid #45475a; border-top-right-radius: 4px; background-color: #45475a; } QSpinBox::down-button, QDoubleSpinBox::down-button { subcontrol-origin: border; subcontrol-position: bottom right; width: 16px; border-left: 1px solid #45475a; border-bottom-right-radius: 4px; background-color: #45475a; } QSpinBox::up-button:hover, QDoubleSpinBox::up-button:hover, QSpinBox::down-button:hover, QDoubleSpinBox::down-button:hover { background-color: #585b70; } QSpinBox::up-button:pressed, QDoubleSpinBox::up-button:pressed, QSpinBox::down-button:pressed, QDoubleSpinBox::down-button:pressed { background-color: #cba6f7; } QSpinBox::up-arrow, QDoubleSpinBox::up-arrow { width: 8px; height: 8px; } QSpinBox::down-arrow, QDoubleSpinBox::down-arrow { width: 8px; height: 8px; } /* ============================================================================= Combo Boxes ============================================================================= */ QComboBox { background-color: #313244; color: #cdd6f4; border: 1px solid #45475a; border-radius: 4px; padding: 4px 8px; padding-right: 24px; min-height: 20px; } QComboBox:hover { border-color: #585b70; } QComboBox:focus { border-color: #cba6f7; } QComboBox:disabled { background-color: #181825; color: #6c7086; } QComboBox::drop-down { subcontrol-origin: padding; subcontrol-position: top right; width: 20px; border-left: 1px solid #45475a; border-top-right-radius: 4px; border-bottom-right-radius: 4px; background-color: #45475a; } QComboBox::drop-down:hover { background-color: #585b70; } QComboBox::down-arrow { width: 10px; height: 10px; } QComboBox QAbstractItemView { background-color: #313244; color: #cdd6f4; border: 1px solid #45475a; border-radius: 4px; selection-background-color: #45475a; selection-color: #cdd6f4; outline: none; } QComboBox QAbstractItemView::item { padding: 4px 8px; min-height: 24px; } QComboBox QAbstractItemView::item:hover { background-color: #45475a; } QComboBox QAbstractItemView::item:selected { background-color: #585b70; } /* ============================================================================= Check Boxes ============================================================================= */ QCheckBox { spacing: 8px; color: #cdd6f4; } QCheckBox:disabled { color: #6c7086; } QCheckBox::indicator { width: 18px; height: 18px; border: 2px solid #585b70; border-radius: 4px; background-color: #313244; } QCheckBox::indicator:hover { border-color: #cba6f7; } QCheckBox::indicator:checked { background-color: #cba6f7; border-color: #cba6f7; } QCheckBox::indicator:checked:disabled { background-color: #6c7086; border-color: #6c7086; } QCheckBox::indicator:disabled { background-color: #181825; border-color: #45475a; } /* ============================================================================= Radio Buttons ============================================================================= */ QRadioButton { spacing: 8px; color: #cdd6f4; } QRadioButton:disabled { color: #6c7086; } QRadioButton::indicator { width: 18px; height: 18px; border: 2px solid #585b70; border-radius: 9px; background-color: #313244; } QRadioButton::indicator:hover { border-color: #cba6f7; } QRadioButton::indicator:checked { background-color: #cba6f7; border-color: #cba6f7; } QRadioButton::indicator:checked:disabled { background-color: #6c7086; border-color: #6c7086; } QRadioButton::indicator:disabled { background-color: #181825; border-color: #45475a; } /* ============================================================================= Sliders ============================================================================= */ QSlider::groove:horizontal { height: 6px; background-color: #45475a; border-radius: 3px; } QSlider::groove:vertical { width: 6px; background-color: #45475a; border-radius: 3px; } QSlider::handle:horizontal { width: 16px; height: 16px; margin: -5px 0; background-color: #cba6f7; border-radius: 8px; } QSlider::handle:vertical { width: 16px; height: 16px; margin: 0 -5px; background-color: #cba6f7; border-radius: 8px; } QSlider::handle:horizontal:hover, QSlider::handle:vertical:hover { background-color: #b4befe; } QSlider::handle:horizontal:pressed, QSlider::handle:vertical:pressed { background-color: #f5c2e7; } QSlider::sub-page:horizontal { background-color: #cba6f7; border-radius: 3px; } QSlider::add-page:vertical { background-color: #cba6f7; border-radius: 3px; } /* ============================================================================= Progress Bars ============================================================================= */ QProgressBar { background-color: #313244; color: #cdd6f4; border: 1px solid #45475a; border-radius: 4px; text-align: center; height: 20px; } QProgressBar::chunk { background-color: #cba6f7; border-radius: 3px; } /* ============================================================================= Group Boxes ============================================================================= */ QGroupBox { background-color: #1e1e2e; border: 1px solid #45475a; border-radius: 6px; margin-top: 12px; padding-top: 8px; } QGroupBox::title { subcontrol-origin: margin; subcontrol-position: top left; left: 12px; padding: 0 4px; color: #bac2de; background-color: #1e1e2e; } /* ============================================================================= Tree View ============================================================================= */ QTreeView { background-color: #1e1e2e; color: #cdd6f4; border: 1px solid #45475a; border-radius: 4px; outline: none; show-decoration-selected: 1; } QTreeView::item { padding: 4px; border-radius: 2px; } QTreeView::item:hover { background-color: #313244; } QTreeView::item:selected { background-color: #45475a; color: #cdd6f4; } QTreeView::item:selected:active { background-color: #585b70; } QTreeView::branch { background-color: transparent; } QTreeView::branch:hover { background-color: #313244; } QTreeView::branch:selected { background-color: #45475a; } QTreeView::branch:has-children:!has-siblings:closed, QTreeView::branch:closed:has-children:has-siblings { image: url(qss:images_dark-light/branch_closed.svg); } QTreeView::branch:open:has-children:!has-siblings, QTreeView::branch:open:has-children:has-siblings { image: url(qss:images_dark-light/branch_open.svg); } /* ============================================================================= List View ============================================================================= */ QListView { background-color: #1e1e2e; color: #cdd6f4; border: 1px solid #45475a; border-radius: 4px; outline: none; } QListView::item { padding: 4px; border-radius: 2px; } QListView::item:hover { background-color: #313244; } QListView::item:selected { background-color: #45475a; color: #cdd6f4; } /* ============================================================================= Table View ============================================================================= */ QTableView { background-color: #1e1e2e; color: #cdd6f4; border: 1px solid #45475a; border-radius: 4px; gridline-color: #313244; outline: none; } QTableView::item { padding: 4px; } QTableView::item:hover { background-color: #313244; } QTableView::item:selected { background-color: #45475a; color: #cdd6f4; } QTableView QTableCornerButton::section { background-color: #313244; border: 1px solid #45475a; } /* ============================================================================= Header Views (for Tables/Trees) ============================================================================= */ QHeaderView { background-color: #313244; border: none; } QHeaderView::section { background-color: #313244; color: #bac2de; border: none; border-right: 1px solid #45475a; border-bottom: 1px solid #45475a; padding: 6px 8px; min-height: 20px; } QHeaderView::section:hover { background-color: #45475a; color: #cdd6f4; } QHeaderView::section:checked { background-color: #45475a; } QHeaderView::down-arrow { width: 10px; height: 10px; } QHeaderView::up-arrow { width: 10px; height: 10px; } /* ============================================================================= Splitters ============================================================================= */ QSplitter::handle { background-color: #313244; } QSplitter::handle:horizontal { width: 4px; } QSplitter::handle:vertical { height: 4px; } QSplitter::handle:hover { background-color: #cba6f7; } /* ============================================================================= Status Bar ============================================================================= */ QStatusBar { background-color: #181825; color: #bac2de; border-top: 1px solid #313244; } QStatusBar::item { border: none; } QStatusBar QLabel { padding: 2px 8px; } /* ============================================================================= Tooltips ============================================================================= */ QToolTip { background-color: #313244; color: #cdd6f4; border: 1px solid #45475a; border-radius: 4px; padding: 4px 8px; } /* ============================================================================= Labels ============================================================================= */ QLabel { color: #cdd6f4; background-color: transparent; } QLabel:disabled { color: #6c7086; } /* ============================================================================= Frames ============================================================================= */ QFrame { border: none; } QFrame[frameShape="4"] { /* HLine */ background-color: #45475a; max-height: 1px; } QFrame[frameShape="5"] { /* VLine */ background-color: #45475a; max-width: 1px; } /* ============================================================================= Tool Box (Collapsible sections) ============================================================================= */ QToolBox { background-color: #1e1e2e; border: 1px solid #45475a; border-radius: 4px; } QToolBox::tab { background-color: #313244; color: #cdd6f4; border: 1px solid #45475a; border-radius: 4px; padding: 8px; } QToolBox::tab:selected { background-color: #45475a; border-color: #cba6f7; } QToolBox::tab:hover { background-color: #45475a; } /* ============================================================================= Dialog Buttons ============================================================================= */ QDialogButtonBox { button-layout: 0; } /* ============================================================================= Date/Time Edits ============================================================================= */ QDateEdit, QTimeEdit, QDateTimeEdit { background-color: #313244; color: #cdd6f4; border: 1px solid #45475a; border-radius: 4px; padding: 4px; } QDateEdit:focus, QTimeEdit:focus, QDateTimeEdit:focus { border-color: #cba6f7; } QDateEdit::drop-down, QTimeEdit::drop-down, QDateTimeEdit::drop-down { subcontrol-origin: padding; subcontrol-position: top right; width: 20px; border-left: 1px solid #45475a; border-top-right-radius: 4px; border-bottom-right-radius: 4px; background-color: #45475a; } QCalendarWidget { background-color: #1e1e2e; } QCalendarWidget QToolButton { background-color: #313244; color: #cdd6f4; border: 1px solid #45475a; border-radius: 4px; margin: 2px; } QCalendarWidget QToolButton:hover { background-color: #45475a; } QCalendarWidget QMenu { background-color: #313244; } QCalendarWidget QSpinBox { background-color: #313244; } QCalendarWidget QAbstractItemView { background-color: #1e1e2e; selection-background-color: #cba6f7; selection-color: #11111b; } /* ============================================================================= Wizard ============================================================================= */ QWizard { background-color: #1e1e2e; } QWizard QLabel { color: #cdd6f4; } /* ============================================================================= FreeCAD Specific Widgets ============================================================================= */ /* Property Editor */ Gui--PropertyEditor--PropertyEditor { background-color: #1e1e2e; color: #cdd6f4; border: 1px solid #45475a; qproperty-groupBackground: #313244; qproperty-groupTextColor: #bac2de; qproperty-itemBackground: #1e1e2e; } Gui--PropertyEditor--PropertyEditor QLineEdit { background-color: #313244; border: 1px solid #45475a; } Gui--PropertyEditor--PropertyEditor QComboBox { background-color: #313244; } /* Color Button */ Gui--ColorButton { background-color: #313244; border: 1px solid #45475a; border-radius: 4px; padding: 2px; } Gui--ColorButton:hover { border-color: #cba6f7; } /* Workbench Selector */ Gui--WorkbenchComboBox { background-color: #313244; color: #cdd6f4; border: 1px solid #45475a; border-radius: 4px; padding: 4px 8px; } Gui--WorkbenchComboBox:hover { border-color: #585b70; } Gui--WorkbenchComboBox::drop-down { background-color: #45475a; border-left: 1px solid #45475a; border-radius: 0 4px 4px 0; } /* Task Panel */ QSint--ActionGroup { background-color: #313244; border: 1px solid #45475a; border-radius: 6px; } QSint--ActionGroup QToolButton { background-color: #313244; color: #cdd6f4; border: none; border-radius: 4px; padding: 8px 6px; min-height: 18px; } QSint--ActionGroup QToolButton:hover { background-color: #45475a; } QSint--ActionGroup QFrame { background-color: #1e1e2e; border: none; border-radius: 4px; } QSint--ActionGroup QSint--ActionLabel[class="header"] { color: #cdd6f4; min-width: 0; } /* Input Field */ Gui--InputField { background-color: #313244; color: #cdd6f4; border: 1px solid #45475a; border-radius: 4px; } Gui--InputField:focus { border-color: #cba6f7; } /* Expression Completer */ Gui--ExpressionCompleter { background-color: #313244; color: #cdd6f4; border: 1px solid #45475a; } /* Spreadsheet */ SpreadsheetGui--SheetTableView { background-color: #1e1e2e; color: #cdd6f4; gridline-color: #45475a; selection-background-color: #45475a; selection-color: #cdd6f4; } SpreadsheetGui--SheetTableView QHeaderView::section { background-color: #313244; color: #bac2de; border: 1px solid #45475a; padding: 4px; } /* Spreadsheet cell editor - reduce padding for better text visibility */ SpreadsheetGui--SheetTableView QLineEdit { background-color: #313244; color: #cdd6f4; border: 1px solid #cba6f7; border-radius: 0px; padding: 1px 2px; margin: 0px; } /* Python Console */ Gui--PythonConsole { background-color: #11111b; color: #cdd6f4; font-family: "JetBrains Mono", "Fira Code", "Consolas", monospace; selection-background-color: #45475a; } /* Python Editor */ Gui--PythonEditor { background-color: #11111b; color: #cdd6f4; font-family: "JetBrains Mono", "Fira Code", "Consolas", monospace; selection-background-color: #cba6f7; selection-color: #11111b; } /* Report View */ Gui--DockWnd--ReportOutput { background-color: #11111b; color: #cdd6f4; font-family: "JetBrains Mono", "Fira Code", "Consolas", monospace; } /* DAG View */ Gui--DAG--Model { background-color: #1e1e2e; } /* ============================================================================= Sketcher Specific Styles ============================================================================= */ /* Sketcher constraint colors are handled via preferences, not QSS */ /* ============================================================================= Syntax Highlighting Colors (Python Editor) Note: These are typically set via FreeCAD preferences, but we define them here for reference and any widgets that support them. ============================================================================= */ /* Python Editor Syntax Colors (Catppuccin Mocha): - Comment: #7f849c - Number: #fab387 - String: #a6e3a1 - Keyword: #cba6f7 - Class/Def name: #89b4fa - Operator: #89dceb - Output: #cdd6f4 - Error: #f38ba8 */ /* ============================================================================= Custom Color Accents by Context ============================================================================= */ /* Success states */ *[state="success"] { color: #a6e3a1; } /* Warning states */ *[state="warning"] { color: #f9e2af; } /* Error states */ *[state="error"] { color: #f38ba8; } /* Info states */ *[state="info"] { color: #89b4fa; }