Commit Graph

19 Commits

Author SHA1 Message Date
zhangkun 96d0b45dd0 feat: add T11 font size and adjust T5 default
Added T11 font size with 8px default value to extend the font size
options
Modified T5 default size from 17px to 16px for better size progression
Updated font pixel size array to include the new T11 size
Added t11() accessor method and corresponding test case
cherry-pick from: 2c3b351b43

feat: 添加 T11 字体大小并调整 T5 默认值

添加了默认值为 8px 的 T11 字体大小以扩展字体大小选项
将 T5 默认大小从 17px 修改为 16px 以获得更好的大小递进
更新了字体像素大小数组以包含新的 T11 大小
添加了 t11() 访问器方法和相应的测试用例
cherry-pick from: 2c3b351b43

pms: BUG-310879
2025-09-01 11:27:52 +08:00
yeshanshan 9842a0644e fix: resolve compilation warnings and deprecation issues
1. Fixed deprecated enum usage by adding explicit deprecation comment
for IconAttibute
2. Added QT version checks for QMouseEvent::globalPos() vs
globalPosition() API changes
3. Marked unused parameters with Q_UNUSED to suppress warnings
4. Added version checks for DTK 6.0 API changes
5. Fixed test class visibility warnings by adding GTEST_API_ prefix
6. Improved warning messages to use modern qWarning() stream syntax
7. Added [[maybe_unused]] attribute for DEFINE_CONST_CHAR macro
8. Added version checks for QVariant type handling differences between
Qt5/Qt6
9. Fixed potential memory leak in DIconTheme::isXdgIcon() logic
10. Added proper type checks for QVariant conversions

Log: Fixed various compilation warnings and deprecated API usage

Influence:
1. Verify icon rendering still works correctly after enum changes
2. Test window movement functionality with both Qt5 and Qt6
3. Check palette handling in DGuiApplicationHelper
4. Verify test cases still pass with updated class visibility
5. Test QVariant conversions in DPlatformHandle properties

fix: 解决编译警告和废弃API问题

1. 为废弃的IconAttibute枚举添加明确的弃用注释
2. 为QMouseEvent::globalPos()和globalPosition()API变更添加QT版本检查
3. 使用Q_UNUSED标记未使用参数以消除警告
4. 添加DTK 6.0 API变更的版本检查
5. 通过添加GTEST_API_前缀修复测试类可见性警告
6. 改进警告消息使用现代qWarning()流式语法
7. 为DEFINE_CONST_CHAR宏添加[[maybe_unused]]属性
8. 添加Qt5/Qt6之间QVariant类型处理的版本检查
9. 修复DIconTheme::isXdgIcon()中潜在的内存泄漏问题
10. 为QVariant转换添加适当的类型检查

Log: 修复各种编译警告和废弃API使用问题

Influence:
1. 验证图标渲染在枚举变更后仍能正常工作
2. 测试Qt5和Qt6下的窗口移动功能
3. 检查DGuiApplicationHelper中的调色板处理
4. 验证更新类可见性后测试用例是否仍能通过
5. 测试DPlatformHandle属性中的QVariant转换
2025-08-14 11:39:10 +00:00
yeshanshan 9d3d659afe feat: add flags parameter to DDciIconPlayer play method
1. Added new overloaded play method that accepts
DDciIconImagePlayer::Flags parameter
2. Modified existing play method to call new method with default
IgnoreLastImageLoop flag
3. Updated documentation to reflect new method signature and behavior
4. Allows more control over icon playback behavior through flags
parameter

feat: 为 DDciIconPlayer 的 play 方法添加 flags 参数

1. 添加了新的重载 play 方法,接受 DDciIconImagePlayer::Flags 参数
2. 修改现有 play 方法以使用默认的 IgnoreLastImageLoop 标志调用新方法
3. 更新文档以反映新的方法签名和行为
4. 通过 flags 参数提供对图标播放行为的更多控制
2025-08-07 14:38:07 +08:00
Felix Yan 329bf5a247 chore: correct typos about Dtk::Gui::DDciIcon::IconAttribute
Renaming enum would break ABI, but using doesn't modify ABI.

