Index: src/os.h
===================================================================
--- src/os.h	(revision 6dfdef0c3ed18ad35c1221a71d194353eeee6eb7)
+++ src/os.h	(revision 281303f1f7b967fd51b5ed994dc8305e849198d9)
@@ -43,4 +43,5 @@
 #endif // ARCH
 
+// Target OS detection. Done by Qt, so should work with any compiler.
 #ifdef Q_OS_AIX
 	#define OS "AIX"ARCH
Index: src/settingsdialog.cpp
===================================================================
--- src/settingsdialog.cpp	(revision 6dfdef0c3ed18ad35c1221a71d194353eeee6eb7)
+++ src/settingsdialog.cpp	(revision 281303f1f7b967fd51b5ed994dc8305e849198d9)
@@ -28,4 +28,127 @@
 {
 	setupUi(this);
+	// Laying out elements
+#ifdef Q_OS_WINCE
+	// Layout helper elements
+QVBoxLayout *vbox1, *vbox2;
+QHBoxLayout *hbox1, *hbox2;
+QSpacerItem *spacer;
+
+	labelRandMin->setSizePolicy(QSizePolicy::Expanding,QSizePolicy::Preferred);
+	labelRandMax->setSizePolicy(QSizePolicy::Expanding,QSizePolicy::Preferred);
+
+	// Top part (with white bg)
+	vbox2 = new QVBoxLayout(bgWhite);
+	vbox2->addWidget(groupRandomSettings);
+	vbox2->addWidget(groupOutputSettings);
+	spacer = new QSpacerItem(0,0,QSizePolicy::Minimum,QSizePolicy::Expanding);
+	vbox2->addItem(spacer);
+
+	// Output settings group
+	hbox1 = new QHBoxLayout(groupOutputSettings);
+	hbox1->addWidget(buttonFont);
+	hbox1->addWidget(buttonColor);
+
+	// Bottom part (with grey bg)
+	hbox2 = new QHBoxLayout(bgGrey);
+	hbox2->setMargin(6);
+	hbox2->setSpacing(6);
+	hbox2->addWidget(buttonHelp);
+	spacer = new QSpacerItem(0,0,QSizePolicy::Expanding);
+	hbox2->addItem(spacer);
+	hbox2->addWidget(buttonOK);
+	hbox2->addWidget(buttonCancel);
+
+	// Central layout
+	vbox1 = new QVBoxLayout(this);
+	vbox1->setMargin(0);
+	vbox1->setSpacing(0);
+	vbox1->addWidget(bgWhite);
+	vbox1->addWidget(lineHorizontal);
+	vbox1->addWidget(bgGrey);
+#else
+	// Layout helper elements
+QVBoxLayout *vbox1, *vbox2, *vbox3;
+QHBoxLayout *hbox1, *hbox2, *hbox3;
+QSpacerItem *spacer;
+
+	cbSaveState = new QCheckBox(bgWhite);
+	cbSaveState->setObjectName("cbSaveState");
+#ifndef QT_NO_STATUSTIP
+	cbSaveState->setStatusTip(trUtf8("Restore main window state and position on application restart"));
+#endif // QT_NO_STATUSTIP
+	cbSaveState->setText(trUtf8("Save main window state and position"));
+	cbSaveState->setCursor(QCursor(Qt::PointingHandCursor));
+
+	imgIcon = new QLabel(this);
+	imgIcon->setObjectName("imgIcon");
+	imgIcon->setFrameShape(QFrame::StyledPanel);
+	imgIcon->setLineWidth(0);
+	imgIcon->setPixmap(QPixmap(QString::fromUtf8(":/images/icons/preferences_system.png")));
+	imgIcon->setStyleSheet("background-color: #0080C0;");
+	imgIcon->setAlignment(Qt::AlignCenter);
+
+	labelHint = new QLabel(bgGrey);
+	labelHint->setObjectName("labelHint");
+	labelHint->setSizePolicy(QSizePolicy::Expanding,QSizePolicy::Preferred);
+	labelHint->setMinimumSize(QSize(175,28));
+	labelHint->setMaximumSize(QSize(0xFFFFFF,28));
+	labelHint->setTextFormat(Qt::PlainText);
+//	labelHint->setAlignment(Qt::AlignLeft | Qt::AlignTop);
+	labelHint->setWordWrap(true);
+#ifndef QT_NO_STATUSTIP
+	labelHint->setStatusTip(trUtf8("Hover mouse pointer over dialog elements to get additional help"));
+#endif // QT_NO_STATUSTIP
+
+	lineVertical = new QFrame(this);
+	lineVertical->setObjectName("lineVertical");
+	lineVertical->setFrameShadow(QFrame::Plain);
+	lineVertical->setFrameShape(QFrame::VLine);
+	lineVertical->setLineWidth(2);
+
+	// Top line
+	hbox1 = new QHBoxLayout();
+	hbox1->addWidget(imgIcon);
+	hbox1->addWidget(lineVertical);
+	hbox1->addWidget(bgWhite);
+
+	// Output settings group
+	vbox3 = new QVBoxLayout(groupOutputSettings);
+	vbox3->addWidget(buttonFont);
+	vbox3->addWidget(buttonColor);
+
+	// Random and Output settings groups
+	hbox2 = new QHBoxLayout();
+	hbox2->addWidget(groupRandomSettings);
+	hbox2->addWidget(groupOutputSettings);
+	spacer = new QSpacerItem(0,0,QSizePolicy::Expanding);
+	hbox2->addItem(spacer);
+
+	// Top right part (with white bg)
+	vbox2 = new QVBoxLayout(bgWhite);
+	spacer = new QSpacerItem(0,0,QSizePolicy::Minimum,QSizePolicy::Expanding);
+	vbox2->addItem(spacer);
+	vbox2->addLayout(hbox2);
+	vbox2->addWidget(cbSaveState);
+	spacer = new QSpacerItem(0,0,QSizePolicy::Minimum,QSizePolicy::Expanding);
+	vbox2->addItem(spacer);
+
+	// Bottom part (with grey bg)
+	hbox3 = new QHBoxLayout(bgGrey);
+	hbox3->setMargin(6);
+	hbox3->setSpacing(6);
+	hbox3->addWidget(buttonHelp);
+	hbox3->addWidget(labelHint);
+	hbox3->addWidget(buttonOK);
+	hbox3->addWidget(buttonCancel);
+
+	// Central layout
+	vbox1 = new QVBoxLayout(this);
+	vbox1->setMargin(0);
+	vbox1->setSpacing(0);
+	vbox1->addLayout(hbox1);
+	vbox1->addWidget(lineHorizontal);
+	vbox1->addWidget(bgGrey);
+#endif // Q_OS_WINCE
 	connect(buttonOK,SIGNAL(clicked()),this,SLOT(accept()));
 	connect(buttonCancel,SIGNAL(clicked()),this,SLOT(reject()));
Index: src/settingsdialog.h
===================================================================
--- src/settingsdialog.h	(revision 6dfdef0c3ed18ad35c1221a71d194353eeee6eb7)
+++ src/settingsdialog.h	(revision 281303f1f7b967fd51b5ed994dc8305e849198d9)
@@ -26,9 +26,5 @@
 
 #include "globals.h"
-#ifdef Q_OS_WINCE
-	#include "ui_settingsdialog.ce.h"
-#else
-	#include "ui_settingsdialog.h"
-#endif // Q_OS_WINCE
+#include "ui_settingsdialog.h"
 
 class SettingsDialog: public QDialog, public Ui::SettingsDialog
@@ -37,13 +33,20 @@
 public:
 	SettingsDialog(QWidget *parent = 0);
+	bool colorChanged() const;
 	bool fontChanged() const;
-	bool colorChanged() const;
+
+#ifndef Q_OS_WINCE
+	QCheckBox *cbSaveState;
+	QLabel *imgIcon;
+	QLabel *labelHint;
+	QFrame *lineVertical;
+#endif // Q_OS_WINCE
 
 private:
-	QSettings *settings;
+	QColor color;
 	QFont font;
-	QColor color;
 	bool newFont;
 	bool newColor;
+	QSettings *settings;
 #ifndef Q_OS_WINCE
 	bool event(QEvent *);
@@ -52,7 +55,7 @@
 private slots:
 	void accept();
+	void buttonColorClicked();
+	void buttonFontClicked();
 	void spinRandMinValueChanged(int val) { spinRandMax->setMinimum(val + 1); }
-	void buttonFontClicked();
-	void buttonColorClicked();
 };
 
