Added initial dark mode theme using https://github.com/ColinDuquesnoy/

QDarkStyleSheet

--HG--
branch : develop
This commit is contained in:
Emmanuel Nyachoke 2018-10-29 15:05:49 +03:00
parent 0e9d789d90
commit 6d9105729f
54 changed files with 1668 additions and 252 deletions

View File

@ -53,6 +53,9 @@ TapePreferencesConfigurationPage::TapePreferencesConfigurationPage(QWidget *pare
//-------------------- Decimal separator setup //-------------------- Decimal separator setup
ui->osOptionCheck->setChecked(qApp->TapeSettings()->GetOsSeparator()); ui->osOptionCheck->setChecked(qApp->TapeSettings()->GetOsSeparator());
// Theme
ui->darkModeCheck->setChecked(qApp->TapeSettings()->GetDarkMode());
//---------------------- Pattern making system //---------------------- Pattern making system
ui->systemBookValueLabel->setFixedHeight(4 * QFontMetrics(ui->systemBookValueLabel->font()).lineSpacing()); ui->systemBookValueLabel->setFixedHeight(4 * QFontMetrics(ui->systemBookValueLabel->font()).lineSpacing());
connect(ui->systemCombo, QOverload<int>::of(&QComboBox::currentIndexChanged), this, [this]() connect(ui->systemCombo, QOverload<int>::of(&QComboBox::currentIndexChanged), this, [this]()
@ -122,6 +125,8 @@ void TapePreferencesConfigurationPage::Apply()
settings->SetToolBarStyle(ui->toolBarStyleCheck->isChecked()); settings->SetToolBarStyle(ui->toolBarStyleCheck->isChecked());
settings->SetDarkMode(ui->darkModeCheck->isChecked());
if (m_langChanged || m_systemChanged) if (m_langChanged || m_systemChanged)
{ {
const QString locale = qvariant_cast<QString>(ui->langCombo->currentData()); const QString locale = qvariant_cast<QString>(ui->langCombo->currentData());

View File

@ -7,7 +7,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>501</width> <width>501</width>
<height>550</height> <height>726</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
@ -156,10 +156,10 @@
<string>Default height and size</string> <string>Default height and size</string>
</property> </property>
<layout class="QGridLayout" name="gridLayout"> <layout class="QGridLayout" name="gridLayout">
<item row="0" column="2"> <item row="0" column="0">
<widget class="QLabel" name="labelHeightUnit"> <widget class="QLabel" name="label">
<property name="text"> <property name="text">
<string notr="true">Height unit</string> <string>Default height:</string>
</property> </property>
</widget> </widget>
</item> </item>
@ -173,10 +173,10 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="0"> <item row="0" column="2">
<widget class="QLabel" name="label"> <widget class="QLabel" name="labelHeightUnit">
<property name="text"> <property name="text">
<string>Default height:</string> <string notr="true">Height unit</string>
</property> </property>
</widget> </widget>
</item> </item>
@ -234,17 +234,24 @@
</widget> </widget>
</item> </item>
<item> <item>
<spacer name="verticalSpacer"> <widget class="QGroupBox" name="groupBox_4">
<property name="orientation"> <property name="title">
<enum>Qt::Vertical</enum> <string>User Interface</string>
</property> </property>
<property name="sizeHint" stdset="0"> <widget class="QCheckBox" name="darkModeCheck">
<size> <property name="geometry">
<width>20</width> <rect>
<height>40</height> <x>20</x>
</size> <y>30</y>
</property> <width>351</width>
</spacer> <height>20</height>
</rect>
</property>
<property name="text">
<string>Activate dark mode(Restart required)</string>
</property>
</widget>
</widget>
</item> </item>
</layout> </layout>
</widget> </widget>

View File

@ -40,6 +40,7 @@ int main(int argc, char *argv[])
Q_INIT_RESOURCE(icon); Q_INIT_RESOURCE(icon);
Q_INIT_RESOURCE(schema); Q_INIT_RESOURCE(schema);
Q_INIT_RESOURCE(flags); Q_INIT_RESOURCE(flags);
Q_INIT_RESOURCE(style);
QT_REQUIRE_VERSION(argc, argv, "5.2.0")// clazy:exclude=qstring-arg QT_REQUIRE_VERSION(argc, argv, "5.2.0")// clazy:exclude=qstring-arg

View File

@ -409,9 +409,30 @@ void MApplication::InitOptions()
//This does not happen under GNOME or KDE //This does not happen under GNOME or KDE
QIcon::setThemeName("win.icon.theme"); QIcon::setThemeName("win.icon.theme");
} }
ActivateDarkMode();
QResource::registerResource(diagramsPath()); QResource::registerResource(diagramsPath());
} }
// Dark mode
void MApplication::ActivateDarkMode()
{
VTapeSettings *settings = qApp->TapeSettings();
if (settings->GetDarkMode())
{
QFile f(":qdarkstyle/style.qss");
if (!f.exists())
{
qDebug()<<"Unable to set stylesheet, file not found\n";
}
else
{
f.open(QFile::ReadOnly | QFile::Text);
QTextStream ts(&f);
qApp->setStyleSheet(ts.readAll());
}
}
}
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
void MApplication::InitTrVars() void MApplication::InitTrVars()

View File

@ -68,6 +68,7 @@ public:
virtual void OpenSettings() override; virtual void OpenSettings() override;
VTapeSettings *TapeSettings(); VTapeSettings *TapeSettings();
void ActivateDarkMode();
QString diagramsPath() const; QString diagramsPath() const;

View File

@ -276,7 +276,6 @@ VApplication::VApplication(int &argc, char **argv)
setOrganizationDomain(VER_COMPANYDOMAIN_STR); setOrganizationDomain(VER_COMPANYDOMAIN_STR);
// Setting the Application version // Setting the Application version
setApplicationVersion(APP_VERSION_STR); setApplicationVersion(APP_VERSION_STR);
// making sure will create new instance...just in case we will ever do 2 objects of VApplication // making sure will create new instance...just in case we will ever do 2 objects of VApplication
VCommandLine::Reset(); VCommandLine::Reset();
VCommandLine::Get(*this); VCommandLine::Get(*this);
@ -407,6 +406,27 @@ bool VApplication::notify(QObject *receiver, QEvent *event)
return false; return false;
} }
void VApplication::ActivateDarkMode()
{
VSettings *settings = qApp->ValentinaSettings();
if (settings->GetDarkMode())
{
QFile f(":qdarkstyle/style.qss");
if (!f.exists())
{
qDebug()<<"Unable to set stylesheet, file not found\n";
}
else
{
f.open(QFile::ReadOnly | QFile::Text);
QTextStream ts(&f);
qApp->setStyleSheet(ts.readAll());
}
}
}
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
QString VApplication::TapeFilePath() const QString VApplication::TapeFilePath() const
{ {
@ -596,6 +616,7 @@ void VApplication::InitOptions()
//This does not happen under GNOME or KDE //This does not happen under GNOME or KDE
QIcon::setThemeName("win.icon.theme"); QIcon::setThemeName("win.icon.theme");
} }
ActivateDarkMode();
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------

