Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/zjhzzy/FlareUI
Browse files Browse the repository at this point in the history
  • Loading branch information
zjhzzy committed Jul 22, 2023
2 parents 0b4c64f + 97ee1fa commit ae872a4
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
8 changes: 7 additions & 1 deletion PushButton.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,11 +151,17 @@ void Flare::PushButton::setAllIcon(const QIcon& icon) {
*buttonPressedIcon = icon;
}

Flare::PushButton::Icon Flare::PushButton::Icon::setAllIcon(const QIcon& icon) {
buttonIcon = icon;
buttonHoverIcon = icon;
buttonPressedIcon = icon;
}

void Flare::PushButton::setIcon(const Icon& icon) {
isIcon = true;
*buttonIcon = icon.buttonIcon;
*buttonHoverIcon = icon.buttonHoverIcon;
*buttonPressedIcon = icon.buttonPressedColor;
*buttonPressedIcon = icon.buttonPressedIcon;
}

bool Flare::PushButton::isSetIcon() {
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ FlareUI库是一个基于Qt库扩展的UI库,是为了开发者减少使用Qss
便可以实现
![窗口代码](assets\MainWindow.png)
![窗口代码](assets/MainWindow.png)
Expand Down Expand Up @@ -89,4 +89,4 @@ FlareUI库是一个基于Qt库扩展的UI库,是为了开发者减少使用Qss
我的博客:[zjhzzy](zjhzzy.github.io)
我会在上面发布一些关于这个库的进展以及一些示例
我会在上面发布一些关于这个库的进展以及一些示例
2 changes: 1 addition & 1 deletion include/FlareUI/PushButton.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ namespace Flare {
struct Icon {
QIcon buttonIcon;
QIcon buttonHoverIcon;
QIcon buttonPressedColor;
QIcon buttonPressedIcon;
Icon setAllIcon(const QIcon& icon);
};

Expand Down

0 comments on commit ae872a4

Please sign in to comment.