mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-26 14:23:09 +00:00
quicksettings/nightcolor: Fix functionality, update to new changes to config
This commit is contained in:
parent
e9dad0651c
commit
419de3fbe7
3 changed files with 6 additions and 17 deletions
|
|
@ -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;
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue