From cec1d9ea562e3d52c98f1219db5e186943f2f0d6 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Sun, 12 Feb 2017 11:07:22 +0100 Subject: Refactor/introduce widget and windiow redraw/dirty mechanism to eradicate unnecessary rendering passes during event handling. --- plugingui/checkbox.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'plugingui/checkbox.cc') diff --git a/plugingui/checkbox.cc b/plugingui/checkbox.cc index bada623..2a17635 100644 --- a/plugingui/checkbox.cc +++ b/plugingui/checkbox.cc @@ -62,13 +62,13 @@ void CheckBox::buttonEvent(ButtonEvent* buttonEvent) middle = true; } - repaintEvent(nullptr); + redraw(); } void CheckBox::setText(std::string text) { _text = text; - repaintEvent(nullptr); + redraw(); } void CheckBox::keyEvent(KeyEvent* keyEvent) @@ -85,7 +85,7 @@ void CheckBox::keyEvent(KeyEvent* keyEvent) middle = true; } - repaintEvent(nullptr); + redraw(); } } @@ -129,7 +129,7 @@ void CheckBox::mouseLeaveEvent() if(buttonDown) { middle = false; - repaintEvent(nullptr); + redraw(); } } @@ -139,7 +139,7 @@ void CheckBox::mouseEnterEvent() if(buttonDown) { middle = true; - repaintEvent(nullptr); + redraw(); } } @@ -152,7 +152,7 @@ void CheckBox::internalSetChecked(bool checked) state = checked; stateChangedNotifier(state); - repaintEvent(nullptr); + redraw(); } } // GUI:: -- cgit v1.2.3