Allow different icon on RoundButton hover.

This commit is contained in:
John Preston 2021-01-15 16:56:57 +04:00
parent 239cec923f
commit 55a97c0106
2 changed files with 5 additions and 1 deletions

View file

@ -392,7 +392,10 @@ void RoundButton::paintEvent(QPaintEvent *e) {
_numbers->paint(p, textLeft, textTop, width());
}
if (!_st.icon.empty()) {
_st.icon.paint(p, QPoint(iconLeft, iconTop), width());
const auto &current = ((over || down) && !_st.iconOver.empty())
? _st.iconOver
: _st.icon;
current.paint(p, QPoint(iconLeft, iconTop), width());
}
}

View file

@ -93,6 +93,7 @@ RoundButton {
textTop: pixels;
icon: icon;
iconOver: icon;
iconPosition: point;
font: font;