Commit Graph

379 Commits

Author SHA1 Message Date
Chen Bin a252a7fa1f fix: Convert icon palette to QString
There is no need to convert the icon palette into qurl type,
but directly into qstring type in the internal implementation,
which is convenient for external use.

Log:
Influence: dci icon
Change-Id: Idc0136bb0fdff2ac96b0f84aca9ff86f5b4df152
2022-07-19 10:22:35 +08:00
Chen Bin b3a9d5362b refactor: Reimplement DCI Icon
1. Delete the icon type controlled by Type enum. The icon type
does not recognize whether the icon is one or more, and has
certain limitations in finding and using.

2. Delete data qualification with foreground and background only.
Add the layer concept, Each state of an icon can only add 5
layers at most, and each layer has its own color for decoration,
increasing the flexibility of icon drawing.

3. Add Icon palette object. It is a common object that controls
the color of icon layers. There are currently four palettes:
foreground, background, highlight, highlightForeground.

Log:
Influence: DCI ICON
Change-Id: Idf818cc9cf77aefd8a88a13fd21f9f817160e729
2022-07-19 10:22:35 +08:00
Chen Bin 38b51ed45d fix: High DPI case the icon size is invalid
Because of calculating the device ratio multi-times, painting icons
use a invalid size.

Log:
Influence: None
Change-Id: Ia6f5407a6bc4ad58781483c83ca08eec6a2a11a9
2022-07-19 10:22:35 +08:00
Chen Bin 56873401b9 fix: Cannot get the icon data when the iconSize is -1
Some icons use - 1 as the initial icon size, but the icon cannot be
found, This problem can be solved by modifying the judgment condition
to < = 0.

Log:
Influence: find DciIcon use iconSize -1
Change-Id: If34bd8d609a5df0f67689519abe9189cc4e44db0
2022-07-19 10:22:35 +08:00
Chen Bin b4e53fb126 refactor: Change DDciIcon result to icon path
Loading the dci icon file will consume some time. Modify the loading
icon file way to load its path, and add the corresponding cache var-
iable to speed up the loading speed.

Log:
Influence: dci icon theme
Change-Id: I44c593484da14a4c2757ac38321622ad83b031b0
2022-07-19 10:22:35 +08:00
Chen Bin 678a18847e feat: Add implementation of icon theme
This implementation is based on the icon theme specification and
the dci file specification. Relevant specifications including icon
naming, directory naming and icon search are formulated. For more
details, please refer to the icon topic specification document of
DSG.

icon name example:
    // Correctly
    *  1. example
    *  2. org.deepin.app/example
    *  3. org.deepin.app/icons/example
    // Wrongful
    *  1. example.dci
    *  2. org.deepin.app/../icons/example.dci
    *  3. ../example.dci
    *  4. org.deepin.app/../icons/example.dci
    ...

icon theme paths:
    *  1. DSG system path: DSG-DataDir + "/icons"
    *  2. app resource path: :/dsg/icons
    *  3. app built in path: :/dsg/built-in-icons
    *  4. other custom paths.

Log:
Influence: None
Change-Id: If9b3cbe42b21319bfde4091f845aa1e28b7a27b4
2022-07-19 10:22:35 +08:00
Chen Bin 1562b12e9a fix: Move the CurrentType enum value to the end.
The CurrentType is a special value that indicates the type which
is used currently. It is not an actual value, and can't be used to
process logic. So move the value to the end of Type enum.

Log:
Influence: Dci Icon's type
Change-Id: I08a2ffa70d63c33f8ba4818e1982d4bbc9127fc4
2022-07-19 10:22:35 +08:00
Ye ShanShan 0eae7ec610 feat: add openUrl function
it's convenient for qml moved openUrl from dtkwidget to dtkgui.

Log: 
Influence: dtkdeclarative relys on this commit.
Change-Id: I7f720b02e91467a2bfb2bd3608afba8ad0d12312
2022-07-19 10:22:35 +08:00
Ye ShanShan 8f76d8e683 feat: Place the macro Q_ENUM after the enum declaration
This macro registers enum type with the meta-object system.

Log: 
Influence: qml access window's flags.
Change-Id: I9dfef86724a86c04b7a0fa4b36436464bd12d7da
2022-07-19 10:22:35 +08:00
Chen Bin 918da56c8d fix: DCI icon paint failed when size is invalid
When the iconsize parameter does not exist, we still expect
to draw the DCI icon instead of returning an error. Because
the icon passed in by the user already contains the size of
the icon.

The ok variable is not used. We need to use it as the judgment
condition for the success of integer conversion.

Log:
Influence: DCI Icons
Change-Id: I3a26102819542718af97aa8ff373b05cfc5de61f
(cherry picked from commit 58088867b060426cee52a7656a0986862e6ef8c9)
2022-07-19 10:22:35 +08:00
zccrs 2b30030af2 feat: 根据DCI标准添加DDciIcon类
DDciIcon 类为 Dci 文件和 Dci 图标资源提供了一个
严格标准的图标实例。通过将标准的 DCI 图标文件或图标
数据解析成可添加到 Dtk 控件中的图标资源。通常的这类
标准的图标资源都包含{ 深浅主题、图标状态、以及不同类
型 }。该类将根据当前需要的状态,将对应的图标展现出来。

 DDciIcon 所需要的原始数据文件最少需要一个 Normal
状态下的图标资源,否则此 Icon 将被视为是空图标。对于
有不同状态的图标资源,DDciIcon 在绘制时会优选选择使
用其自带的内容,但对于目标状态和图标状态不同的图标资源,
其绘制会根据画笔的前景色进行统一处理。

针对图标种类,DDciIcon 存储一个当前图标的变量,如果在
绘制时未指定目标图标种类,则会获取默认的当前图标种类变量
进行绘制,默认的当前图标种类为 TextType,不同的图标种
类其绘制方式也不一样,种类包含{ TextType、ActionType、
IconType }。详细描述请查阅DTK相关文档。

Log:
Influence: 无
Change-Id: Ia85d64e0885674d8b8ff8c17587f3781ac54d6b2
(cherry picked from commit 62f7b1d290841372a6dbe6e03a034bec093febb6)
2022-07-19 10:22:35 +08:00
Ye ShanShan b22b1d6aa2 feat: Add user manual functon
widgets and quick both use user manual,
so it is moved from DApplication.

Log: 
Influence: dtkdeclarative relys on this commit.
Change-Id: Ie2a5fb7edffb9ceeee48d42ba1b396291a4e5539
2022-07-19 10:22:35 +08:00
zccrs 6e800eb1d8 fix: Avoid repeatedly turning on notitlebar mode
Only in the enable state to initialize the window radius property.

Log:
Influence: None
Change-Id: I025bd95fe50834c8dbbbe8ca3f72945b0209af13
2022-07-19 10:22:35 +08:00
zccrs b40b8b42a8 feat: Add DIconTheme class
DIconTheme 提供从图标主题中查找 QIcon 的功能,与 QIcon::fromTheme
不同的是,DIconTheme 默认不会通过 Qt platform theme 进行图标加载,
而是直接创建内置图标引擎,或者是 XdgIconLoaderEngine,这样可以保证
在任何桌面环境下使用此接口的程序都能正确的查找到图标,这对 DTK 程序
而言非常重要,因为它们一般都还会依赖 DBuiltinIconEngine 提供的功能。

Log:
Influence: 无
Change-Id: I34ff035ffc7b3cfece780fe2676553638904a00d
2022-07-19 10:22:35 +08:00
ck d8f440c01e fix: dock radius changed when set global windowradius
if user has set windowradius, we do not set again when
DPlatformTheme::windowRadiusChanged emit.

Bug: https://pms.uniontech.com/bug-view-147219.html
Log: fix dock radius changed when set global windowradius
Influence: dock radius
Change-Id: Iba8226a67bbc5dfdac4151ab046725b3b1dca512
2022-07-13 14:42:41 +08:00
justforlxz ede95f3d9d feat: update archlinux build
update archlinux build

