summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
Diffstat (limited to 'client')
-rw-r--r--client/resumewidget.cc21
1 files changed, 20 insertions, 1 deletions
diff --git a/client/resumewidget.cc b/client/resumewidget.cc
index 6877c54..ae6bec9 100644
--- a/client/resumewidget.cc
+++ b/client/resumewidget.cc
@@ -79,6 +79,24 @@ static QString reformatString(QString help)
return output;
}
+#define LONGLINE 100
+static size_t countLongLines(QString str)
+{
+ str += "\n"; // Make sure we end at a newline.
+ size_t n = 0;
+ size_t len = 0;
+ for(size_t i = 0; i < (size_t)str.length(); i++) {
+ if(str[i] != '\n') {
+ len++;
+ } else {
+ n += len / LONGLINE;
+ len = 0;
+ }
+ }
+
+ return n;
+}
+
void ResumeWidget::setText(QString text)
{
QString f;
@@ -117,7 +135,8 @@ void ResumeWidget::setText(QString text)
//resume->setWhatsThis(fulltext); // Only set tooltip if resume has actually been cut off.
}
}
-
+ size_t n = countLongLines(f);
+ for(size_t i = 0; i < n; i++) f.append('\n');
resume->setText(f);
}