summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Suhr Christensen <jsc@umbraculum.org>2014-10-22 15:07:20 +0200
committerJonas Suhr Christensen <jsc@umbraculum.org>2014-10-22 15:07:20 +0200
commit5ee9eea8553e1757ae6a1cdaf294dd69ff05ae4d (patch)
tree6233cb70827ca2cd8c371c47d2addb20c3fad7fd
parent327eca0ff84f7487d3f29eb612e79209001b3ef5 (diff)
Added additional border on textedit.
-rw-r--r--plugingui/plugingui.cc2
-rw-r--r--plugingui/textedit.cc2
2 files changed, 2 insertions, 2 deletions
diff --git a/plugingui/plugingui.cc b/plugingui/plugingui.cc
index d87f0c3..0a95e23 100644
--- a/plugingui/plugingui.cc
+++ b/plugingui/plugingui.cc
@@ -500,7 +500,7 @@ void PluginGUI::init()
*/
drumkitinfo = new GUI::TextEdit(window);
-// textedit->setText("Hello World\ten\tto\ttre fire fem seks syv otte ni ti elleve tolv tretten fjorten femten seksten sytten atten nitten \nHello World\nHello World\n");
+// drumkitinfo->setText("Hello World\ten\tto\ttre fire fem seks syv otte ni ti elleve tolv tretten\n\nHej med dig jeg har lavet dette widget og det opfører sig egentlig ganske fint\n\n\nni \n\nti elleve tolv \n\nTEST TEST TEST@\n\ntretten fjorten femten \n\nseksten sytten atten nitten \nHello World\nHello World\n");
drumkitinfo->move(370, 25);
drumkitinfo->resize(300, 300);
diff --git a/plugingui/textedit.cc b/plugingui/textedit.cc
index c0b4185..43be7aa 100644
--- a/plugingui/textedit.cc
+++ b/plugingui/textedit.cc
@@ -139,7 +139,7 @@ void GUI::TextEdit::repaintEvent(GUI::RepaintEvent *e)
for(size_t i = 0; i < line.length(); i++) {
size_t linewidth = font.textWidth(line.substr(0, i));
- if(linewidth >= width() - BORDER - 4 + 3) {
+ if(linewidth >= width() - BORDER - 4 + 3 - 10) {
p.drawText(BORDER - 4 + 3, ypos, font, line.substr(0, i));
ypos += font.textHeight();
line = line.substr(i);