Commit Graph

32 Commits

Author SHA1 Message Date
zhangkun 187be9a947 feat: improve icon theme generation with scalable support
1. Add SCALABLE_SIZE constant for scalable icon directories
2. Change foundSize return type from uint to int to support scalable
detection
3. Modify writeScaledImage to accept baseSize parameter instead of
parsing from directory
4. Move directory parsing logic to writeImage function for better
organization
5. Add scalable directory detection in size parsing logic
6. Use QImageReader's scaledSize for better image scaling quality
7. Fix error handling to continue processing instead of exiting on first
error

Log: Improved icon theme generation with better scalable icon support

Influence:
1. Test with icon directories containing scalable icons
2. Verify different scale factors work correctly
3. Test error handling when encountering invalid image files
4. Verify image quality at various scales
5. Test with both fixed-size and scalable icon directories

feat: 改进图标主题生成,支持可缩放图标

1. 添加 SCALABLE_SIZE 常量用于可缩放图标目录
2. 将 foundSize 返回类型从 uint 改为 int 以支持可缩放检测
3. 修改 writeScaledImage 函数,接受 baseSize 参数而非从目录解析
4. 将目录解析逻辑移至 writeImage 函数以获得更好的代码组织
5. 在尺寸解析逻辑中添加可缩放目录检测
6. 使用 QImageReader 的 scaledSize 获得更好的图像缩放质量
7. 修复错误处理,在遇到错误时继续处理而非立即退出

Log: 改进图标主题生成,提供更好的可缩放图标支持

Influence:
1. 测试包含可缩放图标的目录
2. 验证不同缩放因子是否正确工作
3. 测试遇到无效图像文件时的错误处理
4. 验证各种缩放比例下的图像质量
5. 测试固定尺寸和可缩放图标目录
2025-10-23 08:41:20 +00:00
zhangkun 39a50cca37 feat: improve icon size detection and duplicate handling
1. Added foundSize function to parse icon size from directory names
using multiple strategies
2. Implemented duplicate entry detection to skip existing icons in DCI
files
3. Added QFileInfo and QLogging includes for new functionality
4. Removed debug-specific code that was adding unnecessary prefixes
5. Improved size detection logic to handle both numeric and "NxN" format
directory names
6. Added fallback to parent directory when current directory name
doesn't contain size information

Log: Improved icon theme generation with better size detection and
duplicate prevention

Influence:
1. Test icon theme generation with various directory naming conventions
2. Verify that duplicate icons are properly skipped during generation
3. Test with directories containing numeric names vs "widthxheight"
format
4. Verify fallback to parent directory size detection works correctly
5. Check that existing icons in DCI files are not overwritten
6. Test with different directory structures and naming patterns

feat: 改进图标尺寸检测和重复项处理

1. 添加 foundSize 函数,使用多种策略从目录名解析图标尺寸
2. 实现重复条目检测,跳过 DCI 文件中已存在的图标
3. 添加 QFileInfo 和 QLogging 包含以支持新功能
4. 移除添加不必要前缀的调试专用代码
5. 改进尺寸检测逻辑,支持数字和"NxN"格式的目录名
6. 在当前目录名不包含尺寸信息时,添加回退到父目录的检测

Log: 改进图标主题生成,提供更好的尺寸检测和重复项预防

Influence:
1. 测试使用不同目录命名约定的图标主题生成
2. 验证在生成过程中重复图标是否被正确跳过
3. 测试包含数字名称与"宽x高"格式的目录
4. 验证回退到父目录尺寸检测是否正常工作
5. 检查 DCI 文件中现有图标是否不会被覆盖
6. 测试不同的目录结构和命名模式
2025-10-16 11:05:03 +00:00
zhangkun 7c05bace4a feat: switch to QGuiApplication for SVG rendering
1. Changed from QCoreApplication to QGuiApplication to support SVG
rendering
2. Updated CMakeLists to link against QtGui instead of QtCore
3. This change is necessary because SVG rendering requires GUI
components
4. Note: CLI environment users must set QT_QPA_PLATFORM=offscreen

feat: 切换到 QGuiApplication 以支持 SVG 渲染

1. 从 QCoreApplication 切换到 QGuiApplication 以支持 SVG 渲染
2. 更新 CMakeLists 链接 QtGui 替代 QtCore
3. 此变更是必要的因为 SVG 渲染需要 GUI 组件
4. 注意:命令行环境用户需要设置 QT_QPA_PLATFORM=offscreen
2025-07-31 13:42:53 +08:00
yeshanshan a892ddc4e2 feat: add concurrent processing for DCI icon conversion
1. Added QtConcurrent support for parallel processing of icon files
2. Implemented error handling with custom DciProcessingError exception
3. Grouped icon files by name to avoid concurrent access to same DCI
file
4. Improved performance by processing icon groups in parallel
5. Added proper error propagation and atomic flag for early termination
6. Maintained existing functionality while adding concurrency
7. Each icon group is processed as a unit to ensure thread safety with
DCI files

feat: 为DCI图标转换添加并发处理

1. 添加QtConcurrent支持以实现图标文件的并行处理
2. 使用自定义DciProcessingError异常实现错误处理
3. 按名称分组图标文件以避免对同一DCI文件的并发访问
4. 通过并行处理图标组提高性能
5. 添加适当的错误传播和原子标志用于提前终止
6. 在添加并发性的同时保持现有功能
7. 每个图标组作为一个单元处理以确保DCI文件的线程安全
2025-07-24 20:49:35 +08:00
yeshanshan 65cf7b4161 refactor: move icon finder functionality to separate tool
1. Removed icon finding functionality from dci-icon-theme to make it a
pure TUI tool
2. Created new dci-iconfinder tool specifically for icon lookup
operations
3. Changed dci-icon-theme to use QCoreApplication instead of
QGuiApplication
4. Updated version handling to use DTK version macros
5. Removed GUI dependencies from dci-icon-theme
6. Added proper documentation for both tools

This change was necessary to separate concerns and allow dci-icon-theme
to be used in environments without GUI dependencies while maintaining
icon lookup capabilities in a dedicated tool.

refactor: 将图标查找功能移至独立工具

1. 从dci-icon-theme中移除图标查找功能,使其成为纯命令行工具
2. 创建新的dci-iconfinder工具专门处理图标查找操作
3. 将dci-icon-theme改为使用QCoreApplication而非QGuiApplication
4. 更新版本处理以使用DTK版本宏
5. 移除dci-icon-theme对GUI的依赖
6. 为两个工具添加了适当的文档

此变更是为了分离关注点,使dci-icon-theme可以在没有GUI依赖的环境中使用,
同时将图标查找功能保留在专用工具中。
2025-07-23 04:16:59 +00:00
ck 8900594c9f chore: dci-icon-theme tool tweak
webp icon size should not be  fixed at 256x256
2024-07-01 15:24:57 +08:00
ck aeaccd30ce feat: dci-icon-theme support multiple icon size
- add error log(callback)
- support multiple size
- update version to 0.0.5

e.g.
```
ls /usr/share/icons/vintage/apps
128  16  24  32  48  64  96

dci-icon-theme /usr/share/icons/vintage/apps -o /tmp/dcis/vintage -O 3=98

dci --tree /tmp/vintage/onboard.dci
/
├── 16
│   ├── normal.dark
│   │   └── 3
│   │       └── 1.webp -> /16/normal.light/3/1.webp
│   └── normal.light
│       └── 3
│           └── 1.webp
└── 24
    ├── normal.dark
    │   └── 3
    │       └── 1.webp -> /24/normal.light/3/1.webp
    └── normal.light
        └── 3
            └── 1.webp
...

```
2024-04-28 13:22:44 +08:00
ck dcede1f96d chore: Adapt Qt6 && Dtk6 compilation
Since xdgiconloader is not adapted to Qt6, libxdg is disabled by default when compiling Dtk6
Do not install dconfig file in dtkgui to avoid conficts with dtk6gui
C++ 17 by default
DVERSION ==> DTK_VERSION
cmake_minimum_required 3.13
tools install to CMAKE_INSTALL_LIBEXECDIR
2023-06-19 13:13:09 +08:00
ck 6549a67eb3 chore: update readme and help message
update readme and usage

Log: none
Change-Id: Ibf40852aaa8aca2d21f51fdc37657fc79fd33966
2023-03-09 11:30:05 +08:00
Felix Yan 8a5e67652c chore: correct a typo in dci-icon-theme/main.cpp
Correct a typo in dci-icon-theme/main.cpp
2023-02-22 15:07:46 +08:00
ck e244d5d3fb chore: quality option must specify
1. must specify quality option
2. scaled counts depends on quality params
3. help message tweak
4. update version to 0.0.4

Log: scale quality
Change-Id: Ideecb18175a7d58cb2e94898246df01fe19147b4
2023-02-08 17:38:12 +08:00
ck c1286c6502 chore: dci-icon-theme tweak
1. update version to 0.0.3
2. fix initQuality not init if --quality not set

Log: none
Change-Id: I66f2d494f9e34194ffed17564334b3e29109737a
2023-02-08 09:25:37 +08:00
ck 5de5c59984 feat: add quality option
quility of dci icon scaled image
the higher the quality, the larger the dci icon file size

Log: quality option
Change-Id: Ifdfa51091bb560ad76881366a9c5168daf6cc9ab
2023-02-06 16:56:42 +08:00
ck 7d070dd912 feat: add icon finder for dci-icon-theme
dci-icon-theme --find <icon name> or
dci-icon-theme --find <icon name> -t <icon theme name>

output:
"deb" [ "xxx-icon" ]: "/usr/share/dsg/icons/xxx-icon/deb.dci"

Log: none
Change-Id: Ide152e0ba1cba0fb0252ead7304c255a2c0695d4
2023-02-06 13:33:26 +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
wangyixue a69ed2efdc chore: add export target support
Export target Dtk::Gui. Users can simply use target_link_libraries.

Log: add export target support
2022-12-29 09:52:49 +08:00
ck 2e8f35a33e fix: fix-dark-theme not work on link file
--fix-dark-theme only copy linktarget file to ouputput dir.
record link-target map and makelink after fix job
update version to 0.0.2

Log: none
Influence: none
Change-Id: I9100c98107551eb002656e34937a8524075743bc
2022-12-28 17:38:19 +08:00
ck 2eae43e7be feat: add dci-icon-theme tool
add dci-icon-theme tool to generate dci icon theme

Log: none
Influence: dci icon theme
Change-Id: Iec3b6ab5adef6ca2510e2d22bbd78ae7395c7e51
2022-12-27 13:04:05 +08:00
rewine f7324e32cf feat: Improve version information
1. 使用 CMakePackageConfigHelpers 生成 Config.cmake
2. 提供 DtkWidgetConfigVersion.cmake 供调用者检查版本
3. 使用 GNUInstallDir 提供的 FULL 版本变量配置 pkg-config 路径
4. 补充 pkg-config -L 参数
5. 增加引入 dtkcore 版本检查
2022-09-22 14:34:03 +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
xzl 987b356f46 chore: adapt REUSE license header
修改版权声明

Log: 修改版权声明
2022-08-11 05:01:51 +00:00
Chen Bin eba6c902da fix: macos runtime error.
Add runtime environment dependencies for MacOS.

Log:
Influence: dci image tool
Change-Id: I1d8869b719fcaa1ff6cbab9d88b7a330f6fa3b67
2022-07-19 10:22:35 +08:00
Chen Bin 533d213b1b feat: Add dci image convert tool
Some images saved into dci icon should convert it's format
to alpha8. therefore, we need to add a tool to complete the
format conversion.

Log:
Influence: none
Change-Id: Ia9e146db60e9e7cc4b323c5a4b892777a9313a42
2022-07-19 10:22:35 +08:00
ut003691 df4d814658 feat: 添加dde-kwin-debug工具
一个监测程序启动到界面显示所用时间的工具,用来评估程序的启动性能

Log:
Change-Id: I0c9fab12d3530cd43151a9ff32187ff0a4f20d3d
2021-07-30 13:11:01 +08:00
chengyulong 58e254702f feat: 增加单元测试覆盖率
对项目目录结构进行优化,增加lcov计算单元测试覆盖率。

Log: 增加lcov计算单元测试覆盖率
Change-Id: I4454aee03a1dffb8e9bc443b967aa84e7dc57a60
2021-02-04 18:11:59 +08:00
zhangwengeng 17d1d6af12 license: switch to LGPLv3 license 2020-04-24 17:55:17 +08:00
zccrs 8419f1ce95 fix: use format string for qFatal 2019-09-06 14:30:41 +08:00
zccrs f56983692d feat: add DGuiApplicationHelper/DPlatformTheme class 2019-09-06 12:59:25 +08:00
zccrs 3d77f2f675 chore: remove create dtkgui_config.h codes
the code move to dtkcore
add .release.json file
2019-07-30 18:41:24 +08:00
zccrs cb09384ed6 feat: add "isValid" function for DNativeSettings 2019-07-30 09:34:48 +08:00
zccrs 31c859a0f6 feat: add debian package 2019-07-29 17:30:57 +08:00
zccrs 1b61e8484d feat: init libdtkgui
add class DNativeSettings
2019-07-29 16:53:10 +08:00