summaryrefslogtreecommitdiff
path: root/client/resumewidget.cc
diff options
context:
space:
mode:
Diffstat (limited to 'client/resumewidget.cc')
-rw-r--r--client/resumewidget.cc31
1 files changed, 7 insertions, 24 deletions
diff --git a/client/resumewidget.cc b/client/resumewidget.cc
index ae6bec9..ac18578 100644
--- a/client/resumewidget.cc
+++ b/client/resumewidget.cc
@@ -32,10 +32,14 @@
#include <QTextEdit>
#include <QDialog>
+#include <QFont>
+
#define MAX_COMPACT_SIZE 100
//#define RICH // Experimental syntax highlighter (numbers turn blue)
-//#define FIXED_FONT // Show the resume, using a fixed font.
+#define FIXED_FONT // Show the resume, using a fixed font.
+
+extern QFont *fixedfont; // Defined in pracro.cc
ResumeWidget::ResumeWidget(bool compact)
{
@@ -79,24 +83,6 @@ 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;
@@ -104,9 +90,7 @@ void ResumeWidget::setText(QString text)
fulltext = text;
#ifdef FIXED_FONT
- QFont font = resume->font();
- font.setFamily("Courier New");
- resume->setFont(font);
+ resume->setFont(*fixedfont);
#endif
#ifdef RICH
@@ -135,8 +119,7 @@ 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);
}