-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: 更改checkbox和radio实现方式为dci图标,增加动效 #236
Conversation
Synchronize source files from linuxdeepin/qt5integration. Source-pull-request: linuxdeepin/qt5integration#236
271b4fe
to
b53afb7
Compare
Synchronize source files from linuxdeepin/qt5integration. Source-pull-request: linuxdeepin/qt5integration#236
b53afb7
to
9f51ecf
Compare
Synchronize source files from linuxdeepin/qt5integration. Source-pull-request: linuxdeepin/qt5integration#236
dciIconPlayer->setPalette(palette); | ||
} | ||
if (event->type() == QEvent::WindowActivate) { | ||
dciIconPlayer->setIcon(icon); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
每个 if 里面都要 set icon and play ?
- 提供一个 getModeFromeventType 的方法
- seticon ,play(getModeFromeventType(event))
@@ -114,6 +114,49 @@ static QRect spinboxIndicatorRect(const QRect &r) | |||
return QRect(xOffset, yOffset, size, size); | |||
} | |||
|
|||
static void checkDciIconEngine(bool checked, const QString &checkedIconName, const QString &uncheckedIconName |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个函数名字有待商榷,和dciiconengine有什么关系?
参数也太多了,再改改吧
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
play(DDciIconPlayer *dciIconPlayer, icon, mode)..
9f51ecf
to
07d1ebc
Compare
Synchronize source files from linuxdeepin/qt5integration. Source-pull-request: linuxdeepin/qt5integration#236
DDciIcon icon = radioButton->isChecked() ? DDciIcon::fromTheme("radio_checked") : DDciIcon::fromTheme("radio_unchecked"); | ||
DDciIconPalette palette; | ||
palette.setHighlight(radioButton->palette().highlight().color()); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
auto player = dciIconPlayers.value(radioButton)
if (!player)
return DStyle::eventFilter(watched, event)
break; | ||
} | ||
} | ||
return false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return DStyle::eventFilter(watched, event)
if (auto checkBox = qobject_cast<QCheckBox *>(watched)) { | ||
DDciIcon icon = checkBox->isChecked() ? DDciIcon::fromTheme("checkbox_checked") : DDciIcon::fromTheme("checkbox_unchecked"); | ||
DDciIconPalette palette; | ||
palette.setHighlight(checkBox->palette().highlight().color()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DDciIconPalette::fromQPalette
07d1ebc
to
218fa81
Compare
Synchronize source files from linuxdeepin/qt5integration. Source-pull-request: linuxdeepin/qt5integration#236
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
测试一下,不同主题,不同高亮色下显示是否有异常
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: kegechen, Whale107 The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
更改checkbox和radio实现方式为dci图标,增加动效 Log:
218fa81
to
c3d93c4
Compare
Synchronize source files from linuxdeepin/qt5integration. Source-pull-request: linuxdeepin/qt5integration#236
deepin pr auto review关键摘要:
是否建议立即修改:
|
更改checkbox和radio实现方式为dci图标,增加动效 Log:
* feat: add animation for menu's selected backgroud Add a ChameleonAnimation class for the geometry translate animation. * chore: 更新滚动条样式,适配动画 (#233) 更新滚动条样式,适配动画 Log: * chore: add round and remove shadow for menu item add round and remove shadow for menu item Log: * chore: 更改checkbox和radio实现方式为dci图标,增加动效 (#236) 更改checkbox和radio实现方式为dci图标,增加动效 Log: * fix: adjust progressbar color (#237) adjust progressbar color Log: * fix: 修复在选中框之外hover 和点击也有动画的问题 (#238) checkbox和radio有框选区和文字区,应该只对框选区事件做处理 Log: --------- Co-authored-by: JiDe Zhang <[email protected]> Co-authored-by: wangfei <[email protected]>
更改checkbox和radio实现方式为dci图标,增加动效
Log: