diff --git a/debian/changelog b/debian/changelog index f1b2258..6e7ebcd 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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 Mon, 29 Jan 2018 17:54:44 +0800 diff --git a/info/infogui.cpp b/info/infogui.cpp index 6df4785..d406744 100644 --- a/info/infogui.cpp +++ b/info/infogui.cpp @@ -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); diff --git a/plugins/startupmanager/startupwidget.cpp b/plugins/startupmanager/startupwidget.cpp index ecfba58..bb05b83 100644 --- a/plugins/startupmanager/startupwidget.cpp +++ b/plugins/startupmanager/startupwidget.cpp @@ -62,10 +62,12 @@ StartupWidget::StartupWidget(QWidget *parent) qRegisterMetaType(); qRegisterMetaType>(); + //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); diff --git a/plugins/systemmonitor/systemmonitor.cpp b/plugins/systemmonitor/systemmonitor.cpp index fea2d9e..c433e83 100644 --- a/plugins/systemmonitor/systemmonitor.cpp +++ b/plugins/systemmonitor/systemmonitor.cpp @@ -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); diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index b71dd9f..0c8d150 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -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);