Commit 68739e5d authored by Wolthera van Hövell's avatar Wolthera van Hövell 🛍

Use Advanced Color Selector Configuration to set visual's shape, p.2

The debugging.

Probably not all bugs, but the obvious ones are gone now.
parent e7d52d68
...@@ -36,6 +36,7 @@ ...@@ -36,6 +36,7 @@
#include "kis_internal_color_selector.h" #include "kis_internal_color_selector.h"
#include "ui_wdgdlginternalcolorselector.h" #include "ui_wdgdlginternalcolorselector.h"
#include "kis_config.h" #include "kis_config.h"
#include "kis_config_notifier.h"
#include "kis_color_input.h" #include "kis_color_input.h"
struct KisInternalColorSelector::Private struct KisInternalColorSelector::Private
...@@ -73,6 +74,8 @@ KisInternalColorSelector::KisInternalColorSelector(QWidget *parent, KoColor colo ...@@ -73,6 +74,8 @@ KisInternalColorSelector::KisInternalColorSelector(QWidget *parent, KoColor colo
m_ui->visualSelector->slotSetColor(color); m_ui->visualSelector->slotSetColor(color);
m_ui->visualSelector->setDisplayRenderer(displayRenderer); m_ui->visualSelector->setDisplayRenderer(displayRenderer);
connect(m_ui->visualSelector, SIGNAL(sigNewColor(KoColor)), this, SLOT(slotColorUpdated(KoColor))); connect(m_ui->visualSelector, SIGNAL(sigNewColor(KoColor)), this, SLOT(slotColorUpdated(KoColor)));
connect(KisConfigNotifier::instance(), SIGNAL(configChanged()), m_ui->visualSelector, SLOT(slotRebuildSelectors()));
connect(m_ui->screenColorPicker, SIGNAL(sigNewColorPicked(KoColor)),this, SLOT(slotColorUpdated(KoColor))); connect(m_ui->screenColorPicker, SIGNAL(sigNewColorPicked(KoColor)),this, SLOT(slotColorUpdated(KoColor)));
//TODO: Add disable signal as well. Might be not necessary...? //TODO: Add disable signal as well. Might be not necessary...?
KisConfig cfg; KisConfig cfg;
...@@ -101,6 +104,7 @@ KisInternalColorSelector::KisInternalColorSelector(QWidget *parent, KoColor colo ...@@ -101,6 +104,7 @@ KisInternalColorSelector::KisInternalColorSelector(QWidget *parent, KoColor colo
m_d->sRGB.fromKoColor(m_d->currentColor); m_d->sRGB.fromKoColor(m_d->currentColor);
m_d->hexColorInput = new KisHexColorInput(this, &m_d->sRGB); m_d->hexColorInput = new KisHexColorInput(this, &m_d->sRGB);
m_d->hexColorInput->update();
connect(m_d->hexColorInput, SIGNAL(updated()), SLOT(slotSetColorFromHex())); connect(m_d->hexColorInput, SIGNAL(updated()), SLOT(slotSetColorFromHex()));
m_ui->leftPane->addWidget(m_d->hexColorInput); m_ui->leftPane->addWidget(m_d->hexColorInput);
m_d->hexColorInput->setToolTip(i18n("This is a hexcode input, for webcolors. It can only get colors in the sRGB space.")); m_d->hexColorInput->setToolTip(i18n("This is a hexcode input, for webcolors. It can only get colors in the sRGB space."));
......
...@@ -186,11 +186,16 @@ void KisVisualColorSelector::slotRebuildSelectors() ...@@ -186,11 +186,16 @@ void KisVisualColorSelector::slotRebuildSelectors()
channel3 = 2; channel3 = 2;
break; break;
case SV: case SV:
case SV2:
modelS = KisVisualColorSelectorShape::HSV; modelS = KisVisualColorSelectorShape::HSV;
channel2 = 1; channel2 = 1;
channel3 = 2; channel3 = 2;
break; break;
} }
if (m_d->acs_config.mainType==Triangle) {
modelS = KisVisualColorSelectorShape::HSV;
//Triangle only really works in HSV mode.
}
KisVisualColorSelectorShape *bar; KisVisualColorSelectorShape *bar;
if (m_d->acs_config.subType==Ring) { if (m_d->acs_config.subType==Ring) {
bar = new KisVisualEllipticalSelectorShape(this, bar = new KisVisualEllipticalSelectorShape(this,
......
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