Log:
2022-06-21 17:43:35 +08:00
justforlxz 9777dc8959 feat: add archlinux build
sync from deepin-community

Log:
2022-06-21 13:08:01 +08:00
ck b24280bbe0 fix: dcc 再次调用 setSingleInstance后无法启动
旧版控制中心有使用不同的 key 再次调用 setSingleInstance
本次修改后,同一个进程多次调用接口使用后调用的key来锁定文件,符合
之前的 local server close 再 listen 的逻辑。

Influence: dcc setSingleInstance twice
Log: 修复dtkgui升级后dcc无法启动的问题
Change-Id: I97d9146be88d34cc12d16fc75cd1eccdeb53c315
2022-06-06 14:53:24 +08:00
WangFei 86e21e00d0
fix: 修改深色模式下TextWarning的色值 (#23)
修改深色模式下TextWarning的色值为E43F2E

Log:
Task: https://pms.uniontech.com/task-view-138099.html
Influence: 深色模式TextWarning调色板
2022-06-01 09:19:44 +08:00
deepin-bot[bot] fe8ae12998
chore: Sync by 99dfe0471c (#22)
chore: Sync by 99dfe0471c
2022-05-19 03:38:46 +00:00
deepin-bot[bot] 6ef15092b2
File Sync from linuxdeepin/.github (#21)
chore: Sync by b5a441b9bb
2022-04-21 07:01:55 +00:00
deepin-bot[bot] a7b6d0cbe0
chore: Sync by 41155231b0 (#20)
chore: Sync by 41155231b0
2022-04-18 09:42:45 +00:00
mike 0ff3c8fa33
fix: 修复异常退出时再次启动失败的问题 (#18)
reverts commit 88e0b51da7
去掉原来通过共享内存记录pid的方式来避免快速启动应用导致单进程失败的实现
改成启动时通过QLockFile来确保是 server 还是 client。保证只有一个 server ,其他
都是 client (旧逻辑:启动先通过localsocket连接 localserver,连接失败再启动
server,正常启动时没有问题, 当脚本快速多次启动(detached)单进程应用时,都在
等待连接,超时之后就启动了多个应用)

Bug: https://pms.uniontech.com/bug-view-111699.html
Log:
Influence: single-instance
Change-Id: I9b38e039abbbd70de969a1abf2f4f37fe07e1315

Co-authored-by: ck <chenke@uniontech.com>
2022-04-02 14:16:50 +08:00
justforlxz 7dd939a80f fix: remove old archlinux build check
It will use the new version profile in the near future.

Log:
2022-03-30 11:04:38 +08:00
Arun Kumar Pariyar 18ee272b32 fix: use detected pkg-config to fix cross build.
Debian Bug: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=979451

Log:
2022-03-17 14:05:47 +08:00
deepin-bot[bot] 1fe66600c3
File Sync from linuxdeepin/.github (#17)
chore: Sync by d459ab5b73
2022-03-15 08:13:54 +00:00
AlexOne 55351686f0 chore: 按照要求修改单元测试生成文件名
按照要求修改单元测试生成文件名

Log:
Influence: none
Change-Id: I032d0f01fc9e11238b6e7a81bf08d62eb81074e0
2022-02-21 13:11:57 +08:00
AlexOne 24b51b64f2 chore: 修改单元测试生成目录
修改单元测试相关文件的目录结构

Log:
Influence: 单元测试目录结构
Change-Id: Idcd26a04e02fc16dd2f83ed6f3cddf6c87f4ba24
2022-02-18 11:11:17 +08:00
AlexOne 3ecea3b455 feat: 支持无标题、窗口圆角、系统菜单
窗口圆角、系统菜单兼容旧借口,新增无标题栏的适配

Log: 支持无标题、窗口圆角、系统菜单
Task: https://pms.uniontech.com/zentao/task-view-93008.html
Influence: 所有dtk应用的标题栏、窗口圆角
Change-Id: Ia847505216521c0206776b5159fe4ae5b41df1b8
2021-12-09 16:03:52 +08:00
ck 99b89b3943 chore: dnd-example 优化及编译问题修复
1. 部分文件路径变化导致头文件找不到修复
2. 编译报错修复
3. 添加 ignore 的行为处理,当 client 拒绝时server不再继续走进度

Log:
Influence: none
Change-Id: Idd2d0df213d4c532b9fef35e0f4f6d60ec14a297
2021-12-08 16:17:55 +08:00
chenke 86b29ebcdf Revert "fix: 判断特殊环境逻辑写反了"
This reverts commit cf580cd804.

Reason for revert: <是否特效而非是否专有设备>

Change-Id: I64a692e7f223f715a9b77eebf28e918fae49ed14
2021-11-23 09:53:31 +08:00
ck cf580cd804 fix: 判断特殊环境逻辑写反了
没有加这个环境变量返回false,设置为1是true

Log:
Influence: 特殊设备判断
Change-Id: Ia7a99e20fa88a24a154196345762c4ceff6cec66
2021-11-20 14:18:10 +08:00
ck 6b4bc297d4 fix: 同一个进程再次调用单示例逻辑调整
再次调用不是直接返回true,而是不走guard守护这个逻辑。
修复控制中心再次直接运行无法激活前一个窗口的问题

Log:
Influence: 单进程接口优化
Bug: https://pms.uniontech.com/zentao/bug-view-103930.html
Change-Id: I4510f269b7c5bf8d7339f69d34d927cd4cf4d7ba
2021-11-20 12:59:00 +08:00
Ye ShanShan a53f41135d chore: 部分架构上单元测试打包错误
arm和mips架构,单元测试报munmap_chunk(): invalid pointer错误

Log: 
Influence: 单元测试报错
Change-Id: Iff51f48a20c318b0fabc6f9fe14afc00f46cf4cc
2021-11-01 15:07:12 +08:00
ck 10df23848f chore(build): add gtest-devel build required
添加gtest编译依赖

Log:
Influence: rpm 打包
Change-Id: Iccf61661a06aa75f388c88f978b98131e500e81c
2021-10-30 12:46:29 +08:00
zsien 0c81b195bf chore: 修复 euler 打包失败
* 增加依赖 dtkcommon-devel、gtest、gmock
* 删除 %{_sysconfdir}/dbus-1/system.d/com.deepin.dtk.FileDrag.conf
* 增加 %{_libexecdir}/dtk5/dde-kwin-debug

Log:
Influence: euler 打包
Change-Id: Iea46a5f29ae901dd3d556d55376b0520e9d7a521
2021-10-29 16:46:45 +08:00
ck 03fb207df5 chore(build): 增加qmake/cmake文件生成条件
仅仅当设置 qmake 变量DTK_MULTI_VERSION才生成5.5的qmake/cmake文件

Log:
Influence: build
Change-Id: I1ee763c8099c5cac0b84b4d450d97f41efed4d2d
2021-10-27 09:50:18 +08:00
AlexOne c30d53d1ec fix: 多次调用单例实例导致的应用启动不了
同一进程多次调用单例实例导致的应用启动不了。
主要在于应用使用旧的接口未更新,库的接口被依赖更新时发生的部分应用启动不了。

Influence: 所有 dtk 设置了单实例的应用

Log:
Change-Id: Ie7a97aec12ac584bbe8278c5144bc9288db614aa
(cherry picked from commit 71eabfd27f)
2021-10-18 16:14:17 +08:00
Wang Penga 8350799750 feat: 添加获取特效开关的接口
专有设备性能优化,需要获取环境变量判断当前是否开启了特效。

Log:
Change-Id: I674091c0580edeb5600cdc27ac0c40d3c76908b8
2021-10-15 15:33:16 +08:00
Chen Bin abd1a8d3e2 chore: 清除 QDoc 运行时的警告信息
1. 修改注释中错误的用法,以减少 QDoc 运行
时的报错。
2. 对部分缺失注释的类添加注释。

Log:
Change-Id: I9e2ca9b88ea0385e3bc991b2c16484f306c7b3a2
2021-09-09 16:48:47 +08:00
ck d2b41535cd chore: 部分单元测试依赖窗口特效
windowmanager有些单元测试写的不合理,用来判断是否开启特效是否支持模糊的不能直接
断定为true. platformhandle部分接口需要有模糊支持才能成功。

Log:
Change-Id: I7a03d4954d23e0d96a560c20f9c5b155aa2f0713
(cherry picked from commit e3fe88eb0d)
2021-09-06 11:01:55 +08:00
Chen Bin ec1f342a38 docs: 更新dtkgui项目注释
1. 增加QDoc注释识别配置文件
2. 修改项目注释信息,使QDoc能够正确识别
3. 修改一些不规范的注释,调整部分注释内容
4. 将部分.h文件的注释信息迁移到.cpp文件中

Log: 更新项目注释信息
Change-Id: Ide1db246b78b004b90f35be9e8201f040691a489
2021-08-18 14:14:07 +08:00
ut003691 df4d814658 feat: 添加dde-kwin-debug工具
一个监测程序启动到界面显示所用时间的工具,用来评估程序的启动性能

Log:
Change-Id: I0c9fab12d3530cd43151a9ff32187ff0a4f20d3d
2021-07-30 13:11:01 +08:00
ck 14a2e1a0e1 feat: 输出测试报告xml文件
增加测试用例输出成xml,便于后端获取测试报告数据

Log: UT输出xml报告数据
Change-Id: I313b9ed21d60b12021972dd1535b4ec5c01b79ac
2021-07-07 17:38:49 +08:00
wangpenga ffab5edef0 fix: 单元测试内存泄露
修复单元测试中 dforeignwindow 的内存泄露。

Log:
Change-Id: I531c233c6496b9ea1e2f62185b86181d160753aa
2021-07-06 09:11:34 +08:00
Chen Bin 17b58b0bb7 chore: 单元测试文件增加copyright
补上单元测试文件遗漏的copyright

Log:
Change-Id: Ia678a90b33ea4bd7e70c6f4013d5ba1befccf9c9
(cherry picked from commit 06462b7dda026efa7d46d837f86951108c28bacb)
2021-07-02 11:37:24 +08:00
wangfei a0d4c793e1 fix: cppcheck错误警告修改
单参数构造函数添加explicit关键字,局部变量声明

Log: 修复cppcheck错误及警告
Change-Id: I187ec230376c3f72488e13509b87bcfdb5dd90c5
(cherry picked from commit 3ccc4785ef)
(cherry picked from commit f6c6854942b7b9ec26dc99d556ce39755910cce7)
2021-07-02 11:37:05 +08:00
Chen Bin 118cf1daeb fix: 修复上游filedrag.conf问题
将FileDrag中的dbus改为session级别

Log:
Bug: https://pms.uniontech.com/zentao/bug-view-78217.html
Change-Id: I721040c68a9a351e57f50d4ca1b9ba00b5de1a80
(cherry picked from commit b26b6acc13)
(cherry picked from commit 68331aed06786742433d85613441cb5b410b1ee2)
2021-07-02 10:34:40 +08:00
Chen Bin 0ee689b9c0 chore: 添加一包多版本依赖的注释
更新一包多依赖pro文件注释

Log: 
Change-Id: I7db4eac6196eb72f3c5c6710ca144c3fc30516db
(cherry picked from commit 215c1f9efe93dc06d427c029735de9df502744fb)
2021-07-01 16:58:06 +08:00
wangpenga b1c55d7fa4 chore: update abi json file
按照新的规则要求更新abi文件。

Log:
Change-Id: Ia7c771466a66b445aa7bf5b64f75a57e2973902d
2021-06-22 17:03:36 +08:00