After registering the DciIcon as a meta type, it is
convenient for applications to use it on QVariant.
The << and >> operators are provided to facilitate
applications to read and write.
Log:
Influence: None
Change-Id: I0df76a9e5378a46dcb075b2368fd05eb360d074d
In the method of getting icons in QML, only the mode of
the icon needs to be fallback, so change all fallback to
only fallback mode to ensure the consistency of the interface.
Log:
Influence: None
Change-Id: If95c352b77c89fba2e393e542d43f19aff665ba3
When using DciIcon, it is allowed to apply a fallback mechanism
that does not use DciIcon's own. In this case, the target icon
will be found directly by the parameters.
Log:
Influence: None
Change-Id: Ia288e3ba3bd08c2a7729cf9f6154e77e4ad7b512
1. For icons that do not use the palette, it is hoped that the
effect can be achieved by modifying the brightness of icons in
different states. Therefore, it is necessary to add an interface
for DciIcon to determine whether to use the palette.
2. Add the interface to modify the icon style by default, traverse
the pixels of the picture, and uniformly reduce the brightness.
Log:
Influence: None
Change-Id: I2c8592fab72751f887b51d48f346e562f82a51cc
When the picture data is empty, an uninitialized variable generates a
random-size picture, which takes up a lot of memory space. So these
variables must be initialized before they can be used to prevent unknown
problems.
Log:
Influence: Dci Icon
Change-Id: Ife9f6e02f3fe2cc07e9d6f9f39d76b6230c6c930
When looking for icon theme, redundant '/' symbols will
appear in the icon of parsing application.
Log:
Influence: None
Change-Id: Ib55a8d6132eb1ed2aec98918529d59c3dd9c9536
it's convenient for qml moved openUrl from dtkwidget to dtkgui.
Log:
Influence: dtkdeclarative relys on this commit.
Change-Id: I7f720b02e91467a2bfb2bd3608afba8ad0d12312
widgets and quick both use user manual,
so it is moved from DApplication.
Log:
Influence: dtkdeclarative relys on this commit.
Change-Id: Ie2a5fb7edffb9ceeee48d42ba1b396291a4e5539
1. Separate the logic of each step so that the parsing part of each
property does not interfere with each other.
2. Fix the problem of parsing failure when it has `padding` and no
`palette` in the property
Log:
Influence: None
Change-Id: I35c2b807a72d6329a222fbcd99ce5b656e1dc412
Use the '/' to split the icon group name and it's actual icon name.
In the dtkdeclarative and dtkwidget, should be add the application
id for prefix for the icon name, eg: the "test" built-in icon in the
"org.deepin.app" application, when to find it with
DIconTheme::findDciIconFile, the "iconName" argument should is
"org.deepin.app/test".
Influence: 无
Log:
Change-Id: Icc45faf16926993a6281aca5bee995b839c5b462
Use the DStandardPaths::paths(DStandardPaths::DSG::DataDir) instead of
the DStandardPaths::path(DStandardPaths::DSG::DataDir), support multi
path for find icon from theme.
Influence: 无
Log:
Change-Id: Ie444eea4e6a93ff37a8585aee8b451940302cd7f
DCI icons need the support of webp plugin when parsing
some icons, otherwise the images will not be displayed
normally.
Log:
Influence: Dtkgui dependence
Change-Id: I9c4a780dc23fdf2e96c9e23e6580b4efd56f695b
Fast scaling of the image will cause aliasing problems, Use
smooth scaling to solve this problem.
Log:
Influence: Dci icon
Change-Id: I4fa8e464539e03bd7bee79fe2f3e34463b3bd6c3
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
Alpha8 format only retains the alpha channel, so the file size
of DCI icon will be effectively reduced. However, due to the
compression problem of some image formats, this behavior only
supports images in the format of "PNG".
Log:
Influence: dci icon
Change-Id: Ifbc99fc1a5995adbf593d24aa60b943a49d4b308
There may be situations where the icon data reading fails
or the icon file cannot be read, resulting in the inability
to obtain the pixmap data with warnings.
Log:
Influence: Built-in Icon
Change-Id: I6fa4677bc4c5d7986d5546c4068d390976591e98
We expect to find icons from built-in icon themes without icon themes.
Log:
Influence: DCI icon theme
Change-Id: Ie625c4f9c431c4fb95f5c509d16742715d79a9a1
Layers with some icons may have a padding attribute that
makes the layer not take up Icon space beyond the padding
area (based on this design).
1. Padding will increase in scale ratio to fit icon size
2. The resulting icon file will contain all sizes of the
icon (including padding sizes).
3. If the target icon size is larger than the source icon
size, padding scales to fit the icon size.
Log:
Influence: DCI icon
Change-Id: I5f1594e24202bf5ee1891885322e327d37344d23
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
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
Because of calculating the device ratio multi-times, painting icons
use a invalid size.
Log:
Influence: None
Change-Id: Ia6f5407a6bc4ad58781483c83ca08eec6a2a11a9
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
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
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
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
it's convenient for qml moved openUrl from dtkwidget to dtkgui.
Log:
Influence: dtkdeclarative relys on this commit.
Change-Id: I7f720b02e91467a2bfb2bd3608afba8ad0d12312
This macro registers enum type with the meta-object system.
Log:
Influence: qml access window's flags.
Change-Id: I9dfef86724a86c04b7a0fa4b36436464bd12d7da
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)
widgets and quick both use user manual,
so it is moved from DApplication.
Log:
Influence: dtkdeclarative relys on this commit.
Change-Id: Ie2a5fb7edffb9ceeee48d42ba1b396291a4e5539