aesthetics
This commit is contained in:
+11
-1
@@ -17,12 +17,17 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent)
|
|||||||
this->setAttribute(Qt::WA_TranslucentBackground, true);
|
this->setAttribute(Qt::WA_TranslucentBackground, true);
|
||||||
this->setAttribute(Qt::WA_AcceptTouchEvents, true);
|
this->setAttribute(Qt::WA_AcceptTouchEvents, true);
|
||||||
this->setWindowFlags(Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint);
|
this->setWindowFlags(Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint);
|
||||||
this->resize(QSize(150, 175));
|
this->resize(QSize(150, 150));
|
||||||
|
|
||||||
QWidget *centralWidget = new QWidget(this);
|
QWidget *centralWidget = new QWidget(this);
|
||||||
centralWidget->setObjectName("glass");
|
centralWidget->setObjectName("glass");
|
||||||
centralWidget->setStyleSheet(R"(
|
centralWidget->setStyleSheet(R"(
|
||||||
#glass {
|
#glass {
|
||||||
|
background: rgba(25, 25, 25, 0.2);
|
||||||
|
border: none;
|
||||||
|
border-radius: 0px;
|
||||||
|
}
|
||||||
|
#glass:hover {
|
||||||
background: rgba(25, 25, 25, 0.5);
|
background: rgba(25, 25, 25, 0.5);
|
||||||
border: none;
|
border: none;
|
||||||
border-radius: 0px;
|
border-radius: 0px;
|
||||||
@@ -50,7 +55,11 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent)
|
|||||||
m_handleBar->setFixedSize(QSize(20, 20));
|
m_handleBar->setFixedSize(QSize(20, 20));
|
||||||
m_handleBar->setCursor(Qt::OpenHandCursor);
|
m_handleBar->setCursor(Qt::OpenHandCursor);
|
||||||
QLabel *label = new QLabel("STREAMS", centralWidget);
|
QLabel *label = new QLabel("STREAMS", centralWidget);
|
||||||
|
label->setStyleSheet("font-weight: bold;");
|
||||||
QToolButton *addButton = new QToolButton(centralWidget);
|
QToolButton *addButton = new QToolButton(centralWidget);
|
||||||
|
connect(addButton, &QToolButton::clicked, this, []() {
|
||||||
|
qDebug() << "addButtonClicked";
|
||||||
|
});
|
||||||
addButton->setIcon(QIcon(QStringLiteral(":/assets/icons/mono/basic/plus.svg")));
|
addButton->setIcon(QIcon(QStringLiteral(":/assets/icons/mono/basic/plus.svg")));
|
||||||
|
|
||||||
headerLayout->addWidget(m_handleBar);
|
headerLayout->addWidget(m_handleBar);
|
||||||
@@ -100,6 +109,7 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent)
|
|||||||
int x = screenSize.right() - this->width();
|
int x = screenSize.right() - this->width();
|
||||||
int y = (screenSize.bottom() / 2) - (this->height() / 2);
|
int y = (screenSize.bottom() / 2) - (this->height() / 2);
|
||||||
this->move(x, y);
|
this->move(x, y);
|
||||||
|
|
||||||
this->setCentralWidget(centralWidget);
|
this->setCentralWidget(centralWidget);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user