add context panel
This commit is contained in:
@@ -17,19 +17,19 @@ ViewportPane::ViewportPane(QWidget* parent) : QWidget(parent), m_viewport(nullpt
|
||||
|
||||
// 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();
|
||||
|
||||
Reference in New Issue
Block a user