From 3734f5d3c741e877c49ff1c99ce67cb4a764023b Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Fri, 20 Nov 2015 20:03:18 +0100 Subject: Only initialise Font once. --- plugingui/label.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugingui/label.cc') diff --git a/plugingui/label.cc b/plugingui/label.cc index 1de715b..18ba1e8 100644 --- a/plugingui/label.cc +++ b/plugingui/label.cc @@ -33,6 +33,7 @@ namespace GUI { Label::Label(GUI::Widget *parent) : Widget(parent) + , font(":fontemboss.png") { } @@ -50,7 +51,6 @@ void Label::repaintEvent(GUI::RepaintEvent* repaintEvent) p.setColour(Colour(1)); - Font font(":fontemboss.png"); p.drawText(10, (height() + font.textHeight()) / 2, font, _text, true); } -- cgit v1.2.3