This commit is contained in:
daiboqi 2022-08-22 10:27:05 +08:00
parent a413fe5442
commit c3627d1054
5 changed files with 48 additions and 8 deletions

View File

@ -211,7 +211,7 @@ Clock::Clock(QWidget *parent) :
//倒计时上的小闹钟
// ui->countdownAlarmIcon->setProperty("useButtonPalette", true);
iniWaylandWinId();
}
@ -339,6 +339,18 @@ void Clock::settingsStyle()
subject->iniTimeZone();
}
void Clock::iniWaylandWinId()
{
connect(WindowManager::self(),&WindowManager::windowAdded,this,[=](const WindowId& windowId){
qDebug()<< "getpid:"<<WindowManager::getPid(windowId);
qDebug()<< "this pid:"<<getpid();
if(getpid() == WindowManager::getPid(windowId))
{
m_pid = windowId.toULongLong();
}
});
}
/**
@ -1552,7 +1564,7 @@ void Clock::noticeDialogShow(int close_time, int alarm_num, QString id)
}
else
moveUnderMultiScreen(UP_RIGHT,alarmNoticeDialog,1);
kdk::UkuiStyleHelper::self()->removeHeader(alarmNoticeDialog);
// kdk::UkuiStyleHelper::self()->removeHeader(alarmNoticeDialog);
alarmNoticeDialog->playMusic();
}
@ -2597,7 +2609,7 @@ void Clock::countdownNoticeDialogShow()
moveUnderMultiScreen(UP_RIGHT,countdownNoticeDialog,0);
} else
moveUnderMultiScreen(UP_RIGHT,countdownNoticeDialog,1);
kdk::UkuiStyleHelper::self()->removeHeader(countdownNoticeDialog);
// kdk::UkuiStyleHelper::self()->removeHeader(countdownNoticeDialog);
countdownNoticeDialog->playMusic();
}
@ -2809,8 +2821,8 @@ void Clock::onTinyClicked()
void Clock::activeWindow()
{
// setWindowState(Qt::WindowActive);
kdk::WindowManager::activateWindow(this->winId());
showThisWindow();
kdk::WindowManager::activateWindow(m_pid);
// showThisWindow();
}
void Clock::showThisWindow()
{

View File

@ -503,6 +503,7 @@ private:
QList<int> * hisLongShortIndex = nullptr;
SelectBtnUtil * m_selectBtnUtil = nullptr;
QMediaPlayer *music = nullptr;
quint32 m_pid;
void updateClockSelectBtnStyle(SelectBtn * temp,int moveHeight);
void updateCountdownSelectBtnStyle(SelectBtn * temp,int moveWidth,int moveHeight);
@ -534,6 +535,7 @@ private:
void updateTrayIconTooltip(QString info);
void setDefaultTrayIconTooltip();
void iniWaylandWinId();
};
#endif // CLOCK_H

19
debian/changelog vendored
View File

@ -1,3 +1,22 @@
ukui-clock (3.1.4.0.0k0-0k0.2.2) v101; urgency=medium
[ BUG 号 ]
* Closes: #
- 135816 【wayland】【闹钟】【窗管】倒计时结束后右上角弹出的弹窗会显示双标题栏多余的标题栏2s后自动消失
- 130009 【闹钟】[wayland]闹钟最小化错误
- 136675 【闹钟】弹出闹钟弹窗后点击"稍后提醒",之后再弹出的弹窗不显示在右上角
- 136684 【闹钟】添加闹钟后将其关闭,等待到达设定时间闹钟仍会生效
[ 任务号]
-
[ 需求号]
-
[ 其他改动说明 ]
-
[ 影响域 ]
* 应用本身
-- daiboqi <daiboqi@kylinos.cn> Wed, 17 Aug 2022 11:24:46 +0800
ukui-clock (3.1.4.0.0k0-0k0.2) v101; urgency=medium
[ BUG 号 ]

View File

@ -267,7 +267,7 @@ void Natice_alarm::playMusic()
timer_value = timer_value2;
m_musicPlayer->setVolume(100);
timer->start();
show();
// show();
refreshMusic();
}
@ -377,7 +377,7 @@ void Natice_alarm::ring()
bool result = ClockEntityDao::checkClockExist(m_clockId);
if(result){
natice_init();
this->show();
this->showThisWindow();
timer->start();
refreshMusic();
}else{
@ -385,7 +385,7 @@ void Natice_alarm::ring()
}
}else{
natice_init();
this->show();
this->showThisWindow();
timer->start();
refreshMusic();
}
@ -393,6 +393,12 @@ void Natice_alarm::ring()
}
}
void Natice_alarm::showThisWindow()
{
kdk::UkuiStyleHelper::self()->removeHeader(this);
this->show();
}
//bool Natice_alarm::eventFilter(QObject *watched, QEvent *event)
//{

View File

@ -98,6 +98,7 @@ private slots:
void show_again();
//响铃 Ring a bell
void ring();
void showThisWindow();
private:
void natice_init();