From af9c9091ed69394171485aa4c4814504f86f2004 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Mon, 23 Jan 2012 20:08:12 +0100 Subject: Simple image blit. New slider class. New filenamelineedit. New pixelbuffer used for drawing everything but the root window - with alpha blending... --- plugingui/label.cc | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) (limited to 'plugingui/label.cc') diff --git a/plugingui/label.cc b/plugingui/label.cc index a8ff0ae..1bb7a5f 100644 --- a/plugingui/label.cc +++ b/plugingui/label.cc @@ -28,22 +28,29 @@ #include "painter.h" -Label::Label(GlobalContext *gctx, Widget *parent) - : Widget(gctx, parent) +#include +//#include + +#include "img_test.h" + +GUI::Label::Label(GUI::Widget *parent) : GUI::Widget(parent) { } -void Label::setText(std::string text) +void GUI::Label::setText(std::string text) { _text = text; - repaint(NULL); + repaintEvent(NULL); } -void Label::repaint(RepaintEvent *e) +void GUI::Label::repaintEvent(GUI::RepaintEvent *e) { - Painter p(gctx, wctx); + // printf("Label::repaintEvent\n"); + Painter p(this); p.setColour(Colour(1)); - p.drawText(10, height() / 2 + 4, _text); + + Font font; + p.drawText(10, height() / 2 + 4, font, _text); } -- cgit v1.2.3