From 5dc41282156f0d83c03f314c937d7688aeb1ca53 Mon Sep 17 00:00:00 2001 From: dubslow Date: Mon, 15 Sep 2014 08:31:42 -0500 Subject: [PATCH] cosmetics --- widget/form/settings/avform.cpp | 2 ++ widget/form/settings/generalform.cpp | 2 ++ widget/form/settings/genericsettings.h | 8 +++++++- widget/form/settings/identityform.cpp | 2 ++ widget/form/settings/privacyform.cpp | 2 ++ widget/form/settingswidget.cpp | 2 +- 6 files changed, 16 insertions(+), 2 deletions(-) diff --git a/widget/form/settings/avform.cpp b/widget/form/settings/avform.cpp index 347a1cfbb..5c0b38da3 100644 --- a/widget/form/settings/avform.cpp +++ b/widget/form/settings/avform.cpp @@ -19,6 +19,8 @@ AVForm::AVForm() { prep(); + icon.addFile(":/img/settings/av.png"); + label.setText(tr("Audio/Video settings")); } AVForm::~AVForm() diff --git a/widget/form/settings/generalform.cpp b/widget/form/settings/generalform.cpp index 050d4f7eb..a9810c1ae 100644 --- a/widget/form/settings/generalform.cpp +++ b/widget/form/settings/generalform.cpp @@ -20,6 +20,8 @@ GeneralForm::GeneralForm() { prep(); + icon.addFile(":/img/settings/general.png"); + label.setText(tr("General settings")); group = new QGroupBox(tr("General Settings")); enableIPv6 = new QCheckBox(); enableIPv6->setText(tr("Enable IPv6 (recommended)","Text on a checkbox to enable IPv6")); diff --git a/widget/form/settings/genericsettings.h b/widget/form/settings/genericsettings.h index 9353d21df..94f8fe90f 100644 --- a/widget/form/settings/genericsettings.h +++ b/widget/form/settings/genericsettings.h @@ -34,13 +34,19 @@ public: } protected: - QVBoxLayout layout, headLayout; + QVBoxLayout layout; + QHBoxLayout headLayout; + QIcon icon; + QLabel label; QWidget head, body; void prep() // call in subclass constructor { head.setLayout(&headLayout); + headLayout.addWidget(&icon); + headLayout.addWidget(&label); body.setLayout(&layout); } + }; #endif diff --git a/widget/form/settings/identityform.cpp b/widget/form/settings/identityform.cpp index dbd5574c5..ac89257a9 100644 --- a/widget/form/settings/identityform.cpp +++ b/widget/form/settings/identityform.cpp @@ -22,6 +22,8 @@ IdentityForm::IdentityForm() { prep(); + icon.addFile(":/img/settings/identity.png"); + label.setText(tr("Your identity")); toxGroup = new QGroupBox(tr("Tox ID")); QLabel* toxIdLabel = new QLabel(tr("Your Tox ID")); QLineEdit* toxID = new QLineEdit(); diff --git a/widget/form/settings/privacyform.cpp b/widget/form/settings/privacyform.cpp index 856f64954..ef7c54c4b 100644 --- a/widget/form/settings/privacyform.cpp +++ b/widget/form/settings/privacyform.cpp @@ -20,6 +20,8 @@ PrivacyForm::PrivacyForm() { prep(); + icon.addFile(":/img/settings/privacy.png"); + label.setText(tr("Privacy settings")); } PrivacyForm::~PrivacyForm() diff --git a/widget/form/settingswidget.cpp b/widget/form/settingswidget.cpp index 3a13c1cdb..9b5dc7856 100644 --- a/widget/form/settingswidget.cpp +++ b/widget/form/settingswidget.cpp @@ -110,7 +110,7 @@ void SettingsWidget::prepButtons() // just straight up copying it like this... oh well // the layout/icons obviously need to be improved, but it's a working model, // not a pretty one - QSizePolicy sizePolicy3(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed); + QSizePolicy sizePolicy3(QSizePolicy::Fixed, QSizePolicy::Fixed); sizePolicy3.setHorizontalStretch(0); sizePolicy3.setVerticalStretch(0); foot->setObjectName(QStringLiteral("foot"));