add context panel

This commit is contained in:
AndreaRigoni
2026-03-21 20:14:29 +00:00
parent add9d37aea
commit a8f786d8d1
14 changed files with 381 additions and 17 deletions

View File

@@ -17,19 +17,19 @@ QViewportPane::QViewportPane(QWidget* parent) : QWidget(parent), m_viewport(null
// Title bar setup
m_titleBar = new QWidget(this);
m_titleBar->setObjectName("PaneTitleBar");
m_titleBar->setFixedHeight(22);
m_titleBar->setStyleSheet("background-color: #333; color: white;");
auto* titleLayout = new QHBoxLayout(m_titleBar);
titleLayout->setContentsMargins(5, 0, 5, 0);
m_titleLabel = new QLabel("Viewport", m_titleBar);
m_titleLabel->setObjectName("TitleLabel");
auto* closeBtn = new QToolButton(m_titleBar);
closeBtn->setObjectName("PaneCloseButton");
closeBtn->setText("X");
closeBtn->setFixedSize(18, 18);
closeBtn->setStyleSheet("QToolButton { border: none; font-weight: bold; background: transparent; color: #ccc; } "
"QToolButton:hover { color: white; background: red; }");
titleLayout->addWidget(m_titleLabel);
titleLayout->addStretch();