diff --git a/ukui-power-manager-tray/powerwindow.cpp b/ukui-power-manager-tray/powerwindow.cpp index b9a7acd..1485f8f 100755 --- a/ukui-power-manager-tray/powerwindow.cpp +++ b/ukui-power-manager-tray/powerwindow.cpp @@ -77,14 +77,14 @@ powerwindow::powerwindow(QWidget *parent) : QWidget(parent) initgsetting(); // set_window_position(); //设置出现在屏幕的位置以及大小 watchTranspartency(); - +#if 0 //监听屏幕改变的信号 connect(QApplication::desktop(), &QDesktopWidget::resized, this, [=]() { QTimer::singleShot(1000, this, [=]() { set_window_position(); }); }); connect(QApplication::desktop(), &QDesktopWidget::screenCountChanged, this, [=]() { set_window_position(); }); connect(QApplication::desktop(), &QDesktopWidget::primaryScreenChanged, this, [=]() { set_window_position(); }); - +#endif installEventFilter(this); } @@ -170,7 +170,7 @@ void powerwindow::initUI() get_power_list(); - //this->setFixedSize(420, 258 + deviceNum * 48); + this->setFixedSize(420, 258 + deviceNum * 48); //电源设置按钮 settingLabel = new KyLable();