summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYoann Lopes <yoann.lopes@nokia.com>2010-10-27 12:56:49 +0200
committerYoann Lopes <yoann.lopes@nokia.com>2010-10-27 12:56:49 +0200
commit731928d2f7bbf13da761e2daad8e1effb8403767 (patch)
tree48d21ab15bb4b2a43af3e085b621da81561f22ac
parent78d3168972134a464adad500ae0d66e422fcf3f3 (diff)
Changed output panel font.
-rw-r--r--src/mainwindow.cpp19
-rw-r--r--src/mainwindow.ui6
2 files changed, 19 insertions, 6 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index 2bc106e..baffed7 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -66,6 +66,19 @@
#include <QApplication>
#include <QScrollBar>
+#ifdef Q_WS_MAC
+ enum { DEFAULT_FONT_SIZE = 12 };
+ static const char *DEFAULT_FONT_FAMILY = "Monaco";
+#else
+#ifdef Q_WS_X11
+ enum { DEFAULT_FONT_SIZE = 9 };
+ static const char *DEFAULT_FONT_FAMILY = "Monospace";
+#else
+ enum { DEFAULT_FONT_SIZE = 10 };
+ static const char *DEFAULT_FONT_FAMILY = "Courier";
+#endif
+#endif
+
QtDirectory *MainWindow::currentRepository = 0;
TestProfile *MainWindow::currentProfile = 0;
TestGraphicsView *MainWindow::view = 0;
@@ -206,6 +219,12 @@ MainWindow::MainWindow(QWidget *parent) :
ui->actionZoom_In->setShortcut(QKeySequence::ZoomIn);
ui->actionZoom_Out->setShortcut(QKeySequence::ZoomOut);
+ QFont font;
+ font.setFamily(QString::fromUtf8(DEFAULT_FONT_FAMILY));
+ font.setPointSize(DEFAULT_FONT_SIZE);
+ ui->output->setFont(font);
+
+
connect(Logger::getIt(), SIGNAL(newLog(QString)), this, SLOT(onNewLogReceived(QString)));
view = new TestGraphicsView(ui->viewContainer);
diff --git a/src/mainwindow.ui b/src/mainwindow.ui
index 279d1b8..43aa674 100644
--- a/src/mainwindow.ui
+++ b/src/mainwindow.ui
@@ -272,12 +272,6 @@ background-color: qlineargradient(spread:pad, x1:0.5, y1:0, x2:0.5, y2:1, stop:0
<layout class="QVBoxLayout" name="verticalLayout_4">
<item>
<widget class="QTextEdit" name="output">
- <property name="font">
- <font>
- <family>FreeMono</family>
- <pointsize>9</pointsize>
- </font>
- </property>
<property name="undoRedoEnabled">
<bool>false</bool>
</property>