View File

@ -66,6 +66,7 @@ public:
static QStringList LabelLanguages(); static QStringList LabelLanguages();
void StartLogging(); void StartLogging();
void ActivateDarkMode();
QTextStream *LogFile(); QTextStream *LogFile();
virtual const VTranslateVars *TrVars() override; virtual const VTranslateVars *TrVars() override;

View File

@ -124,6 +124,9 @@ PreferencesConfigurationPage::PreferencesConfigurationPage(QWidget *parent)
//----------------------- Toolbar //----------------------- Toolbar
ui->toolBarStyleCheck->setChecked(settings->GetToolBarStyle()); ui->toolBarStyleCheck->setChecked(settings->GetToolBarStyle());
// Theme
ui->darkModeCheck->setChecked(settings->GetDarkMode());
// Tab Scrolling // Tab Scrolling
ui->spinBoxDuration->setMinimum(VSettings::scrollingDurationMin); ui->spinBoxDuration->setMinimum(VSettings::scrollingDurationMin);
ui->spinBoxDuration->setMaximum(VSettings::scrollingDurationMax); ui->spinBoxDuration->setMaximum(VSettings::scrollingDurationMax);
@ -168,6 +171,7 @@ QStringList PreferencesConfigurationPage::Apply()
settings->SetOsSeparator(ui->osOptionCheck->isChecked()); settings->SetOsSeparator(ui->osOptionCheck->isChecked());
settings->SetToolBarStyle(ui->toolBarStyleCheck->isChecked()); settings->SetToolBarStyle(ui->toolBarStyleCheck->isChecked());
settings->SetDarkMode(ui->darkModeCheck->isChecked());
settings->SetFreeCurveMode(ui->checkBoxFreeCurve->isChecked()); settings->SetFreeCurveMode(ui->checkBoxFreeCurve->isChecked());
settings->SetDoubleClickZoomFitBestCurrentPP(ui->checkBoxZoomFitBestCurrentPP->isChecked()); settings->SetDoubleClickZoomFitBestCurrentPP(ui->checkBoxZoomFitBestCurrentPP->isChecked());

View File

@ -7,7 +7,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>516</width> <width>516</width>
<height>691</height> <height>751</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
@ -23,239 +23,279 @@
<attribute name="title"> <attribute name="title">
<string>General</string> <string>General</string>
</attribute> </attribute>
<layout class="QVBoxLayout" name="verticalLayout"> <widget class="QGroupBox" name="saveGroup">
<item> <property name="geometry">
<widget class="QGroupBox" name="saveGroup"> <rect>
<property name="title"> <x>20</x>
<string>Save</string> <y>0</y>
</property> <width>441</width>
<layout class="QHBoxLayout" name="horizontalLayout"> <height>70</height>
<item> </rect>
<widget class="QCheckBox" name="autoSaveCheck"> </property>
<property name="text"> <property name="title">
<string>Auto-save modified pattern</string> <string>Save</string>
</property> </property>
<property name="checked"> <layout class="QHBoxLayout" name="horizontalLayout">
<bool>true</bool> <item>
</property> <widget class="QCheckBox" name="autoSaveCheck">
</widget> <property name="text">
</item> <string>Auto-save modified pattern</string>
<item>
<widget class="QLabel" name="label">
<property name="text">
<string>Interval:</string>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="autoTime">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="suffix">
<string>min</string>
</property>
<property name="minimum">
<number>1</number>
</property>
<property name="maximum">
<number>60</number>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_2">
<property name="title">
<string>Language</string>
</property>
<layout class="QFormLayout" name="formLayout">
<property name="fieldGrowthPolicy">
<enum>QFormLayout::ExpandingFieldsGrow</enum>
</property> </property>
<item row="0" column="0"> <property name="checked">
<widget class="QLabel" name="label_2"> <bool>true</bool>
<property name="text">
<string>GUI language:</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QComboBox" name="langCombo"/>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
<string>Decimal separator parts:</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QCheckBox" name="osOptionCheck">
<property name="text">
<string notr="true">&lt; With OS options &gt;</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_4">
<property name="text">
<string>Default unit:</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label_5">
<property name="text">
<string>Label language:</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QComboBox" name="unitCombo"/>
</item>
<item row="3" column="1">
<widget class="QComboBox" name="labelCombo"/>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_3">
<property name="title">
<string>Pattern making system</string>
</property>
<layout class="QFormLayout" name="formLayout_2">
<property name="fieldGrowthPolicy">
<enum>QFormLayout::ExpandingFieldsGrow</enum>
</property> </property>
<item row="0" column="0"> </widget>
<widget class="QLabel" name="label_6"> </item>
<property name="text"> <item>
<string>Pattern making system:</string> <widget class="QLabel" name="label">
</property> <property name="text">
</widget> <string>Interval:</string>
</item> </property>
<item row="0" column="1"> </widget>
<widget class="QComboBox" name="systemCombo"/> </item>
</item> <item>
<item row="1" column="0"> <widget class="QSpinBox" name="autoTime">
<widget class="QLabel" name="label_7"> <property name="sizePolicy">
<property name="text"> <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<string>Author:</string> <horstretch>0</horstretch>
</property> <verstretch>0</verstretch>
</widget> </sizepolicy>
</item> </property>
<item row="1" column="1"> <property name="suffix">
<widget class="QLabel" name="systemAuthorValueLabel"> <string>min</string>
<property name="text"> </property>
<string notr="true">author</string> <property name="minimum">
</property> <number>1</number>
</widget> </property>
</item> <property name="maximum">
<item row="2" column="0"> <number>60</number>
<widget class="QLabel" name="label_9"> </property>
<property name="text"> </widget>
<string>Book:</string> </item>
</property> </layout>
</widget> </widget>
</item> <widget class="QGroupBox" name="groupBox_2">
<item row="2" column="1"> <property name="geometry">
<widget class="QPlainTextEdit" name="systemBookValueLabel"> <rect>
<property name="readOnly"> <x>20</x>
<bool>true</bool> <y>70</y>
</property> <width>441</width>
</widget> <height>173</height>
</item> </rect>
</layout> </property>
</widget> <property name="title">
</item> <string>Language</string>
<item> </property>
<widget class="QGroupBox" name="groupBox_5"> <layout class="QFormLayout" name="formLayout">
<property name="title"> <property name="fieldGrowthPolicy">
<string>Pattern editing</string> <enum>QFormLayout::ExpandingFieldsGrow</enum>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_3"> <item row="0" column="0">
<item> <widget class="QLabel" name="label_2">
<widget class="QPushButton" name="resetWarningsButton"> <property name="text">
<property name="sizePolicy"> <string>GUI language:</string>
<sizepolicy hsizetype="Fixed" vsizetype="Fixed"> </property>
<horstretch>0</horstretch> </widget>
<verstretch>0</verstretch> </item>
</sizepolicy> <item row="0" column="1">
</property> <widget class="QComboBox" name="langCombo"/>
<property name="text"> </item>
<string>Reset warnings</string> <item row="1" column="0">
</property> <widget class="QLabel" name="label_3">
</widget> <property name="text">
</item> <string>Decimal separator parts:</string>
<item> </property>
<widget class="QCheckBox" name="checkBoxFreeCurve"> </widget>
<property name="toolTip"> </item>
<string>Update a pattern only after a curve release</string> <item row="1" column="1">
</property> <widget class="QCheckBox" name="osOptionCheck">
<property name="text"> <property name="text">
<string>Free curve mode</string> <string notr="true">&lt; With OS options &gt;</string>
</property> </property>
<property name="checked"> <property name="checked">
<bool>true</bool> <bool>true</bool>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item row="2" column="0">
<widget class="QCheckBox" name="checkBoxZoomFitBestCurrentPP"> <widget class="QLabel" name="label_4">
<property name="text"> <property name="text">
<string>Double click calls Zoom fit best for current pattern piece</string> <string>Default unit:</string>
</property> </property>
<property name="checked"> </widget>
<bool>true</bool> </item>
</property> <item row="3" column="0">
</widget> <widget class="QLabel" name="label_5">
</item> <property name="text">
</layout> <string>Label language:</string>
</widget> </property>
</item> </widget>
<item> </item>
<widget class="QGroupBox" name="groupBox_6"> <item row="2" column="1">
<property name="title"> <widget class="QComboBox" name="unitCombo"/>
<string>Toolbar</string> </item>
</property> <item row="3" column="1">
<layout class="QVBoxLayout" name="verticalLayout_4"> <widget class="QComboBox" name="labelCombo"/>
<item> </item>
<widget class="QCheckBox" name="toolBarStyleCheck"> </layout>
<property name="text"> </widget>
<string>The text appears under the icon (recommended for beginners).</string> <widget class="QGroupBox" name="groupBox_3">
</property> <property name="geometry">
<property name="checked"> <rect>
<bool>true</bool> <x>20</x>
</property> <y>243</y>
</widget> <width>446</width>
</item> <height>185</height>
</layout> </rect>
</widget> </property>
</item> <property name="title">
<item> <string>Pattern making system</string>
<spacer name="verticalSpacer"> </property>
<property name="orientation"> <layout class="QFormLayout" name="formLayout_2">
<enum>Qt::Vertical</enum> <property name="fieldGrowthPolicy">
</property> <enum>QFormLayout::ExpandingFieldsGrow</enum>
<property name="sizeHint" stdset="0"> </property>
<size> <item row="0" column="0">
<width>20</width> <widget class="QLabel" name="label_6">
<height>40</height> <property name="text">
</size> <string>Pattern making system:</string>
</property> </property>
</spacer> </widget>
</item> </item>
</layout> <item row="0" column="1">
<widget class="QComboBox" name="systemCombo"/>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_7">
<property name="text">
<string>Author:</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLabel" name="systemAuthorValueLabel">
<property name="text">
<string notr="true">author</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_9">
<property name="text">
<string>Book:</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QPlainTextEdit" name="systemBookValueLabel">
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QGroupBox" name="groupBox_5">
<property name="geometry">
<rect>
<x>20</x>
<y>428</y>
<width>451</width>
<height>131</height>
</rect>
</property>
<property name="title">
<string>Pattern editing</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>
<widget class="QPushButton" name="resetWarningsButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Reset warnings</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="checkBoxFreeCurve">
<property name="toolTip">
<string>Update a pattern only after a curve release</string>
</property>
<property name="text">
<string>Free curve mode</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="checkBoxZoomFitBestCurrentPP">
<property name="text">
<string>Double click calls Zoom fit best for current pattern piece</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QGroupBox" name="groupBox_6">
<property name="geometry">
<rect>
<x>20</x>
<y>560</y>
<width>451</width>
<height>71</height>
</rect>
</property>
<property name="title">
<string>Toolbar</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_4">
<item>
<widget class="QCheckBox" name="toolBarStyleCheck">
<property name="text">
<string>The text appears under the icon (recommended for beginners).</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QGroupBox" name="groupBox_8">
<property name="geometry">
<rect>
<x>20</x>
<y>630</y>
<width>446</width>
<height>71</height>
</rect>
</property>
<property name="title">
<string>User Interface</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_7">
<item>
<widget class="QCheckBox" name="darkModeCheck">
<property name="text">
<string>Activate dark mode(Restart required)</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
</widget> </widget>
<widget class="QWidget" name="tabScrolling"> <widget class="QWidget" name="tabScrolling">
<attribute name="title"> <attribute name="title">

