Fix sizing issues and others
This commit is contained in:
parent
0b73f8037b
commit
a36386cc20
12 changed files with 325 additions and 142 deletions
|
|
@ -33,7 +33,7 @@ void ButtonWidget::setAction(const std::function<void()>& action) {
|
|||
void ButtonWidget::setColor(const RGBA& in) {
|
||||
mColor = in;
|
||||
mColorAnimated.setTargetColor(mColor);
|
||||
triggerWidgetUpdate();
|
||||
triggerWidgetUpdate("color changed");
|
||||
}
|
||||
|
||||
void ButtonWidget::process(const EventHandler& eventHandler) {
|
||||
|
|
@ -68,12 +68,14 @@ void ButtonWidget::mouseEnter() {
|
|||
mColorAnimated.endAnimation();
|
||||
|
||||
mColorAnimated.setTargetColor(mColorHovered);
|
||||
mColorAnimated.updateCurrentRect();
|
||||
triggerWidgetUpdate();
|
||||
|
||||
// mColorAnimated.updateCurrentRect();
|
||||
triggerWidgetUpdate("button hovered");
|
||||
}
|
||||
|
||||
void ButtonWidget::mouseLeave() {
|
||||
mColorAnimated.setTargetColor(mColor);
|
||||
mColorAnimated.updateCurrentRect();
|
||||
triggerWidgetUpdate();
|
||||
//mColorAnimated.updateCurrentRect();
|
||||
|
||||
triggerWidgetUpdate("button out of focus");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue