diff options
-rw-r--r-- | plugingui/button.cc | 2 | ||||
-rw-r--r-- | plugingui/button.h | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/plugingui/button.cc b/plugingui/button.cc index 9248242..5ff97a7 100644 --- a/plugingui/button.cc +++ b/plugingui/button.cc @@ -132,7 +132,7 @@ void Button::repaintEvent(RepaintEvent *e) height()/2+5+1+(draw_state==up?0:1), font, text, true); } -void Button::setText(std::string text) +void Button::setText(const std::string& text) { this->text = text; repaintEvent(nullptr); diff --git a/plugingui/button.h b/plugingui/button.h index c13f7dd..e33c3a8 100644 --- a/plugingui/button.h +++ b/plugingui/button.h @@ -43,7 +43,7 @@ public: bool isFocusable() override { return true; } bool catchMouse() override { return true; } - void setText(std::string text); + void setText(const std::string& text); Notifier<> clickNotifier; @@ -51,8 +51,8 @@ protected: virtual void clicked() {} // From Widget: - virtual void repaintEvent(RepaintEvent *e) override; - virtual void buttonEvent(ButtonEvent *e) override; + virtual void repaintEvent(RepaintEvent* e) override; + virtual void buttonEvent(ButtonEvent* e) override; virtual void mouseLeaveEvent() override; virtual void mouseEnterEvent() override; |