Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 1 addition & 20 deletions src/ui/PopOutWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
#include "theme/Theme.h"

#include <QCloseEvent>
#include <QHBoxLayout>
#include <QLabel>
#include <QMoveEvent>
#include <QResizeEvent>
#include <QSettings>
Expand All @@ -30,20 +28,6 @@ void PopOutWindow::setupUi(const QString& title) {
m_mainLayout->setContentsMargins(0, 0, 0, 0);
m_mainLayout->setSpacing(0);

m_titleBar = new QWidget(this);
m_titleBar->setObjectName("PopOutTitleBar");
m_titleBar->setFixedHeight(36);

QHBoxLayout* titleLayout = new QHBoxLayout(m_titleBar);
titleLayout->setContentsMargins(12, 0, 8, 0);
titleLayout->setSpacing(8);

m_titleLabel = new QLabel(title, m_titleBar);
m_titleLabel->setProperty("role", "header");
titleLayout->addWidget(m_titleLabel);

m_mainLayout->addWidget(m_titleBar);

m_contentContainer = new QWidget(this);
m_contentContainer->setObjectName("PopOutContent");
QVBoxLayout* contentLayout = new QVBoxLayout(m_contentContainer);
Expand Down Expand Up @@ -80,14 +64,11 @@ void PopOutWindow::showAndRestore() {
}

void PopOutWindow::setMinimumContentSize(int width, int height) {
setMinimumSize(width, height + m_titleBar->height());
setMinimumSize(width, height);
}

void PopOutWindow::setWindowTitle(const QString& title) {
QDialog::setWindowTitle(title);
if (m_titleLabel) {
m_titleLabel->setText(title);
}
}

void PopOutWindow::closeEvent(QCloseEvent* event) {
Expand Down
4 changes: 0 additions & 4 deletions src/ui/PopOutWindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
#include <QPointer>

class QVBoxLayout;
class QHBoxLayout;
class QLabel;

namespace OpenMix {

Expand Down Expand Up @@ -43,8 +41,6 @@ class PopOutWindow : public QDialog {
QString m_settingsKey;
QWidget* m_content = nullptr;
QVBoxLayout* m_mainLayout = nullptr;
QWidget* m_titleBar = nullptr;
QLabel* m_titleLabel = nullptr;
QWidget* m_contentContainer = nullptr;

bool m_geometryLoaded = false;
Expand Down
Loading