pms: BUG-368399
2025-01-09 16:17:49 +08:00
ck bffcdde9ea chore: add flag to disable noncache flag
- if flag is set always try create iconengine
- avoid too much logs
2024-04-23 09:32:58 +08:00
ck d35f8e10fd feat: move ddesktopservices to dtkgui
- move ddesktopservices from dtkwidget to dtkgui
- add docs for ddesktopservice
- showFileItemPropertie ==> showFileItemProperty
- use dbus to check SoundEffect.Enabled instead of Gsettings

Issue: linuxdeepin/dtk#134
2023-11-15 09:48:31 +08:00
Yixue Wang 71aaf6a024 fix: indirect inclusion of QSharedPointer
ddciicon.h does not explicitly include QSharedPointer, leading to
incomplete type. Include QSharedPointer explicitly.

Log: fix indirect inclusion of QSharedPointer
2023-10-27 10:53:28 +08:00
YeShanShan 1bbeb9f475 fix: Compiling error in qt6.4
QThemeIconEntries changed from QList<QIconLoaderEngineEntry*>
to std::vector<std::unique_ptr<QIconLoaderEngineEntry>>
  QFont hasn't include QObject header file.
2023-08-17 16:38:30 +08:00
wangyixue 9523642508 feat: add helper for high dpi pixmap
Add loadNxPixmap for high dpi pixmap.

Log: add loadNxPixmap
2023-07-26 14:29:30 +08:00
ck ba55aa6e7d feat: DIconTheme::findQIcon add fallback icon
support fallback icon
2023-07-18 11:00:28 +08:00
wangfei b810be77cb chore: adjust icontheme
dciiconEngine is added to createIconEngine interface.

Log: dciiconEngine is added to createIconEngine interface.
2023-07-07 09:54:30 +08:00
ck 9e54cba93c feat: add DIconTheme::createIconEngine
DIconTheme::createIconEngine for qt5integration
1. try createBuiltinIconEngine first
2. try createXdgProxyIconEngine or fallback to fromTheme
3. add docs
Warning : do not call from qplatformTheme createIconEngine without
DontFallbackToQIconFromTheme flag

Log: add createIconEngine
2023-03-22 17:33:58 +08:00
zccrs 66ab7451f2 feat: Support animation for DDciIcon
See also https://github.com/linuxdeepin/deepin-specifications/pull/1,
This implementation complies with the specification by DSG on animation
dci's icons.

New class: DDciIconImage DDciIconImagePlayer DDciIconPlayer
2023-02-14 13:17:17 +08:00
renbin 5ca5df6ccf feat: Support RAW image formats.
1. Dynamically load libraw.so to support RAW image fomats.
2. Improve some implementations, Update unit cases and docs.
3. Move image-handler from folder example to tool.

Log: Support RAW image formats.
Influence: Add build dependency libraw-dev.
2023-02-02 02:33:30 +00:00
renbin 9dc1bb90d1 feat: Add image algorithms, ut and comment.
Add image algorithms, unit test cases, dox file comment and example.

Log: Add image algorithms, ut and comment.
2022-12-12 06:16:33 +00:00
renbin 2600e5ea59 feat: Add the DImagehandler class.
Add the DImagehandler class, provide functions such as reading image,
rotating image, getting image metadata. DImagehandler dynamically load
libfreeimage to support extended image formats.

Log: Add the DImagehandler class.
Influence: Add build dependency libfreeimage-dev.
2022-12-12 06:16:33 +00:00
ck b6d844990b feat: construct DDciIconPalette from QPalette
add a way to construct DDciIconPalette from QPalette

Log: none
Influence: none
Change-Id: I4e9b9f8bf3a653c066bf92c7ba1a3ef72526e2ac
2022-11-29 11:42:52 +08:00
ck 934be318be feat: add DIcon
get pixmap of specified devicePixelRatio
Fix https://pms.uniontech.com/bug-view-162771.html

Log: none
Change-Id: I38b16c8402be74d1ef216faf7c77fa096282dadc
2022-11-17 13:54:12 +08:00
ShootingStarDragons 7f227daf8a feat(tocmake): tocmake
I change the source code from qmake to cmake. Move the files
which will be install to the /usr/include to $root/include, which will
help to mattern match and easylier to do install. and the change will
break the build of qmake

Log: from qmake to cmake

Influence: qmake is breaked
2022-08-17 16:59:12 +08:00