Browse Source

Tweaked FirstRunDialog

- Improved optics of firstrundialog
- Added choices for some new settings, mostly currencies
- Added an option to choose the style at firstrun
- Couple of fixes in settingswidget
Felix Turo 4 years ago
parent
commit
f40334ac50

+ 1 - 1
main.cpp

@@ -61,7 +61,7 @@ int main(int argc, char *argv[])
             return 3;
         }
         ASettings::write(ASettings::Main::SetupComplete, true);
-        DEB << "Wrote setup_commplete?";
+        DEB << "Wrote setup_commplete";
     }
 
     ARunGuard guard(QStringLiteral("opl_single_key"));

+ 22 - 1
mainwindow.cpp

@@ -19,6 +19,7 @@
 #include "ui_mainwindow.h"
 #include "src/testing/adebug.h"
 #include "src/database/adatabase.h"
+#include "src/classes/astyle.h"
 
 MainWindow::MainWindow(QWidget *parent)
     : QMainWindow(parent)
@@ -138,7 +139,27 @@ void MainWindow::connectWidgets()
 
 void MainWindow::readSettings()
 {
-    DEB << "Use system font?" << ASettings::read(ASettings::Main::UseSystemFont).toBool();
+    // Set application style
+    auto style_setting = ASettings::read(ASettings::Main::Style).toString();
+
+    if (style_setting == QLatin1String("Dark-Palette")) {
+        AStyle::setStyle(AStyle::darkPalette());
+        return;
+    }
+    for (const auto &style_name : AStyle::styles) {
+        if (style_setting == style_name) {
+            AStyle::setStyle(style_name);
+            return;
+        }
+    }
+
+    for (const auto &style_sheet : AStyle::styleSheets) {
+        if (style_setting == style_sheet.styleSheetName) {
+            AStyle::setStyle(style_sheet);
+            return;
+        }
+    }
+
     if (!ASettings::read(ASettings::Main::UseSystemFont).toBool()) {
         QFont font(ASettings::read(ASettings::Main::Font).toString());
         font.setPointSize(ASettings::read(ASettings::Main::FontSize).toUInt());

+ 31 - 1
src/classes/asettings.cpp

@@ -49,12 +49,14 @@ QMap<ASettings::UserData, QString> ASettings::userDataMap = {
     {UserData::MedCurrencyDate,         QStringLiteral("medCurrencyDate")},
     {UserData::Custom1CurrencyDate,     QStringLiteral("custom1CurrencyDate")},
     {UserData::Custom2CurrencyDate,     QStringLiteral("custom2CurrencyDate")},
+    {UserData::Custom1CurrencyName,     QStringLiteral("custom1CurrencyName")},
+    {UserData::Custom2CurrencyName,     QStringLiteral("custom2CurrencyName")},
 };
 
 QMap<ASettings::FlightLogging, QString> ASettings::flightLoggingMap = {
     {FlightLogging::Function,           QStringLiteral("function")},
     {FlightLogging::Approach,           QStringLiteral("approach")},
-    {FlightLogging::NightLogging,       QStringLiteral("nightlogging")},
+    {FlightLogging::NightLoggingEnabled,QStringLiteral("nightLoggingEnabled")},
     {FlightLogging::LogIFR,             QStringLiteral("logIfr")},
     {FlightLogging::FlightNumberPrefix, QStringLiteral("flightnumberPrefix")},
     {FlightLogging::NumberTakeoffs,     QStringLiteral("numberTakeoffs")},
@@ -74,6 +76,34 @@ void ASettings::setup()
     QSettings();
 }
 
+/*!
+ * \brief ASettings::resetToDefaults (Re-)sets all settings to the default value
+ */
+void ASettings::resetToDefaults()
+{
+    write(Main::Style, QStringLiteral("Fusion"));
+    write(Main::UseSystemFont, true);
+    write(Main::LogbookView, 0);
+
+    write(UserData::DisplaySelfAs, 0);
+    write(UserData::FtlWarningThreshold, 0.8); // To Do: UI Option
+    write(UserData::CurrWarningEnabled, true);
+    write(UserData::CurrWarningThreshold, 30);
+    write(UserData::ShowToLgdCurrency, true);
+    write(UserData::ShowLicCurrency, false);
+    write(UserData::ShowTrCurrency, false);
+    write(UserData::ShowLckCurrency, false);
+    write(UserData::ShowMedCurrency, false);
+    write(UserData::ShowCustom1Currency, false);
+    write(UserData::ShowCustom2Currency, false);
+
+    write(FlightLogging::NumberTakeoffs, 1);
+    write(FlightLogging::NumberLandings, 1);
+    write(FlightLogging::PopupCalendar, true);
+    write(FlightLogging::PilotFlying, true);
+    write(FlightLogging::NightAngle, -6);
+}
+
 //
 // Read/Write
 //

+ 4 - 1
src/classes/asettings.h

@@ -56,12 +56,14 @@ public:
         MedCurrencyDate,
         Custom1CurrencyDate,
         Custom2CurrencyDate,
+        Custom1CurrencyName,
+        Custom2CurrencyName,
     };
 
     enum class FlightLogging {
         Function,
         Approach,
-        NightLogging,
+        NightLoggingEnabled,
         LogIFR,
         FlightNumberPrefix,
         NumberTakeoffs,
@@ -79,6 +81,7 @@ public:
      * \brief Should be called after QCoreApplication::set...Name have been called.
      */
     static void setup();
+    static void resetToDefaults();
 
     static QVariant read(const Main key);
     static void write(const Main key, const QVariant &val);

+ 5 - 5
src/classes/astyle.cpp

@@ -44,11 +44,12 @@ QString AStyle::currentStyle = defaultStyle;
  */
 void AStyle::setup()
 {
-    QVariant style_setting = ASettings::read(ASettings::Main::Style);
-    if(!style_setting.toBool()){
-        //DEB << "Setting style to default:" << defaultStyle;
-        style_setting = defaultStyle;
+    QString style_setting = ASettings::read(ASettings::Main::Style).toString();
+
+    if (style_setting == QLatin1String("Dark-Palette")) {
+        AStyle::setStyle(AStyle::darkPalette());
         ASettings::write(ASettings::Main::Style, style_setting);
+        return;
     }
     for (const auto &style_name : styles) {
         if (style_setting == style_name) {
@@ -78,7 +79,6 @@ void AStyle::setStyle(const QString &style_key)
 {
     resetStyle();
     DEB << "Setting style: " << style_key;
-    qApp->setStyleSheet(QString());
     QApplication::setStyle(QStyleFactory::create(style_key));
     currentStyle = style_key;
 }

+ 140 - 21
src/gui/dialogues/firstrundialog.cpp

@@ -25,6 +25,7 @@
 #include "src/classes/asettings.h"
 #include "src/oplconstants.h"
 #include <QErrorMessage>
+#include "src/classes/astyle.h"
 
 FirstRunDialog::FirstRunDialog(QWidget *parent) :
     QDialog(parent),
@@ -34,11 +35,20 @@ FirstRunDialog::FirstRunDialog(QWidget *parent) :
     ui->stackedWidget->setCurrentIndex(0);
     ui->lastnameLineEdit->setFocus();
     ui->previousPushButton->setEnabled(false);
-    ui->nightComboBox->setCurrentIndex(1);
 
+    // approach Combo Box
     for (const auto &approach : Opl::ApproachTypes){
         ui->approachComboBox->addItem(approach);
     }
+    // Style combo box
+    const QSignalBlocker blocker_style(ui->styleComboBox);
+    ui->styleComboBox->addItems(AStyle::styles);
+    for (const auto &style_sheet : AStyle::styleSheets) {
+        ui->styleComboBox->addItem(style_sheet.styleSheetName);
+    }
+    ui->styleComboBox->addItem(QStringLiteral("Dark-Palette"));
+    ui->styleComboBox->model()->sort(0);
+    ui->styleComboBox->setCurrentText(AStyle::defaultStyle);
 }
 
 FirstRunDialog::~FirstRunDialog()
@@ -48,8 +58,8 @@ FirstRunDialog::~FirstRunDialog()
 
 void FirstRunDialog::on_previousPushButton_clicked()
 {
-    auto current_idx = ui->stackedWidget->currentIndex();
-    switch (current_idx) {
+    auto current_index = ui->stackedWidget->currentIndex();
+    switch (current_index) {
     case 0:
         return;
     case 1:
@@ -59,14 +69,14 @@ void FirstRunDialog::on_previousPushButton_clicked()
         ui->nextPushButton->setText(tr("Next"));
         break;
     }
-    ui->stackedWidget->setCurrentIndex(current_idx - 1);
+    ui->stackedWidget->setCurrentIndex(current_index - 1);
 
 }
 
 void FirstRunDialog::on_nextPushButton_clicked()
 {
-    auto current_idx = ui->stackedWidget->currentIndex();
-    switch (current_idx) {
+    auto current_index = ui->stackedWidget->currentIndex();
+    switch (current_index) {
     case 0:
         if(ui->firstnameLineEdit->text().isEmpty()
            || ui->lastnameLineEdit->text().isEmpty())
@@ -78,17 +88,17 @@ void FirstRunDialog::on_nextPushButton_clicked()
         }
         ui->previousPushButton->setEnabled(true);
         break;
-    case 1:
+    case 3:
         ui->nextPushButton->setText(tr("Done"));
         break;
-    case 2:
+    case 4:
         if(!finishSetup())
             QDialog::reject();
         else
             QDialog::accept();
         return;
     }
-    ui->stackedWidget->setCurrentIndex(current_idx + 1);
+    ui->stackedWidget->setCurrentIndex(current_index + 1);
 }
 
 bool FirstRunDialog::finishSetup()
@@ -118,24 +128,49 @@ bool FirstRunDialog::finishSetup()
 
 void FirstRunDialog::writeSettings()
 {
-    ASettings::write(ASettings::Main::UseSystemFont, true);
-    ASettings::write(ASettings::Main::LogbookView, 0);
+    ASettings::resetToDefaults();
     ASettings::write(ASettings::FlightLogging::Function, ui->functionComboBox->currentText());
     ASettings::write(ASettings::FlightLogging::Approach, ui->approachComboBox->currentIndex());
-    ASettings::write(ASettings::FlightLogging::NightLogging, ui->nightComboBox->currentIndex());
+    switch (ui->nightComboBox->currentIndex()) {
+    case 0:
+        ASettings::write(ASettings::FlightLogging::NightLoggingEnabled, true);
+        break;
+    case 1:
+        ASettings::write(ASettings::FlightLogging::NightLoggingEnabled, false);
+        break;
+    default:
+        ASettings::write(ASettings::FlightLogging::NightLoggingEnabled, true);
+        break;
+    }
+    switch (ui->nightRulesComboBox->currentIndex()) {
+    case 0:
+        ASettings::write(ASettings::FlightLogging::NightAngle, 6);
+        break;
+    case 1:
+        ASettings::write(ASettings::FlightLogging::NightAngle, 0);
+        break;
+
+    }
     ASettings::write(ASettings::FlightLogging::LogIFR, ui->rulesComboBox->currentIndex());
     ASettings::write(ASettings::FlightLogging::FlightNumberPrefix, ui->prefixLineEdit->text());
-    ASettings::write(ASettings::FlightLogging::NumberTakeoffs, 1);
-    ASettings::write(ASettings::FlightLogging::NumberLandings, 1);
-    ASettings::write(ASettings::FlightLogging::PopupCalendar, true);
-    ASettings::write(ASettings::FlightLogging::PilotFlying, true);
     ASettings::write(ASettings::FlightLogging::FlightTimeFormat, Opl::Time::Default);
     ASettings::write(ASettings::UserData::DisplaySelfAs, ui->aliasComboBox->currentIndex());
-    ASettings::write(ASettings::UserData::ShowToLgdCurrency, true);
-    // To Do: UI option
-    ASettings::write(ASettings::UserData::FtlWarningThreshold, 0.8);
-    ASettings::write(ASettings::UserData::CurrWarningEnabled, true);
-    ASettings::write(ASettings::UserData::CurrWarningThreshold, 30);
+    ASettings::write(ASettings::Main::LogbookView, ui->logbookViewComboBox->currentIndex());
+
+    switch (ui->currWarningCheckBox->checkState()) {
+    case Qt::CheckState::Checked:
+        ASettings::write(ASettings::UserData::CurrWarningEnabled, true);
+        break;
+    case Qt::CheckState::Unchecked:
+        ASettings::write(ASettings::UserData::CurrWarningEnabled, false);
+        break;
+    default:
+        break;
+    }
+    ASettings::write(ASettings::UserData::CurrWarningThreshold, ui->currWarningThresholdSpinBox->value());
+    ASettings::write(ASettings::Main::Style, ui->styleComboBox->currentText());
+    QSettings settings;
+    settings.sync();
 }
 
 bool FirstRunDialog::setupDatabase()
@@ -206,3 +241,87 @@ void FirstRunDialog::reject()
         QDialog::reject();
     }
 }
+
+void FirstRunDialog::on_styleComboBox_currentTextChanged(const QString &new_style_setting)
+{
+    DEB << "style selected:"<<new_style_setting;
+    if (new_style_setting == QLatin1String("Dark-Palette")) {
+        //DEB << "Palette";
+        AStyle::setStyle(AStyle::darkPalette());
+        return;
+    }
+    for (const auto &style_name : AStyle::styles) {
+        if (new_style_setting == style_name) {
+            //DEB << "style";
+            AStyle::setStyle(style_name);
+            return;
+        }
+    }
+    for (const auto &style_sheet : AStyle::styleSheets) {
+        if (new_style_setting == style_sheet.styleSheetName) {
+            //DEB << "stylesheet";
+            AStyle::setStyle(style_sheet);
+            return;
+        }
+    }
+}
+
+void FirstRunDialog::on_currWarningCheckBox_stateChanged(int arg1)
+{
+    switch (arg1) {
+    case Qt::CheckState::Checked:
+        ASettings::write(ASettings::UserData::CurrWarningEnabled, true);
+        break;
+    case Qt::CheckState::Unchecked:
+        ASettings::write(ASettings::UserData::CurrWarningEnabled, false);
+        break;
+    default:
+        break;
+    }
+    ASettings::write(ASettings::UserData::CurrWarningThreshold, arg1);
+}
+
+void FirstRunDialog::on_currWarningThresholdSpinBox_valueChanged(int arg1)
+{
+    ASettings::write(ASettings::UserData::CurrWarningThreshold, arg1);
+}
+
+void FirstRunDialog::on_currLicDateEdit_userDateChanged(const QDate &date)
+{
+    ASettings::write(ASettings::UserData::LicCurrencyDate, date);
+}
+
+void FirstRunDialog::on_currTrDateEdit_userDateChanged(const QDate &date)
+{
+    ASettings::write(ASettings::UserData::TrCurrencyDate, date);
+}
+
+void FirstRunDialog::on_currLckDateEdit_userDateChanged(const QDate &date)
+{
+    ASettings::write(ASettings::UserData::LckCurrencyDate, date);
+}
+
+void FirstRunDialog::on_currMedDateEdit_userDateChanged(const QDate &date)
+{
+    ASettings::write(ASettings::UserData::MedCurrencyDate, date);
+}
+
+void FirstRunDialog::on_currCustom1DateEdit_userDateChanged(const QDate &date)
+{
+    ASettings::write(ASettings::UserData::Custom1CurrencyDate, date);
+}
+
+void FirstRunDialog::on_currCustom2DateEdit_userDateChanged(const QDate &date)
+{
+    ASettings::write(ASettings::UserData::Custom2CurrencyDate, date);
+}
+
+void FirstRunDialog::on_currCustom1LineEdit_editingFinished()
+{
+    ASettings::write(ASettings::UserData::Custom1CurrencyName, ui->currCustom1LineEdit->text());
+}
+
+void FirstRunDialog::on_currCustom2LineEdit_editingFinished()
+{
+    ASettings::write(ASettings::UserData::Custom2CurrencyName, ui->currCustom2LineEdit->text());
+}

+ 23 - 1
src/gui/dialogues/firstrundialog.h

@@ -41,7 +41,29 @@ private slots:
 
     void on_nextPushButton_clicked();
 
-private:    
+    void on_styleComboBox_currentTextChanged(const QString &new_style_setting);
+
+    void on_currWarningCheckBox_stateChanged(int arg1);
+
+    void on_currWarningThresholdSpinBox_valueChanged(int arg1);
+
+    void on_currLicDateEdit_userDateChanged(const QDate &date);
+
+    void on_currTrDateEdit_userDateChanged(const QDate &date);
+
+    void on_currLckDateEdit_userDateChanged(const QDate &date);
+
+    void on_currMedDateEdit_userDateChanged(const QDate &date);
+
+    void on_currCustom1DateEdit_userDateChanged(const QDate &date);
+
+    void on_currCustom2DateEdit_userDateChanged(const QDate &date);
+
+    void on_currCustom1LineEdit_editingFinished();
+
+    void on_currCustom2LineEdit_editingFinished();
+
+private:
     Ui::FirstRunDialog *ui;
     bool useLocalTemplates;
 

+ 694 - 206
src/gui/dialogues/firstrundialog.ui

@@ -6,8 +6,8 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>1280</width>
-    <height>720</height>
+    <width>628</width>
+    <height>786</height>
    </rect>
   </property>
   <property name="windowTitle">
@@ -31,14 +31,14 @@
    <item row="0" column="0" colspan="2">
     <widget class="QStackedWidget" name="stackedWidget">
      <property name="currentIndex">
-      <number>1</number>
+      <number>2</number>
      </property>
-     <widget class="QWidget" name="stackedWidgetPage1">
-      <layout class="QGridLayout" name="gridLayout_2">
-       <item row="0" column="1">
+     <widget class="QWidget" name="personalDataPage">
+      <layout class="QGridLayout" name="gridLayout_9">
+       <item row="0" column="0">
         <widget class="QLabel" name="label">
          <property name="text">
-          <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p align=&quot;center&quot;&gt;&lt;span style=&quot; font-size:16pt;&quot;&gt;Welcome to openPilotLog!&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;p&gt;Before getting started, we need to quickly run through this initial set-up process. Please note that none of the data you put in will be stored in any place other than your own personal computer and will only be used to fill out information in your logbook. OpenPilotLog will never collect, sell use your private data for any commercial purpose.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+          <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p align=&quot;center&quot;&gt;&lt;span style=&quot; font-size:20pt;&quot;&gt;Welcome to openPilotLog!&lt;/span&gt;&lt;/p&gt;&lt;p align=&quot;center&quot;&gt;&lt;span style=&quot; font-size:14pt;&quot;&gt;The Free and Open Source Logbook application&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;p&gt;Before getting started, we need to quickly run through this initial set-up process. Please note that none of the data you put in will be stored in any place other than your own personal computer and will only be used to fill out information in your logbook.&lt;/p&gt;&lt;p&gt;OpenPilotLog does not collect, sell or use your private data for any commercial purpose.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
          </property>
          <property name="textFormat">
           <enum>Qt::RichText</enum>
@@ -48,105 +48,109 @@
          </property>
         </widget>
        </item>
-       <item row="1" column="0">
-        <widget class="QLabel" name="lastNameLabel">
-         <property name="text">
-          <string>Last Name</string>
-         </property>
-        </widget>
-       </item>
-       <item row="1" column="1">
-        <widget class="QLineEdit" name="lastnameLineEdit">
-         <property name="maxLength">
-          <number>40</number>
-         </property>
-         <property name="placeholderText">
-          <string>required</string>
-         </property>
-        </widget>
-       </item>
-       <item row="2" column="0">
-        <widget class="QLabel" name="firstNameLabel">
-         <property name="text">
-          <string>First Name</string>
-         </property>
-        </widget>
-       </item>
-       <item row="2" column="1">
-        <widget class="QLineEdit" name="firstnameLineEdit">
-         <property name="maxLength">
-          <number>40</number>
-         </property>
-         <property name="placeholderText">
-          <string>required</string>
-         </property>
-        </widget>
-       </item>
-       <item row="3" column="0">
-        <widget class="QLabel" name="employeeLabel">
-         <property name="text">
-          <string>Employee ID</string>
-         </property>
-        </widget>
-       </item>
-       <item row="3" column="1">
-        <widget class="QLineEdit" name="employeeidLineEdit">
-         <property name="focusPolicy">
-          <enum>Qt::StrongFocus</enum>
-         </property>
-         <property name="text">
-          <string/>
-         </property>
-         <property name="maxLength">
-          <number>40</number>
-         </property>
-         <property name="placeholderText">
-          <string>optional</string>
-         </property>
-        </widget>
-       </item>
-       <item row="4" column="0">
-        <widget class="QLabel" name="emailLabel">
-         <property name="text">
-          <string>eMail</string>
-         </property>
-        </widget>
-       </item>
-       <item row="4" column="1">
-        <widget class="QLineEdit" name="emailLineEdit">
-         <property name="maxLength">
-          <number>40</number>
-         </property>
-         <property name="placeholderText">
-          <string>optional</string>
-         </property>
-        </widget>
-       </item>
-       <item row="5" column="0">
-        <widget class="QLabel" name="phoneLabel">
-         <property name="text">
-          <string>Phone</string>
-         </property>
-        </widget>
-       </item>
-       <item row="5" column="1">
-        <widget class="QLineEdit" name="phoneLineEdit">
-         <property name="maxLength">
-          <number>40</number>
-         </property>
-         <property name="placeholderText">
-          <string>optional</string>
-         </property>
-        </widget>
+       <item row="1" column="0" rowspan="2">
+        <layout class="QGridLayout" name="gridLayout_2">
+         <item row="0" column="0">
+          <widget class="QLabel" name="lastNameLabel">
+           <property name="text">
+            <string>Last Name</string>
+           </property>
+          </widget>
+         </item>
+         <item row="0" column="1">
+          <widget class="QLineEdit" name="lastnameLineEdit">
+           <property name="maxLength">
+            <number>40</number>
+           </property>
+           <property name="placeholderText">
+            <string>required</string>
+           </property>
+          </widget>
+         </item>
+         <item row="1" column="0">
+          <widget class="QLabel" name="firstNameLabel">
+           <property name="text">
+            <string>First Name</string>
+           </property>
+          </widget>
+         </item>
+         <item row="1" column="1">
+          <widget class="QLineEdit" name="firstnameLineEdit">
+           <property name="maxLength">
+            <number>40</number>
+           </property>
+           <property name="placeholderText">
+            <string>required</string>
+           </property>
+          </widget>
+         </item>
+         <item row="2" column="0">
+          <widget class="QLabel" name="employeeLabel">
+           <property name="text">
+            <string>Employee ID</string>
+           </property>
+          </widget>
+         </item>
+         <item row="2" column="1">
+          <widget class="QLineEdit" name="employeeidLineEdit">
+           <property name="focusPolicy">
+            <enum>Qt::StrongFocus</enum>
+           </property>
+           <property name="text">
+            <string/>
+           </property>
+           <property name="maxLength">
+            <number>40</number>
+           </property>
+           <property name="placeholderText">
+            <string>optional</string>
+           </property>
+          </widget>
+         </item>
+         <item row="3" column="0">
+          <widget class="QLabel" name="emailLabel">
+           <property name="text">
+            <string>eMail</string>
+           </property>
+          </widget>
+         </item>
+         <item row="3" column="1">
+          <widget class="QLineEdit" name="emailLineEdit">
+           <property name="maxLength">
+            <number>40</number>
+           </property>
+           <property name="placeholderText">
+            <string>optional</string>
+           </property>
+          </widget>
+         </item>
+         <item row="4" column="0">
+          <widget class="QLabel" name="phoneLabel">
+           <property name="text">
+            <string>Phone</string>
+           </property>
+          </widget>
+         </item>
+         <item row="4" column="1">
+          <widget class="QLineEdit" name="phoneLineEdit">
+           <property name="maxLength">
+            <number>40</number>
+           </property>
+           <property name="placeholderText">
+            <string>optional</string>
+           </property>
+          </widget>
+         </item>
+        </layout>
        </item>
       </layout>
      </widget>
-     <widget class="QWidget" name="stackedWidgetPage2">
-      <layout class="QGridLayout" name="gridLayout_3">
-       <item row="0" column="1">
-        <widget class="QLabel" name="label_2">
+     <widget class="QWidget" name="currencyPage">
+      <layout class="QGridLayout" name="gridLayout_6">
+       <item row="0" column="0">
+        <widget class="QLabel" name="label_6">
          <property name="text">
-          <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p align=&quot;center&quot;&gt;&lt;span style=&quot; font-size:16pt;&quot;&gt;Flight Logging&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br/&gt;Here you can make selections about which parts of a new flight will be automatically completed by default. You can always change these settings for an individual flight or adjust them globally in the settings menu.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+          <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p align=&quot;center&quot;&gt;&lt;span style=&quot; font-size:20pt;&quot;&gt;Welcome to openPilotLog!&lt;/span&gt;&lt;/p&gt;&lt;p align=&quot;center&quot;&gt;&lt;span style=&quot; font-size:14pt;&quot;&gt;The Free and Open Source Logbook application&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;p&gt;If you would like to keep track of your license and/or medical expiration dates, you can enter them here. By default, only Take-Off and Landing currency is shown on the home page, but any other currency can also be shown as well. This can be enabled in the settings.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
          </property>
          <property name="textFormat">
           <enum>Qt::RichText</enum>
@@ -156,142 +160,627 @@
          </property>
         </widget>
        </item>
-       <item row="1" column="0">
-        <widget class="QLabel" name="aliasLabel">
-         <property name="text">
-          <string>Show own name as</string>
-         </property>
-        </widget>
-       </item>
-       <item row="1" column="1">
-        <widget class="QComboBox" name="aliasComboBox">
+       <item row="2" column="0">
+        <layout class="QHBoxLayout" name="horizontalLayout">
          <item>
-          <property name="text">
-           <string>self</string>
-          </property>
+          <widget class="QCheckBox" name="currWarningCheckBox">
+           <property name="text">
+            <string>Warn me about expiring currencies</string>
+           </property>
+           <property name="checked">
+            <bool>true</bool>
+           </property>
+          </widget>
          </item>
          <item>
-          <property name="text">
-           <string>SELF</string>
-          </property>
+          <widget class="QSpinBox" name="currWarningThresholdSpinBox">
+           <property name="maximum">
+            <number>365</number>
+           </property>
+           <property name="value">
+            <number>30</number>
+           </property>
+          </widget>
          </item>
          <item>
-          <property name="text">
-           <string>Lastname, Firstname</string>
-          </property>
+          <widget class="QLabel" name="label_3">
+           <property name="text">
+            <string>days before expiry</string>
+           </property>
+          </widget>
          </item>
-        </widget>
+        </layout>
        </item>
-       <item row="2" column="0">
-        <widget class="QLabel" name="functionLabel">
-         <property name="text">
-          <string>Function</string>
-         </property>
-        </widget>
-       </item>
-       <item row="2" column="1">
-        <widget class="QComboBox" name="functionComboBox">
-         <item>
-          <property name="text">
-           <string>PIC</string>
-          </property>
+       <item row="1" column="0">
+        <layout class="QGridLayout" name="gridLayout_5">
+         <item row="1" column="1">
+          <widget class="QDateEdit" name="currTrDateEdit">
+           <property name="minimumSize">
+            <size>
+             <width>140</width>
+             <height>0</height>
+            </size>
+           </property>
+           <property name="currentSection">
+            <enum>QDateTimeEdit::MonthSection</enum>
+           </property>
+           <property name="displayFormat">
+            <string>MM/dd/yyyy</string>
+           </property>
+           <property name="calendarPopup">
+            <bool>true</bool>
+           </property>
+           <property name="timeSpec">
+            <enum>Qt::UTC</enum>
+           </property>
+           <property name="date">
+            <date>
+             <year>2020</year>
+             <month>1</month>
+             <day>1</day>
+            </date>
+           </property>
+          </widget>
          </item>
-         <item>
-          <property name="text">
-           <string>SIC</string>
-          </property>
+         <item row="3" column="0">
+          <widget class="QLabel" name="currMedLabel">
+           <property name="minimumSize">
+            <size>
+             <width>280</width>
+             <height>0</height>
+            </size>
+           </property>
+           <property name="text">
+            <string>Medical</string>
+           </property>
+          </widget>
          </item>
-         <item>
-          <property name="text">
-           <string>DUAL</string>
-          </property>
+         <item row="5" column="0">
+          <widget class="QLineEdit" name="currCustom2LineEdit">
+           <property name="minimumSize">
+            <size>
+             <width>280</width>
+             <height>0</height>
+            </size>
+           </property>
+           <property name="placeholderText">
+            <string>custom currency</string>
+           </property>
+          </widget>
          </item>
-         <item>
-          <property name="text">
-           <string>INSTRUCTOR</string>
-          </property>
+         <item row="4" column="0">
+          <widget class="QLineEdit" name="currCustom1LineEdit">
+           <property name="minimumSize">
+            <size>
+             <width>280</width>
+             <height>0</height>
+            </size>
+           </property>
+           <property name="text">
+            <string/>
+           </property>
+           <property name="placeholderText">
+            <string>custom currency</string>
+           </property>
+          </widget>
          </item>
-        </widget>
-       </item>
-       <item row="3" column="0">
-        <widget class="QLabel" name="rulesLabel">
-         <property name="text">
-          <string>Flight Rules</string>
-         </property>
-        </widget>
-       </item>
-       <item row="3" column="1">
-        <widget class="QComboBox" name="rulesComboBox">
-         <item>
-          <property name="text">
-           <string>VFR</string>
-          </property>
+         <item row="1" column="0">
+          <widget class="QLabel" name="currTrLabel">
+           <property name="minimumSize">
+            <size>
+             <width>280</width>
+             <height>0</height>
+            </size>
+           </property>
+           <property name="text">
+            <string>Type Rating</string>
+           </property>
+          </widget>
          </item>
-         <item>
-          <property name="text">
-           <string>IFR</string>
-          </property>
+         <item row="4" column="1">
+          <widget class="QDateEdit" name="currCustom1DateEdit">
+           <property name="minimumSize">
+            <size>
+             <width>140</width>
+             <height>0</height>
+            </size>
+           </property>
+           <property name="currentSection">
+            <enum>QDateTimeEdit::MonthSection</enum>
+           </property>
+           <property name="displayFormat">
+            <string>MM/dd/yyyy</string>
+           </property>
+           <property name="calendarPopup">
+            <bool>true</bool>
+           </property>
+           <property name="timeSpec">
+            <enum>Qt::UTC</enum>
+           </property>
+           <property name="date">
+            <date>
+             <year>2020</year>
+             <month>1</month>
+             <day>1</day>
+            </date>
+           </property>
+          </widget>
          </item>
-        </widget>
+         <item row="3" column="1">
+          <widget class="QDateEdit" name="currMedDateEdit">
+           <property name="minimumSize">
+            <size>
+             <width>140</width>
+             <height>0</height>
+            </size>
+           </property>
+           <property name="currentSection">
+            <enum>QDateTimeEdit::MonthSection</enum>
+           </property>
+           <property name="displayFormat">
+            <string>MM/dd/yyyy</string>
+           </property>
+           <property name="calendarPopup">
+            <bool>true</bool>
+           </property>
+           <property name="timeSpec">
+            <enum>Qt::UTC</enum>
+           </property>
+           <property name="date">
+            <date>
+             <year>2020</year>
+             <month>1</month>
+             <day>1</day>
+            </date>
+           </property>
+          </widget>
+         </item>
+         <item row="5" column="1">
+          <widget class="QDateEdit" name="currCustom2DateEdit">
+           <property name="minimumSize">
+            <size>
+             <width>140</width>
+             <height>0</height>
+            </size>
+           </property>
+           <property name="currentSection">
+            <enum>QDateTimeEdit::MonthSection</enum>
+           </property>
+           <property name="displayFormat">
+            <string>MM/dd/yyyy</string>
+           </property>
+           <property name="calendarPopup">
+            <bool>true</bool>
+           </property>
+           <property name="timeSpec">
+            <enum>Qt::UTC</enum>
+           </property>
+           <property name="date">
+            <date>
+             <year>2020</year>
+             <month>1</month>
+             <day>1</day>
+            </date>
+           </property>
+          </widget>
+         </item>
+         <item row="0" column="1">
+          <widget class="QDateEdit" name="currLicDateEdit">
+           <property name="minimumSize">
+            <size>
+             <width>140</width>
+             <height>0</height>
+            </size>
+           </property>
+           <property name="currentSection">
+            <enum>QDateTimeEdit::MonthSection</enum>
+           </property>
+           <property name="displayFormat">
+            <string>MM/dd/yyyy</string>
+           </property>
+           <property name="calendarPopup">
+            <bool>true</bool>
+           </property>
+           <property name="timeSpec">
+            <enum>Qt::UTC</enum>
+           </property>
+           <property name="date">
+            <date>
+             <year>2020</year>
+             <month>1</month>
+             <day>1</day>
+            </date>
+           </property>
+          </widget>
+         </item>
+         <item row="2" column="1">
+          <widget class="QDateEdit" name="currLckDateEdit">
+           <property name="minimumSize">
+            <size>
+             <width>140</width>
+             <height>0</height>
+            </size>
+           </property>
+           <property name="currentSection">
+            <enum>QDateTimeEdit::MonthSection</enum>
+           </property>
+           <property name="displayFormat">
+            <string>MM/dd/yyyy</string>
+           </property>
+           <property name="calendarPopup">
+            <bool>true</bool>
+           </property>
+           <property name="timeSpec">
+            <enum>Qt::UTC</enum>
+           </property>
+           <property name="date">
+            <date>
+             <year>2020</year>
+             <month>1</month>
+             <day>1</day>
+            </date>
+           </property>
+          </widget>
+         </item>
+         <item row="2" column="0">
+          <widget class="QLabel" name="currLckLabel">
+           <property name="minimumSize">
+            <size>
+             <width>280</width>
+             <height>0</height>
+            </size>
+           </property>
+           <property name="text">
+            <string>Line Check</string>
+           </property>
+          </widget>
+         </item>
+         <item row="0" column="0">
+          <widget class="QLabel" name="currLicLabel">
+           <property name="minimumSize">
+            <size>
+             <width>280</width>
+             <height>0</height>
+            </size>
+           </property>
+           <property name="text">
+            <string>Licence</string>
+           </property>
+          </widget>
+         </item>
+        </layout>
        </item>
-       <item row="4" column="0">
-        <widget class="QLabel" name="approachLabel">
+      </layout>
+     </widget>
+     <widget class="QWidget" name="flightLoggingPage">
+      <layout class="QGridLayout" name="gridLayout_10">
+       <item row="0" column="0">
+        <widget class="QLabel" name="label_7">
          <property name="text">
-          <string>Approach</string>
+          <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p align=&quot;center&quot;&gt;&lt;span style=&quot; font-size:20pt;&quot;&gt;Welcome to openPilotLog!&lt;/span&gt;&lt;/p&gt;&lt;p align=&quot;center&quot;&gt;&lt;span style=&quot; font-size:14pt;&quot;&gt;The Free and Open Source Logbook application&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;p&gt;Here you can make selections about which parts of a new flight will be automatically preselected or completed by default. You can always change these settings for an individual flight or adjust them globally in the settings menu.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
          </property>
-        </widget>
-       </item>
-       <item row="4" column="1">
-        <widget class="QComboBox" name="approachComboBox"/>
-       </item>
-       <item row="5" column="0">
-        <widget class="QLabel" name="nightLabel">
-         <property name="text">
-          <string>Night Time</string>
+         <property name="textFormat">
+          <enum>Qt::RichText</enum>
+         </property>
+         <property name="wordWrap">
+          <bool>true</bool>
          </property>
         </widget>
        </item>
-       <item row="5" column="1">
-        <widget class="QComboBox" name="nightComboBox">
-         <item>
-          <property name="text">
-           <string>NO</string>
-          </property>
+       <item row="1" column="0">
+        <layout class="QGridLayout" name="gridLayout_3">
+         <item row="0" column="0">
+          <widget class="QLabel" name="functionLabel">
+           <property name="minimumSize">
+            <size>
+             <width>160</width>
+             <height>0</height>
+            </size>
+           </property>
+           <property name="text">
+            <string>Default Function</string>
+           </property>
+          </widget>
          </item>
-         <item>
-          <property name="text">
-           <string>YES (EASA)</string>
-          </property>
+         <item row="0" column="1">
+          <widget class="QComboBox" name="functionComboBox">
+           <property name="minimumSize">
+            <size>
+             <width>160</width>
+             <height>0</height>
+            </size>
+           </property>
+           <item>
+            <property name="text">
+             <string>PIC</string>
+            </property>
+           </item>
+           <item>
+            <property name="text">
+             <string>SIC</string>
+            </property>
+           </item>
+           <item>
+            <property name="text">
+             <string>DUAL</string>
+            </property>
+           </item>
+           <item>
+            <property name="text">
+             <string>INSTRUCTOR</string>
+            </property>
+           </item>
+          </widget>
          </item>
-         <item>
-          <property name="text">
-           <string>YES (SR/SS)</string>
-          </property>
+         <item row="1" column="0">
+          <widget class="QLabel" name="rulesLabel">
+           <property name="minimumSize">
+            <size>
+             <width>160</width>
+             <height>0</height>
+            </size>
+           </property>
+           <property name="text">
+            <string>Default Flight Rules</string>
+           </property>
+          </widget>
          </item>
-        </widget>
+         <item row="1" column="1">
+          <widget class="QComboBox" name="rulesComboBox">
+           <property name="minimumSize">
+            <size>
+             <width>160</width>
+             <height>0</height>
+            </size>
+           </property>
+           <item>
+            <property name="text">
+             <string>VFR</string>
+            </property>
+           </item>
+           <item>
+            <property name="text">
+             <string>IFR</string>
+            </property>
+           </item>
+          </widget>
+         </item>
+         <item row="2" column="0">
+          <widget class="QLabel" name="approachLabel">
+           <property name="minimumSize">
+            <size>
+             <width>160</width>
+             <height>0</height>
+            </size>
+           </property>
+           <property name="text">
+            <string>Default Approach</string>
+           </property>
+          </widget>
+         </item>
+         <item row="2" column="1">
+          <widget class="QComboBox" name="approachComboBox">
+           <property name="minimumSize">
+            <size>
+             <width>160</width>
+             <height>0</height>
+            </size>
+           </property>
+          </widget>
+         </item>
+         <item row="3" column="0">
+          <widget class="QLabel" name="nightLabel">
+           <property name="minimumSize">
+            <size>
+             <width>160</width>
+             <height>0</height>
+            </size>
+           </property>
+           <property name="text">
+            <string>Calculate Night Time</string>
+           </property>
+          </widget>
+         </item>
+         <item row="3" column="1">
+          <widget class="QComboBox" name="nightComboBox">
+           <property name="minimumSize">
+            <size>
+             <width>160</width>
+             <height>0</height>
+            </size>
+           </property>
+           <item>
+            <property name="text">
+             <string>Yes</string>
+            </property>
+           </item>
+           <item>
+            <property name="text">
+             <string>No</string>
+            </property>
+           </item>
+          </widget>
+         </item>
+         <item row="4" column="0">
+          <widget class="QLabel" name="nightRulesLabel">
+           <property name="minimumSize">
+            <size>
+             <width>160</width>
+             <height>0</height>
+            </size>
+           </property>
+           <property name="text">
+            <string>Night Time Rules</string>
+           </property>
+          </widget>
+         </item>
+         <item row="4" column="1">
+          <widget class="QComboBox" name="nightRulesComboBox">
+           <property name="minimumSize">
+            <size>
+             <width>160</width>
+             <height>0</height>
+            </size>
+           </property>
+           <item>
+            <property name="text">
+             <string>EASA / ICAO / FAA</string>
+            </property>
+           </item>
+           <item>
+            <property name="text">
+             <string>Sunrise to Sunset</string>
+            </property>
+           </item>
+          </widget>
+         </item>
+         <item row="5" column="0">
+          <widget class="QLabel" name="prefixLabel">
+           <property name="minimumSize">
+            <size>
+             <width>160</width>
+             <height>0</height>
+            </size>
+           </property>
+           <property name="text">
+            <string>Flight Number Prefix</string>
+           </property>
+          </widget>
+         </item>
+         <item row="5" column="1">
+          <widget class="QLineEdit" name="prefixLineEdit">
+           <property name="minimumSize">
+            <size>
+             <width>160</width>
+             <height>0</height>
+            </size>
+           </property>
+           <property name="maxLength">
+            <number>10</number>
+           </property>
+           <property name="placeholderText">
+            <string>optional</string>
+           </property>
+          </widget>
+         </item>
+        </layout>
        </item>
-       <item row="6" column="0">
-        <widget class="QLabel" name="prefixLabel">
+      </layout>
+     </widget>
+     <widget class="QWidget" name="appearancePage">
+      <layout class="QGridLayout" name="gridLayout_8">
+       <item row="0" column="0">
+        <widget class="QLabel" name="label_8">
          <property name="text">
-          <string>Airline Prefix</string>
+          <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p align=&quot;center&quot;&gt;&lt;span style=&quot; font-size:20pt;&quot;&gt;Welcome to openPilotLog!&lt;/span&gt;&lt;/p&gt;&lt;p align=&quot;center&quot;&gt;&lt;span style=&quot; font-size:14pt;&quot;&gt;The Free and Open Source Logbook application&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;p&gt;Here you can customize the appearance of your logbook, like how your name should be displayed in the logbook or the theme of the app.&lt;/p&gt;&lt;p&gt;The logbook views determine how your logbook is displayed. The default view is a compact overview with all the essential information displayed, whereas the EASA view is modelled after the EASA guidelines for logbooks and contains more fields. Please note that these only affects how your logbook is displayed. In both views, you have the possibility to log all the details of a specific flight. You can change the view at any time from the settings page.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
          </property>
-        </widget>
-       </item>
-       <item row="6" column="1">
-        <widget class="QLineEdit" name="prefixLineEdit">
-         <property name="maxLength">
-          <number>10</number>
+         <property name="textFormat">
+          <enum>Qt::RichText</enum>
          </property>
-         <property name="placeholderText">
-          <string>optional</string>
+         <property name="wordWrap">
+          <bool>true</bool>
          </property>
         </widget>
        </item>
+       <item row="1" column="0">
+        <layout class="QGridLayout" name="gridLayout_7">
+         <item row="0" column="0">
+          <widget class="QLabel" name="aliasLabel">
+           <property name="minimumSize">
+            <size>
+             <width>160</width>
+             <height>0</height>
+            </size>
+           </property>
+           <property name="text">
+            <string>Show own name as</string>
+           </property>
+          </widget>
+         </item>
+         <item row="0" column="1">
+          <widget class="QComboBox" name="aliasComboBox">
+           <property name="minimumSize">
+            <size>
+             <width>160</width>
+             <height>0</height>
+            </size>
+           </property>
+           <item>
+            <property name="text">
+             <string>self</string>
+            </property>
+           </item>
+           <item>
+            <property name="text">
+             <string>SELF</string>
+            </property>
+           </item>
+           <item>
+            <property name="text">
+             <string>Lastname, Firstname</string>
+            </property>
+           </item>
+          </widget>
+         </item>
+         <item row="1" column="0">
+          <widget class="QLabel" name="styleLabel">
+           <property name="sizePolicy">
+            <sizepolicy hsizetype="Minimum" vsizetype="Minimum">
+             <horstretch>0</horstretch>
+             <verstretch>0</verstretch>
+            </sizepolicy>
+           </property>
+           <property name="text">
+            <string>Application Theme</string>
+           </property>
+          </widget>
+         </item>
+         <item row="1" column="1">
+          <widget class="QComboBox" name="styleComboBox"/>
+         </item>
+         <item row="2" column="0">
+          <widget class="QLabel" name="logbookViewLabel">
+           <property name="sizePolicy">
+            <sizepolicy hsizetype="Minimum" vsizetype="Minimum">
+             <horstretch>0</horstretch>
+             <verstretch>0</verstretch>
+            </sizepolicy>
+           </property>
+           <property name="toolTip">
+            <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Determines how your logbook is displayed in the logbook tab. This has no influence on what details are logged, just on what is displayed by default.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+           </property>
+           <property name="whatsThis">
+            <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Determines how your logbook is displayed in the logbook tab. This has no influence on what details are logged, just on what is displayed by default.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+           </property>
+           <property name="text">
+            <string>Logbook Dispay</string>
+           </property>
+          </widget>
+         </item>
+         <item row="2" column="1">
+          <widget class="QComboBox" name="logbookViewComboBox">
+           <property name="toolTip">
+            <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Determines how your logbook is displayed in the logbook tab. This has no influence on what details are logged, just on what is displayed by default.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+           </property>
+           <item>
+            <property name="text">
+             <string>Default</string>
+            </property>
+           </item>
+           <item>
+            <property name="text">
+             <string>EASA Part-FCL</string>
+            </property>
+           </item>
+          </widget>
+         </item>
+        </layout>
+       </item>
       </layout>
      </widget>
      <widget class="QWidget" name="stackedWidgetPage3">
       <layout class="QGridLayout" name="gridLayout_4">
-       <item row="0" column="0" colspan="2">
+       <item row="0" column="0" rowspan="2">
         <widget class="QLabel" name="label_4">
          <property name="text">
           <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p align=&quot;center&quot;&gt;&lt;span style=&quot; font-size:16pt;&quot;&gt;Finish&lt;/span&gt;&lt;/p&gt;&lt;p align=&quot;center&quot;&gt;&lt;br/&gt;Almost done! We are now going to create the database for the application.&lt;/p&gt;&lt;p align=&quot;center&quot;&gt;If you want to use the most up-to-date version of the database, an internet connection is required, otherwise you can use the version included in the download.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
@@ -318,7 +807,6 @@
   <tabstop>phoneLineEdit</tabstop>
   <tabstop>previousPushButton</tabstop>
   <tabstop>nextPushButton</tabstop>
-  <tabstop>aliasComboBox</tabstop>
   <tabstop>functionComboBox</tabstop>
   <tabstop>rulesComboBox</tabstop>
   <tabstop>approachComboBox</tabstop>

+ 10 - 0
src/gui/widgets/homewidget.cpp

@@ -80,6 +80,10 @@ void HomeWidget::fillTotals()
 void HomeWidget::fillCurrency(ASettings::UserData date, QLabel* display_label)
 {
     auto currency_date = ASettings::read(date).toDate();
+
+    if (!currency_date.isValid())
+        return;
+
     display_label->setText(currency_date.toString(Qt::TextDate));
     if (today.addDays(currWarningThreshold) >= currency_date) { // expires less than 30 days from today
         setLabelColour(display_label, Colour::Orange);
@@ -112,10 +116,16 @@ void HomeWidget::fillCurrencies()
     ASettings::read(ASettings::UserData::ShowCustom1Currency).toBool() ?
                 fillCurrency(ASettings::UserData::Custom1CurrencyDate, ui->currCustom1DisplayLabel)
               : hideLabels(ui->currCustom1Label, ui->currCustom1DisplayLabel);
+    const QString custom1_text = ASettings::read(ASettings::UserData::Custom1CurrencyName).toString();
+    if (!custom1_text.isEmpty())
+        ui->currCustom1Label->setText(custom1_text);
 
     ASettings::read(ASettings::UserData::ShowCustom2Currency).toBool() ?
                 fillCurrency(ASettings::UserData::Custom2CurrencyDate, ui->currCustom2DisplayLabel)
               : hideLabels(ui->currCustom2Label, ui->currCustom2DisplayLabel);
+    const QString custom2_text = ASettings::read(ASettings::UserData::Custom2CurrencyName).toString();
+    if (!custom2_text.isEmpty())
+        ui->currCustom2Label->setText(custom2_text);
 }
 
 void HomeWidget::fillCurrencyTakeOffLanding()

+ 17 - 5
src/gui/widgets/settingswidget.cpp

@@ -104,7 +104,7 @@ void SettingsWidget::readSettings()
     ui->functionComboBox->setCurrentText(ASettings::read(ASettings::FlightLogging::Function).toString());
     ui->rulesComboBox->setCurrentText(ASettings::read(ASettings::FlightLogging::Rules).toString());
     ui->approachComboBox->setCurrentText(ASettings::read(ASettings::FlightLogging::Approach).toString());
-    ui->nightComboBox->setCurrentIndex(ASettings::read(ASettings::FlightLogging::NightLogging).toInt());
+    ui->nightComboBox->setCurrentIndex(ASettings::read(ASettings::FlightLogging::NightLoggingEnabled).toInt());
     ui->prefixLineEdit->setText(ASettings::read(ASettings::FlightLogging::FlightNumberPrefix).toString());
     ui->logbookViewComboBox->setCurrentIndex(ASettings::read(ASettings::Main::LogbookView).toInt());
 
@@ -141,11 +141,12 @@ void SettingsWidget::readSettings()
     ui->acSortComboBox->setCurrentIndex(ASettings::read(ASettings::UserData::TailSortColumn).toInt());
     ui->pilotSortComboBox->setCurrentIndex(ASettings::read(ASettings::UserData::PilotSortColumn).toInt());
     ui->acAllowIncompleteComboBox->setCurrentIndex(ASettings::read(ASettings::UserData::AcftAllowIncomplete).toInt());
-    ui->styleComboBox->setCurrentText(ASettings::read(ASettings::Main::Style).toString());
     {
+        const QSignalBlocker style_blocker(ui->styleComboBox);
         const QSignalBlocker font_blocker1(ui->fontSpinBox);
         const QSignalBlocker font_blocker2(ui->fontComboBox);
         const QSignalBlocker font_blocker3(ui->fontCheckBox);
+        ui->styleComboBox->setCurrentText(ASettings::read(ASettings::Main::Style).toString());
         ui->fontSpinBox->setValue(ASettings::read(ASettings::Main::FontSize).toUInt());
         ui->fontComboBox->setCurrentFont(QFont(ASettings::read(ASettings::Main::Font).toString()));
         ui->fontCheckBox->setChecked(ASettings::read(ASettings::Main::UseSystemFont).toBool());
@@ -267,7 +268,7 @@ void SettingsWidget::on_approachComboBox_currentIndexChanged(const QString &arg1
 
 void SettingsWidget::on_nightComboBox_currentIndexChanged(int index)
 {
-    ASettings::write(ASettings::FlightLogging::NightLogging, index);
+    ASettings::write(ASettings::FlightLogging::NightLoggingEnabled, index);
     switch (index) {
     case 1:
         ASettings::write(ASettings::FlightLogging::NightAngle, -6);
@@ -376,6 +377,7 @@ void SettingsWidget::on_styleComboBox_currentTextChanged(const QString& new_styl
 {
     if (new_style_setting == QLatin1String("Dark-Palette")) {
         AStyle::setStyle(AStyle::darkPalette());
+        ASettings::write(ASettings::Main::Style, new_style_setting);
         return;
     }
     for (const auto &style_name : AStyle::styles) {
@@ -602,7 +604,7 @@ void SettingsWidget::on_currCustom2CheckBox_stateChanged(int arg1)
     ASettings::write(ASettings::UserData::Custom2CurrencyDate, ui->currCustom2DateEdit->date());
 }
 
-void SettingsWidget::on_checkBox_stateChanged(int arg1)
+void SettingsWidget::on_currWarningCheckBox_stateChanged(int arg1)
 {
     switch (arg1) {
     case Qt::CheckState::Checked:
@@ -617,7 +619,17 @@ void SettingsWidget::on_checkBox_stateChanged(int arg1)
     ASettings::write(ASettings::UserData::CurrWarningThreshold, arg1);
 }
 
-void SettingsWidget::on_spinBox_valueChanged(int arg1)
+void SettingsWidget::on_currWarningThresholdSpinBox_valueChanged(int arg1)
 {
     ASettings::write(ASettings::UserData::CurrWarningThreshold, arg1);
 }
+
+void SettingsWidget::on_currCustom1LineEdit_editingFinished()
+{
+    ASettings::write(ASettings::UserData::Custom1CurrencyName, ui->currCustom1LineEdit->text());
+}
+
+void SettingsWidget::on_currCustom2LineEdit_editingFinished()
+{
+    ASettings::write(ASettings::UserData::Custom2CurrencyName, ui->currCustom2LineEdit->text());
+}

+ 7 - 2
src/gui/widgets/settingswidget.h

@@ -96,9 +96,13 @@ private slots:
 
     void on_currCustom2CheckBox_stateChanged(int arg1);
 
-    void on_checkBox_stateChanged(int arg1);
+    void on_currWarningCheckBox_stateChanged(int arg1);
 
-    void on_spinBox_valueChanged(int arg1);
+    void on_currWarningThresholdSpinBox_valueChanged(int arg1);
+
+    void on_currCustom1LineEdit_editingFinished();
+
+    void on_currCustom2LineEdit_editingFinished();
 
 private:
     Ui::SettingsWidget *ui;
@@ -112,6 +116,7 @@ private:
     void updatePersonalDetails();
 
     bool usingStylesheet();
+
 signals:
     void viewSelectionChanged(int view_id);
 };

+ 2 - 2
src/gui/widgets/settingswidget.ui

@@ -882,9 +882,9 @@
        </item>
       </layout>
      </widget>
-     <widget class="QWidget" name="miscTab">
+     <widget class="QWidget" name="appearanceTab">
       <attribute name="title">
-       <string>Misc</string>
+       <string>Appearance</string>
       </attribute>
       <layout class="QGridLayout" name="gridLayout_5">
        <item row="0" column="0">