Commit 78560e3d authored by Boudewijn Rempt's avatar Boudewijn Rempt

Switch dirty presets to on by default

BUG:410463
parent 2807378f
......@@ -18,8 +18,6 @@
#include "kis_config.h"
#include <limits.h>
#include <QtGlobal>
#include <QApplication>
#include <QDesktopWidget>
......@@ -383,7 +381,7 @@ void KisConfig::setColorPreviewRect(const QRect &rect)
bool KisConfig::useDirtyPresets(bool defaultValue) const
{
return (defaultValue ? false : m_cfg.readEntry("useDirtyPresets",false));
return (defaultValue ? false : m_cfg.readEntry("useDirtyPresets", true));
}
void KisConfig::setUseDirtyPresets(bool value)
{
......@@ -393,7 +391,7 @@ void KisConfig::setUseDirtyPresets(bool value)
bool KisConfig::useEraserBrushSize(bool defaultValue) const
{
return (defaultValue ? false : m_cfg.readEntry("useEraserBrushSize",false));
return (defaultValue ? false : m_cfg.readEntry("useEraserBrushSize", false));
}
void KisConfig::setUseEraserBrushSize(bool value)
......@@ -481,16 +479,12 @@ const KoColorProfile *KisConfig::getScreenProfile(int screen)
QByteArray bytes = KisColorManager::instance()->displayProfile(monitorId);
//dbgKrita << "\tgetScreenProfile()" << bytes.size();
const KoColorProfile * profile = 0;
if (bytes.length() > 0) {
const KoColorProfile *profile = KoColorSpaceRegistry::instance()->createColorProfile(RGBAColorModelID.id(), Integer8BitsColorDepthID.id(), bytes);
profile = KoColorSpaceRegistry::instance()->createColorProfile(RGBAColorModelID.id(), Integer8BitsColorDepthID.id(), bytes);
//dbgKrita << "\tKisConfig::getScreenProfile for screen" << screen << profile->name();
return profile;
}
else {
//dbgKrita << "\tCould not get a system monitor profile";
return 0;
}
return profile;
}
const KoColorProfile *KisConfig::displayProfile(int screen) const
......@@ -1621,7 +1615,7 @@ QColor KisConfig::defaultBackgroundColor(bool defaultValue) const
return (defaultValue ? QColor(Qt::white) : m_cfg.readEntry("BackgroundColorForNewImage", QColor(Qt::white)));
}
void KisConfig::setDefaultBackgroundColor(QColor value)
void KisConfig::setDefaultBackgroundColor(const QColor &value)
{
m_cfg.writeEntry("BackgroundColorForNewImage", value);
}
......@@ -2139,18 +2133,22 @@ void KisConfig::writeKoColor(const QString& name, const KoColor& color) const
}
//ported from kispropertiesconfig.
KoColor KisConfig::readKoColor(const QString& name, const KoColor& color) const
KoColor KisConfig::readKoColor(const QString& name, const KoColor& _color) const
{
QDomDocument doc;
KoColor color = _color;
if (!m_cfg.readEntry(name).isNull()) {
doc.setContent(m_cfg.readEntry(name));
QDomElement e = doc.documentElement().firstChild().toElement();
return KoColor::fromXML(e, Integer16BitsColorDepthID.id());
} else {
color = KoColor::fromXML(e, Integer16BitsColorDepthID.id());
}
else {
QString blackColor = "<!DOCTYPE Color>\n<Color>\n <RGB r=\"0\" space=\"sRGB-elle-V2-srgbtrc.icc\" b=\"0\" g=\"0\"/>\n</Color>\n";
doc.setContent(blackColor);
QDomElement e = doc.documentElement().firstChild().toElement();
return KoColor::fromXML(e, Integer16BitsColorDepthID.id());
color = KoColor::fromXML(e, Integer16BitsColorDepthID.id());
}
return color;
......
......@@ -441,7 +441,7 @@ public:
void setDefaultBackgroundOpacity(quint8 value);
QColor defaultBackgroundColor(bool defaultValue = false) const;
void setDefaultBackgroundColor(QColor value);
void setDefaultBackgroundColor(const QColor &value);
enum BackgroundStyle {
RASTER_LAYER = 0,
......
Markdown is supported
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