forked from openkylin/quarkai
Make Minimize window work.
This commit is contained in:
parent
e8d05da023
commit
4e95744fd9
|
@ -24,5 +24,6 @@ kylin-assistant (1.0.0-0ubuntu1) bionic; urgency=low
|
|||
* Rewrite theme ui module.
|
||||
* Scaning system with Thread.
|
||||
* Renice process priority.
|
||||
* Make Minimize window work.
|
||||
|
||||
-- lixiang <lixiang@kylinos.cn> Mon, 29 Jan 2018 17:54:44 +0800
|
||||
|
|
|
@ -45,7 +45,7 @@ InfoGui::InfoGui(QWidget *parent)
|
|||
m_scrollArea = new QScrollArea;
|
||||
m_scrollArea->setWidgetResizable(true);
|
||||
m_scrollArea->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
||||
m_scrollArea->setStyleSheet("QScrollArea{border: none;background-color: #ffffff;}");
|
||||
// m_scrollArea->setStyleSheet("QScrollArea{border: none;background-color: #ffffff;}");
|
||||
|
||||
m_vLayout->setSpacing(10);
|
||||
m_vLayout->setMargin(0);
|
||||
|
|
|
@ -62,10 +62,12 @@ StartupWidget::StartupWidget(QWidget *parent)
|
|||
qRegisterMetaType<StartupDataPtrList>();
|
||||
qRegisterMetaType<QList<StartupData>>();
|
||||
|
||||
//kobe:如果不加Qt::WindowMinimizeButtonHint,则调用setFixedSize()之后,调用窗口最小化函数将会没有效果
|
||||
this->setWindowFlags(Qt::FramelessWindowHint | Qt::WindowCloseButtonHint | Qt::WindowMinimizeButtonHint);
|
||||
// this->setWindowFlags(Qt::Window | Qt::FramelessWindowHint | Qt::WindowMinimizeButtonHint);//Attention: Qt::WindowCloseButtonHint make showMinimized() valid
|
||||
this->setAutoFillBackground(true);
|
||||
this->setMouseTracking(true);
|
||||
this->setWindowFlags(/*this->windowFlags() | */Qt::FramelessWindowHint | Qt::WindowCloseButtonHint);//去掉边框
|
||||
// this->setWindowFlags(/*this->windowFlags() | */Qt::FramelessWindowHint | Qt::WindowCloseButtonHint);//去掉边框
|
||||
// this->setAttribute(Qt::WA_TranslucentBackground);//背景透明
|
||||
// this->setAutoFillBackground(true);
|
||||
// this->setMouseTracking(true);
|
||||
|
|
|
@ -40,7 +40,9 @@ SystemMonitor::SystemMonitor(QWidget *parent)
|
|||
// this->setWindowFlags(this->windowFlags() | Qt::FramelessWindowHint | Qt::WindowCloseButtonHint);//去掉边框
|
||||
// this->setAttribute(Qt::WA_TranslucentBackground);//背景透明
|
||||
|
||||
this->setWindowFlags(Qt::FramelessWindowHint);
|
||||
//kobe:如果不加Qt::WindowMinimizeButtonHint,则调用setFixedSize()之后,调用窗口最小化函数将会没有效果
|
||||
this->setWindowFlags(Qt::FramelessWindowHint | Qt::WindowCloseButtonHint | Qt::WindowMinimizeButtonHint);
|
||||
// this->setWindowFlags(Qt::FramelessWindowHint);
|
||||
// this->setWindowFlags(Qt::Window | Qt::FramelessWindowHint | Qt::WindowMinimizeButtonHint);//Attention: Qt::WindowCloseButtonHint make showMinimized() valid
|
||||
|
||||
this->setAutoFillBackground(true);
|
||||
|
|
|
@ -71,8 +71,10 @@ MainWindow::MainWindow(QString cur_arch, int d_count, QWidget* parent/*, Qt::Win
|
|||
//For Unity
|
||||
// this->setWindowFlags(/*Qt::Window | */Qt::FramelessWindowHint | Qt::WindowMinimizeButtonHint);//Attention: Qt::WindowCloseButtonHint make showMinimized() valid
|
||||
|
||||
//kobe:如果不加Qt::WindowMinimizeButtonHint,则调用setFixedSize()之后,调用窗口最小化函数将会没有效果
|
||||
this->setWindowFlags(Qt::FramelessWindowHint | Qt::WindowCloseButtonHint | Qt::WindowMinimizeButtonHint);
|
||||
//For UKUI and Mate
|
||||
this->setWindowFlags(Qt::FramelessWindowHint | Qt::WindowCloseButtonHint);
|
||||
// this->setWindowFlags(Qt::FramelessWindowHint | Qt::WindowCloseButtonHint);
|
||||
this->setAttribute(Qt::WA_TranslucentBackground);
|
||||
this->setAutoFillBackground(true);
|
||||
this->setMouseTracking(true);
|
||||
|
|
Loading…
Reference in New Issue