Commit 419de3fb authored by Devin Lin's avatar Devin Lin 🎨
Browse files

quicksettings/nightcolor: Fix functionality, update to new changes to config

parent e9dad065
Pipeline #230067 passed with stage
in 1 minute and 19 seconds
......@@ -9,17 +9,11 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.kde.org/standards/kcfg/1.0
http://www.kde.org/standards/kcfg/1.0/kcfg.xsd" >
<kcfgfile name="kwinrc"/>
<kcfgfile name="kwinrc" />
<group name="NightColor">
<entry name="ActiveEnabled" type="Bool">
<default>true</default>
</entry>
<entry name="Active" type="Bool">
<default>false</default>
</entry>
<entry name="ModeEnabled" type="Bool">
<default>true</default>
</entry>
<entry name="Mode" type="Enum">
<choices name="ColorCorrect::NightColorMode">
<choice name="Automatic"/>
......@@ -29,13 +23,11 @@
</choices>
<default>Automatic</default>
</entry>
<entry name="NightTemperatureEnabled" type="Bool">
<default>true</default>
<entry name="DayTemperature" type="Int">
<default>6500</default>
</entry>
<entry name="NightTemperature" type="Int">
<default>4500</default>
<min>1000</min>
<max>6500</max>
</entry>
<entry name="LatitudeAuto" type="Double">
<default>0.</default>
......@@ -43,9 +35,6 @@
<entry name="LongitudeAuto" type="Double">
<default>0.</default>
</entry>
<entry name="LocationEnabled" type="Bool">
<default>true</default>
</entry>
<entry name="LatitudeFixed" type="Double">
<default>0.</default>
</entry>
......@@ -63,3 +52,5 @@
</entry>
</group>
</kcfg>
......@@ -33,9 +33,7 @@ bool NightColorUtil::enabled()
void NightColorUtil::setEnabled(bool enabled)
{
m_settings->setModeEnabled(true);
m_settings->setMode(ColorCorrect::NightColorMode::Constant);
m_settings->setActiveEnabled(true);
m_settings->setActive(enabled);
m_settings->save();
}
......
......@@ -31,5 +31,5 @@ public Q_SLOTS:
private:
bool m_enabled;
OrgKdeKwinColorCorrectInterface *m_ccInterface;
NightColorSettings *const m_settings;
NightColorSettings *m_settings;
};
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment