From 2318a6db1dca497614fa2adc6138ad2d0fb43fae Mon Sep 17 00:00:00 2001 From: myml Date: Wed, 14 Aug 2024 16:14:45 +0800 Subject: [PATCH 1/4] fix: sidebar calendar widget MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复侧边栏日历组件的显示 Log: Issues: https://github.com/linuxdeepin/developer-center/issues/10343 --- .../src/widget/sidebarWidget/sidebarcalendarwidget.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/calendar-client/src/widget/sidebarWidget/sidebarcalendarwidget.cpp b/calendar-client/src/widget/sidebarWidget/sidebarcalendarwidget.cpp index bf1885716..fa1e232d5 100644 --- a/calendar-client/src/widget/sidebarWidget/sidebarcalendarwidget.cpp +++ b/calendar-client/src/widget/sidebarWidget/sidebarcalendarwidget.cpp @@ -123,7 +123,7 @@ void SidebarCalendarWidget::setKeyDate(QDate date) return; } QString fd = ""; - fd.append("yyyy").append(tr("Y")).append("MM").append(tr("M")); + fd.append("yyyy").append(tr("Y")).append(" ").append("MM").append(tr("M")); m_dateLabel->setText(date.toString(fd)); SidebarCalendarKeyButton::setDisplayedMonth(date); From 61f592ba3dbb47f9fd01eb37b357dc8dcd8eb930 Mon Sep 17 00:00:00 2001 From: myml Date: Wed, 14 Aug 2024 16:17:47 +0800 Subject: [PATCH 2/4] feat: Execute reload after changing systemd MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 在更改systemd配置后应该执行daemon-reload Log: Issues: https://github.com/linuxdeepin/developer-center/issues/10093 --- calendar-service/src/alarmManager/dalarmmanager.cpp | 3 +++ calendar-service/src/csystemdtimercontrol.cpp | 6 +++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/calendar-service/src/alarmManager/dalarmmanager.cpp b/calendar-service/src/alarmManager/dalarmmanager.cpp index 5d6217daf..d17d3057a 100644 --- a/calendar-service/src/alarmManager/dalarmmanager.cpp +++ b/calendar-service/src/alarmManager/dalarmmanager.cpp @@ -4,8 +4,10 @@ #include "dalarmmanager.h" +#include "commondef.h" #include "csystemdtimercontrol.h" #include "dbus/dbusnotify.h" +#include #define Millisecond 1 #define Second 1000 * Millisecond @@ -46,6 +48,7 @@ DAlarmManager::DAlarmManager(QObject *parent) void DAlarmManager::updateRemind(const DRemindData::List &remindList) { + qCDebug(ServiceLogger) << "updateRemind" << "list size:" << remindList.size(); if (remindList.size() == 0) return; QString &&accountID = remindList.at(0)->accountID(); diff --git a/calendar-service/src/csystemdtimercontrol.cpp b/calendar-service/src/csystemdtimercontrol.cpp index 6484110e3..58c814f9d 100644 --- a/calendar-service/src/csystemdtimercontrol.cpp +++ b/calendar-service/src/csystemdtimercontrol.cpp @@ -6,7 +6,8 @@ #include "commondef.h" #include "units.h" -#include +#include +#include #include #include @@ -28,6 +29,7 @@ CSystemdTimerControl::~CSystemdTimerControl() void CSystemdTimerControl::buildingConfiggure(const QVector &infoVector) { + qCDebug(ServiceLogger) << "buildingConfiggure"; if (infoVector.size() == 0) return; QStringList fileNameList{}; @@ -36,6 +38,7 @@ void CSystemdTimerControl::buildingConfiggure(const QVector &infoVe createService(fileNameList.last(), info); createTimer(fileNameList.last(), info.triggerTimer); } + execLinuxCommand("systemctl --user daemon-reload"); startSystemdTimer(fileNameList); } @@ -251,6 +254,7 @@ QString CSystemdTimerControl::execLinuxCommand(const QString &command) process.start("/bin/bash", QStringList() << "-c" << command); process.waitForFinished(); QString strResult = process.readAllStandardOutput(); + qCDebug(ServiceLogger)<< "exec: " << command << "output: " << strResult; return strResult; } From 2203981ec90cb0a9cee4eb62f1241e19286161a6 Mon Sep 17 00:00:00 2001 From: myml Date: Wed, 14 Aug 2024 16:35:15 +0800 Subject: [PATCH 3/4] fix: remind widget display position MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复悬浮框显示位置问题 Log: Issues: https://github.com/linuxdeepin/developer-center/issues/10341 --- calendar-client/src/widget/monthWidget/monthview.cpp | 10 ++++++---- calendar-client/src/widget/yearWidget/yearwindow.cpp | 9 ++++++--- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/calendar-client/src/widget/monthWidget/monthview.cpp b/calendar-client/src/widget/monthWidget/monthview.cpp index ec01dbe68..1cf724f69 100644 --- a/calendar-client/src/widget/monthWidget/monthview.cpp +++ b/calendar-client/src/widget/monthWidget/monthview.cpp @@ -76,14 +76,16 @@ void CMonthView::slotScheduleRemindWidget(const bool isShow, const DSchedule::Pt // 因为将提示框从window改为widget,要转换为相对窗口的坐标 auto rPos = this->mapFromGlobal(remindPos); //根据提示框在屏幕的位置设置箭头方向 - qWarning() << this->window()->width() << rPos << m_remindWidget->width(); - if (this->window()->width() - rPos.x() > m_remindWidget->width()) { + qWarning() << "window width: " << this->window()->width() << "pos:" << rPos << "remind width: " << m_remindWidget->width(); + if (rPos.x() < this->window()->width() / 2) { + // 显示到右侧 m_remindWidget->setDirection(DArrowRectangle::ArrowLeft); + m_remindWidget->show(rPos.x()+10, rPos.y()); } else { + // 显示到左侧 m_remindWidget->setDirection(DArrowRectangle::ArrowRight); + m_remindWidget->show(rPos.x()-10, rPos.y()); } - // 因为将提示框从window改为widget,要转换为相对窗口的坐标 - m_remindWidget->show(rPos.x(), rPos.y()); } else { m_remindWidget->hide(); } diff --git a/calendar-client/src/widget/yearWidget/yearwindow.cpp b/calendar-client/src/widget/yearWidget/yearwindow.cpp index ff82ef969..c2315336f 100644 --- a/calendar-client/src/widget/yearWidget/yearwindow.cpp +++ b/calendar-client/src/widget/yearWidget/yearwindow.cpp @@ -652,13 +652,16 @@ void CYearWindow::slotMousePress(const QDate &selectDate, const int pressType) QPoint pos22 = variant.value(); // 因为将提示框从window改为widget,要转换为相对窗口的坐标 auto rPos = this->mapFromGlobal(pos22); - // 默认在左边显示,空间不够时在右边显示 - if ( this->width() - rPos.x() > m_scheduleView->width() ) { + // 根据鼠标位置,决定悬浮框显示位置 + if (rPos.x() < this->width() / 2) { + // 显示到右侧 m_scheduleView->setDirection(DArrowRectangle::ArrowLeft); + m_scheduleView->show(rPos.x()+10, rPos.y()); } else { + // 显示到左侧 m_scheduleView->setDirection(DArrowRectangle::ArrowRight); + m_scheduleView->show(rPos.x()-10, rPos.y()); } - m_scheduleView->show(rPos.x(), rPos.y()); update(); break; } From 57ed32a8f109e6130b687a50aac2d0093b1ab0c3 Mon Sep 17 00:00:00 2001 From: myml Date: Wed, 14 Aug 2024 16:38:01 +0800 Subject: [PATCH 4/4] chore: Release 1.5.5 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 发布1.5.5版本 Log: 修复日历提示框显示问题 --- debian/changelog | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/debian/changelog b/debian/changelog index 548e9bac7..7aa765ec5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +dde-calendar (5.14.5) unstable; urgency=medium + + * fix: sidebar calendar widget(Issue: https://github.com/linuxdeepin/developer-center/issues/10343) + * feat: Execute reload after changing systemd(Issue: https://github.com/linuxdeepin/developer-center/issues/10093) + * fix: remind widget display position(Issue: https://github.com/linuxdeepin/developer-center/issues/10341) + + -- myml Wed, 14 Aug 2024 16:37:30 +0800 + dde-calendar (5.14.4) unstable; urgency=medium * feat: Unable to set timer reminder in Linglong environment