Skip to content

Commit

Permalink
fix: Simplify mouse release event handling in TimeWidget
Browse files Browse the repository at this point in the history
- Removed unnecessary checks for left button press and hover state in mouseReleaseEvent.
- Streamlined the event handling logic to improve code readability and maintainability.

This change enhances the clarity of the mouse event handling in the TimeWidget class.
Log: Simplify mouse release event handling in TimeWidget
Bug: https://pms.uniontech.com/bug-view-297809.html
  • Loading branch information
liyigang1 authored and deepin-bot[bot] committed Jan 7, 2025
1 parent a1af083 commit fec6eaf
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions src/dde-dock-plugins/recordtime/timewidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -355,13 +355,6 @@ bool TimeWidget::createCacheFile()
void TimeWidget::mouseReleaseEvent(QMouseEvent *e)
{
qDebug() << "Mouse release start!";
if(e->button() == Qt::LeftButton && m_pressed && m_hover){
m_pressed = false;
m_hover = false;
update();
QWidget::mouseReleaseEvent(e);
return;
}
int width = 0;
if(m_systemVersion >= 1070){
width = rect().width();
Expand Down

0 comments on commit fec6eaf

Please sign in to comment.