View File

@ -45,6 +45,7 @@ int main(int argc, char *argv[])
Q_INIT_RESOURCE(flags); Q_INIT_RESOURCE(flags);
Q_INIT_RESOURCE(icons); Q_INIT_RESOURCE(icons);
Q_INIT_RESOURCE(toolicon); Q_INIT_RESOURCE(toolicon);
Q_INIT_RESOURCE(style);
QT_REQUIRE_VERSION(argc, argv, "5.2.0")// clazy:exclude=qstring-arg,qstring-allocations QT_REQUIRE_VERSION(argc, argv, "5.2.0")// clazy:exclude=qstring-arg,qstring-allocations

Binary file not shown.

After

Width:  |  Height:  |  Size: 220 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 172 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 228 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 187 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 147 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 160 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 150 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 166 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 492 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 491 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 252 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 493 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 249 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 464 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 464 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 240 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 598 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 598 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 586 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 165 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 166 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 166 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 166 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 940 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 972 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 846 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 728 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 760 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 646 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 160 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 160 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 129 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 224 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 182 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 239 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 195 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 578 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 158 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 159 B

View File

@ -0,0 +1,46 @@
<RCC>
<qresource prefix="qss_icons">
<file>rc/up_arrow_disabled.png</file>
<file>rc/Hmovetoolbar.png</file>
<file>rc/stylesheet-branch-end.png</file>
<file>rc/branch_closed-on.png</file>
<file>rc/stylesheet-vline.png</file>
<file>rc/branch_closed.png</file>
<file>rc/branch_open-on.png</file>
<file>rc/transparent.png</file>
<file>rc/right_arrow_disabled.png</file>
<file>rc/sizegrip.png</file>
<file>rc/close.png</file>
<file>rc/close-hover.png</file>
<file>rc/close-pressed.png</file>
<file>rc/down_arrow.png</file>
<file>rc/Vmovetoolbar.png</file>
<file>rc/left_arrow.png</file>
<file>rc/stylesheet-branch-more.png</file>
<file>rc/up_arrow.png</file>
<file>rc/right_arrow.png</file>
<file>rc/left_arrow_disabled.png</file>
<file>rc/Hsepartoolbar.png</file>
<file>rc/branch_open.png</file>
<file>rc/Vsepartoolbar.png</file>
<file>rc/down_arrow_disabled.png</file>
<file>rc/undock.png</file>
<file>rc/checkbox_checked_disabled.png</file>
<file>rc/checkbox_checked_focus.png</file>
<file>rc/checkbox_checked.png</file>
<file>rc/checkbox_indeterminate.png</file>
<file>rc/checkbox_indeterminate_focus.png</file>
<file>rc/checkbox_unchecked_disabled.png</file>
<file>rc/checkbox_unchecked_focus.png</file>
<file>rc/checkbox_unchecked.png</file>
<file>rc/radio_checked_disabled.png</file>
<file>rc/radio_checked_focus.png</file>
<file>rc/radio_checked.png</file>
<file>rc/radio_unchecked_disabled.png</file>
<file>rc/radio_unchecked_focus.png</file>
<file>rc/radio_unchecked.png</file>
</qresource>
<qresource prefix="qdarkstyle">
<file>style.qss</file>
</qresource>
</RCC>

