Masterwork From Distant Lands
ActivePublic

Authored by dkazakov on Jul 25 2017, 7:24 PM.
diff --git a/libs/ui/dialogs/kis_dlg_preferences.cc b/libs/ui/dialogs/kis_dlg_preferences.cc
index 21661ca..089407b 100644
--- a/libs/ui/dialogs/kis_dlg_preferences.cc
+++ b/libs/ui/dialogs/kis_dlg_preferences.cc
@@ -790,11 +790,11 @@ DisplaySettingsTab::DisplaySettingsTab(QWidget *parent, const char *name)
connect(grpOpenGL, SIGNAL(toggled(bool)), SLOT(slotUseOpenGLToggled(bool)));
KoColor gridColor(KoColorSpaceRegistry::instance()->rgb8());
- gridColor.fromQColor(cfg.getOpenGLGridColor());
+ gridColor.fromQColor(cfg.getPixelGridColor());
pixelGridColorButton->setColor(gridColor);
- pixelGridDrawingThresholdBox->setValue(cfg.getOpenGLGridDrawingThreshold() * 100);
+ pixelGridDrawingThresholdBox->setValue(cfg.getPixelGridDrawingThreshold() * 100);
grpPixelGrid->setEnabled(true);
- grpPixelGrid->setChecked(cfg.openGLGridEnabled());
+ grpPixelGrid->setChecked(cfg.pixelGridEnabled());
}
void DisplaySettingsTab::setDefault()
@@ -836,11 +836,11 @@ void DisplaySettingsTab::setDefault()
chkHidePopups->setChecked(cfg.hidePopups(true));
KoColor gridColor(KoColorSpaceRegistry::instance()->rgb8());
- gridColor.fromQColor(cfg.getOpenGLGridColor(true));
+ gridColor.fromQColor(cfg.getPixelGridColor(true));
pixelGridColorButton->setColor(gridColor);
- pixelGridDrawingThresholdBox->setValue(cfg.getOpenGLGridDrawingThreshold(true) * 100);
+ pixelGridDrawingThresholdBox->setValue(cfg.getPixelGridDrawingThreshold(true) * 100);
grpPixelGrid->setEnabled(true);
- grpPixelGrid->setChecked(cfg.openGLGridEnabled(true));
+ grpPixelGrid->setChecked(cfg.pixelGridEnabled(true));
}
void DisplaySettingsTab::slotUseOpenGLToggled(bool isChecked)
@@ -1138,9 +1138,9 @@ bool KisDlgPreferences::editPreferences()
cfg.setHideToolbarFullscreen(dialog->m_fullscreenSettings->chkToolbar->checkState());
cfg.setCursorMainColor(dialog->m_general->cursorColorBtutton->color().toQColor());
- cfg.setOpenGLGridColor(dialog->m_displaySettings->pixelGridColorButton->color().toQColor());
- cfg.setOpenGLGridDrawingThreshold(dialog->m_displaySettings->pixelGridDrawingThresholdBox->value() / 100);
- cfg.enableOpenGLGrid(dialog->m_displaySettings->grpPixelGrid->isChecked());
+ cfg.setPixelGridColor(dialog->m_displaySettings->pixelGridColorButton->color().toQColor());
+ cfg.setPixelGridDrawingThreshold(dialog->m_displaySettings->pixelGridDrawingThresholdBox->value() / 100);
+ cfg.enablePixelGrid(dialog->m_displaySettings->grpPixelGrid->isChecked());
dialog->m_authorPage->apply();
diff --git a/libs/ui/kis_config.cc b/libs/ui/kis_config.cc
index 1751ca0..bb5f4d8 100644
--- a/libs/ui/kis_config.cc
+++ b/libs/ui/kis_config.cc
@@ -733,37 +733,37 @@ void KisConfig::setGridSubdivisionColor(const QColor & v) const
m_cfg.writeEntry("gridsubdivisioncolor", v);
}
-QColor KisConfig::getOpenGLGridColor(bool defaultValue) const
+QColor KisConfig::getPixelGridColor(bool defaultValue) const
{
QColor col(255, 255, 255);
- return (defaultValue ? col : m_cfg.readEntry("openGlGridColor", col));
+ return (defaultValue ? col : m_cfg.readEntry("pixelGridColor", col));
}
-void KisConfig::setOpenGLGridColor(const QColor & v) const
+void KisConfig::setPixelGridColor(const QColor & v) const
{
- m_cfg.writeEntry("openGlGridColor", v);
+ m_cfg.writeEntry("pixelGridColor", v);
}
-qreal KisConfig::getOpenGLGridDrawingThreshold(bool defaultValue) const
+qreal KisConfig::getPixelGridDrawingThreshold(bool defaultValue) const
{
qreal border = 8.0f;
- return (defaultValue ? border : m_cfg.readEntry("openGlGridDrawingThreshold", border));
+ return (defaultValue ? border : m_cfg.readEntry("pixelGridDrawingThreshold", border));
}
-void KisConfig::setOpenGLGridDrawingThreshold(qreal v) const
+void KisConfig::setPixelGridDrawingThreshold(qreal v) const
{
- m_cfg.writeEntry("openGlGridDrawingThreshold", v);
+ m_cfg.writeEntry("pixelGridDrawingThreshold", v);
}
-bool KisConfig::openGLGridEnabled(bool defaultValue) const
+bool KisConfig::pixelGridEnabled(bool defaultValue) const
{
bool enabled = true;
- return (defaultValue ? enabled : m_cfg.readEntry("openGLGridEnabled", enabled));
+ return (defaultValue ? enabled : m_cfg.readEntry("pixelGridEnabled", enabled));
}
-void KisConfig::enableOpenGLGrid(bool v) const
+void KisConfig::enablePixelGrid(bool v) const
{
- m_cfg.writeEntry("openGLGridEnabled", v);
+ m_cfg.writeEntry("pixelGridEnabled", v);
}
quint32 KisConfig::guidesLineStyle(bool defaultValue) const
diff --git a/libs/ui/kis_config.h b/libs/ui/kis_config.h
index ff213cd..0ea2b74 100644
--- a/libs/ui/kis_config.h
+++ b/libs/ui/kis_config.h
@@ -192,14 +192,14 @@ public:
QColor getGridSubdivisionColor(bool defaultValue = false) const;
void setGridSubdivisionColor(const QColor & v) const;
- QColor getOpenGLGridColor(bool defaultValue = false) const;
- void setOpenGLGridColor(const QColor & v) const;
+ QColor getPixelGridColor(bool defaultValue = false) const;
+ void setPixelGridColor(const QColor & v) const;
- qreal getOpenGLGridDrawingThreshold(bool defaultValue = false) const;
- void setOpenGLGridDrawingThreshold(qreal v) const;
+ qreal getPixelGridDrawingThreshold(bool defaultValue = false) const;
+ void setPixelGridDrawingThreshold(qreal v) const;
- bool openGLGridEnabled(bool defaultValue = false) const;
- void enableOpenGLGrid(bool v) const;
+ bool pixelGridEnabled(bool defaultValue = false) const;
+ void enablePixelGrid(bool v) const;
quint32 guidesLineStyle(bool defaultValue = false) const;
void setGuidesLineStyle(quint32 v) const;
diff --git a/libs/ui/opengl/kis_opengl_canvas2.cpp b/libs/ui/opengl/kis_opengl_canvas2.cpp
index 96cdf9f..5ee1d30 100644
--- a/libs/ui/opengl/kis_opengl_canvas2.cpp
+++ b/libs/ui/opengl/kis_opengl_canvas2.cpp
@@ -524,7 +524,7 @@ void KisOpenGLCanvas2::drawGrid()
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
KisConfig cfg;
- QColor gridColor = cfg.getOpenGLGridColor();
+ QColor gridColor = cfg.getPixelGridColor();
d->solidColorShader->setUniformValue(
d->solidColorShader->location(Uniform::FragmentColor),
QVector4D(gridColor.redF(), gridColor.greenF(), gridColor.blueF(), 0.5f));
@@ -781,7 +781,7 @@ void KisOpenGLCanvas2::renderCanvasGL()
drawCheckers();
drawImage();
KisConfig cfg;
- if ((coordinatesConverter()->effectiveZoom() > cfg.getOpenGLGridDrawingThreshold() - 0.00001) && cfg.openGLGridEnabled()) {
+ if ((coordinatesConverter()->effectiveZoom() > cfg.getPixelGridDrawingThreshold() - 0.00001) && cfg.pixelGridEnabled()) {
drawGrid();
}
if (KisOpenGL::hasOpenGL3()) {
dkazakov edited the content of this paste. (Show Details)Jul 25 2017, 7:24 PM
dkazakov changed the title of this paste from untitled to Masterwork From Distant Lands.
dkazakov updated the paste's language from autodetect to autodetect.