mirror of
https://github.com/NohamR/Reclass.git
synced 2026-05-10 19:59:21 +00:00
- Replaced hardcoded theme factories with JSON files + CMake build step - Shared ThemeFieldMeta table for DRY serialization and editor UI - Fixed live preview (auto-triggers on color change, no toggle button) - Fixed duplicate theme entries when editing built-in themes - Moved title bar from icon to bold "Reclass" text with View > Show Icon toggle - MDI tabs: 24px height, unicode close button styled like TypeSelectorPopup - Added VS2022 Dark theme with purple accent colors - Status bar padding, removed monospace font overrides on tabs/statusbar - Default startup opens Ball demo + Unnamed hex64 tabs
41 lines
960 B
C++
41 lines
960 B
C++
#pragma once
|
|
#include "themes/theme.h"
|
|
#include <QWidget>
|
|
#include <QMenuBar>
|
|
#include <QToolButton>
|
|
#include <QLabel>
|
|
#include <QHBoxLayout>
|
|
|
|
namespace rcx {
|
|
|
|
class TitleBarWidget : public QWidget {
|
|
Q_OBJECT
|
|
public:
|
|
explicit TitleBarWidget(QWidget* parent = nullptr);
|
|
|
|
QMenuBar* menuBar() const { return m_menuBar; }
|
|
void applyTheme(const Theme& theme);
|
|
void setShowIcon(bool show);
|
|
|
|
void updateMaximizeIcon();
|
|
|
|
protected:
|
|
void mousePressEvent(QMouseEvent* event) override;
|
|
void mouseDoubleClickEvent(QMouseEvent* event) override;
|
|
void paintEvent(QPaintEvent* event) override;
|
|
|
|
private:
|
|
QLabel* m_appLabel = nullptr;
|
|
QMenuBar* m_menuBar = nullptr;
|
|
QToolButton* m_btnMin = nullptr;
|
|
QToolButton* m_btnMax = nullptr;
|
|
QToolButton* m_btnClose = nullptr;
|
|
|
|
Theme m_theme;
|
|
|
|
QToolButton* makeChromeButton(const QString& iconPath);
|
|
void toggleMaximize();
|
|
};
|
|
|
|
} // namespace rcx
|