File diff suppressed because it is too large Load Diff

View File

@ -81,6 +81,7 @@ Q_GLOBAL_STATIC_WITH_ARGS(const QString, settingGeneralRestoreFileList, (QLatin1
Q_GLOBAL_STATIC_WITH_ARGS(const QString, settingGeneralGeometry, (QLatin1String("geometry"))) Q_GLOBAL_STATIC_WITH_ARGS(const QString, settingGeneralGeometry, (QLatin1String("geometry")))
Q_GLOBAL_STATIC_WITH_ARGS(const QString, settingGeneralWindowState, (QLatin1String("windowState"))) Q_GLOBAL_STATIC_WITH_ARGS(const QString, settingGeneralWindowState, (QLatin1String("windowState")))
Q_GLOBAL_STATIC_WITH_ARGS(const QString, settingGeneralToolbarsState, (QLatin1String("toolbarsState"))) Q_GLOBAL_STATIC_WITH_ARGS(const QString, settingGeneralToolbarsState, (QLatin1String("toolbarsState")))
Q_GLOBAL_STATIC_WITH_ARGS(const QString, settingConfigurationDarkMode, (QLatin1String("configuration/dark_mode")))
Q_GLOBAL_STATIC_WITH_ARGS(const QString, settingPreferenceDialogSize, (QLatin1String("preferenceDialogSize"))) Q_GLOBAL_STATIC_WITH_ARGS(const QString, settingPreferenceDialogSize, (QLatin1String("preferenceDialogSize")))
Q_GLOBAL_STATIC_WITH_ARGS(const QString, settingToolSeamAllowanceDialogSize, (QLatin1String("toolSeamAllowanceDialogSize"))) Q_GLOBAL_STATIC_WITH_ARGS(const QString, settingToolSeamAllowanceDialogSize, (QLatin1String("toolSeamAllowanceDialogSize")))
Q_GLOBAL_STATIC_WITH_ARGS(const QString, settingIncrementsDialogSize, (QLatin1String("toolIncrementsDialogSize"))) Q_GLOBAL_STATIC_WITH_ARGS(const QString, settingIncrementsDialogSize, (QLatin1String("toolIncrementsDialogSize")))
@ -513,6 +514,19 @@ void VCommonSettings::SetToolBarStyle(const bool &value)
setValue(*settingConfigurationToolBarStyle, value); setValue(*settingConfigurationToolBarStyle, value);
} }
//---------------------------------------------------------------------------------------------------------------------
bool VCommonSettings::GetDarkMode() const
{
return value(*settingConfigurationDarkMode, 1).toBool();
}
//---------------------------------------------------------------------------------------------------------------------
void VCommonSettings::SetDarkMode(const bool &value)
{
setValue(*settingConfigurationDarkMode, value);
}
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
bool VCommonSettings::IsFreeCurveMode() const bool VCommonSettings::IsFreeCurveMode() const
{ {

View File

@ -99,6 +99,9 @@ public:
bool GetToolBarStyle() const; bool GetToolBarStyle() const;
void SetToolBarStyle(const bool &value); void SetToolBarStyle(const bool &value);
bool GetDarkMode() const;
void SetDarkMode(const bool &value);
bool IsFreeCurveMode() const; bool IsFreeCurveMode() const;
void SetFreeCurveMode(bool value); void SetFreeCurveMode(bool value);

View File

@ -49,7 +49,8 @@ include(vmisc.pri)
RESOURCES += \ RESOURCES += \
share/resources/theme.qrc \ # Windows theme icons. share/resources/theme.qrc \ # Windows theme icons.
share/resources/icon.qrc \ # All other icons except cursors and Windows theme. share/resources/icon.qrc \ # All other icons except cursors and Windows theme.
share/resources/flags.qrc share/resources/flags.qrc \
share/resources/qdarkstyle/style.qrc
# This is static library so no need in "make install" # This is static library so no need in "make install"