Skip to content

Commit

Permalink
chore: correct typos about Dtk::Gui::DDciIcon::IconAttribute
Browse files Browse the repository at this point in the history
Log:
  • Loading branch information
felixonmars authored and 18202781743 committed Jan 9, 2025
1 parent 1ede364 commit d7ef87f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
4 changes: 2 additions & 2 deletions docs/util/ddciicon.zh_CN.dox
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ cmake --build build
| Light | 0 |
| Dark | 1 |

@enum Dtk::Gui::DDciIcon::IconAttibute
@enum Dtk::Gui::DDciIcon::IconAttribute
@brief DCI图标属性
@details
| 键 | 值 |
Expand Down Expand Up @@ -282,7 +282,7 @@ cmake --build build
@param[in] theme 图标主题
@param[in] mode 图标模式,默认为Normal

@fn bool Dtk::Gui::DDciIcon::isSupportedAttribute(DDciIconMatchResult result, IconAttibute attr)
@fn bool Dtk::Gui::DDciIcon::isSupportedAttribute(DDciIconMatchResult result, IconAttribute attr)
@brief 判断DCI图标是否支持指定属性
@param[in] result DCI图标匹配结果
@param[in] attr 图标属性
Expand Down
7 changes: 4 additions & 3 deletions include/util/ddciicon.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,10 @@ class DDciIcon
Light = 0,
Dark = 1
};
enum IconAttibute {
D_DECL_DEPRECATED enum IconAttibute {
HasPalette = 0x001
};
using IconAttribute = DDciIcon::IconAttibute;
enum IconMatchedFlag {
None = 0,
DontFallbackMode = 0x01,
Expand All @@ -106,8 +107,8 @@ class DDciIcon
int actualSize(int size, Theme theme, Mode mode = Normal) const;

QList<int> availableSizes(Theme theme, Mode mode = Normal) const;
bool isSupportedAttribute(DDciIconMatchResult result, IconAttibute attr) const;
static bool isSupportedAttribute(const DDciIconImage &image, IconAttibute attr);
bool isSupportedAttribute(DDciIconMatchResult result, IconAttribute attr) const;
static bool isSupportedAttribute(const DDciIconImage &image, IconAttribute attr);

QPixmap pixmap(qreal devicePixelRatio, int iconSize, Theme theme, Mode mode = Normal,
const DDciIconPalette &palette = DDciIconPalette()) const;
Expand Down
4 changes: 2 additions & 2 deletions src/util/ddciicon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -852,7 +852,7 @@ QList<int> DDciIcon::availableSizes(DDciIcon::Theme theme, DDciIcon::Mode mode)
return sizes;
}

bool DDciIcon::isSupportedAttribute(DDciIconMatchResult result, IconAttibute attr) const
bool DDciIcon::isSupportedAttribute(DDciIconMatchResult result, IconAttribute attr) const
{
switch (attr) {
case HasPalette:
Expand All @@ -864,7 +864,7 @@ bool DDciIcon::isSupportedAttribute(DDciIconMatchResult result, IconAttibute att
return false;
}

bool DDciIcon::isSupportedAttribute(const DDciIconImage &image, IconAttibute attr)
bool DDciIcon::isSupportedAttribute(const DDciIconImage &image, IconAttribute attr)
{
if (image.isNull())
return false;
Expand Down

0 comments on commit d7ef87f

Please sign in to comment.