Git commit f09bc200e9eaf807116806365499014002a2e8dc by Boudewijn Rempt. Committed on 06/04/2018 at 08:52. Pushed by rempt into branch 'master'. FEATURE: add a blending optioon to the color picker This patch adds new 'blending' functionality to the color picker (both the dedicated tool and the ctrl-activated one) along with the associated "blend" slider to the color picker's tool options GUI. Patch by Emmet & Eoin O'Neill Thanks! CCMAIL:emmetoneill.pdx@gmail.com CCMAIL:kimageshop@kde.org Differential Revision: https://phabricator.kde.org/D11895 M +7 -1 libs/ui/tool/kis_tool_paint.cc M +0 -1 libs/ui/tool/kis_tool_paint.h M +24 -7 libs/ui/tool/kis_tool_utils.cpp M +7 -5 libs/ui/tool/kis_tool_utils.h M +4 -9 libs/ui/tool/strokes/kis_color_picker_stroke_strategy.cpp M +5 -7 libs/ui/tool/strokes/kis_color_picker_stroke_strategy.h M +52 -54 plugins/tools/basictools/kis_tool_colorpicker.cc M +9 -14 plugins/tools/basictools/kis_tool_colorpicker.h M +148 -47 plugins/tools/basictools/wdgcolorpicker.ui https://commits.kde.org/krita/f09bc200e9eaf807116806365499014002a2e8dc diff --git a/libs/ui/tool/kis_tool_paint.cc b/libs/ui/tool/kis_tool_paint.cc index 7d683588c7c..acbba99bf8a 100644 --- a/libs/ui/tool/kis_tool_paint.cc +++ b/libs/ui/tool/kis_tool_paint.cc @@ -399,8 +399,14 @@ void KisToolPaint::addPickerJob(const PickingJob &pick= ingJob) KisPaintDeviceSP device =3D fromCurrentNode ? currentNode()->colorPickSourceDevice() : image()->projection(); = + // Used for color picker blending. + KoColor currentColor =3D canvas()->resourceManager()->foregroundColor(= ); + if( pickingJob.action =3D=3D PickBgNode || pickingJob.action =3D=3D Pi= ckBgImage ){ + currentColor =3D canvas()->resourceManager()->backgroundColor(); + } + image()->addJob(m_pickerStrokeId, - new KisColorPickerStrokeStrategy::Data(device, imagePo= int)); + new KisColorPickerStrokeStrategy::Data(device, imagePo= int, currentColor)); } = void KisToolPaint::beginAlternateAction(KoPointerEvent *event, AlternateAc= tion action) diff --git a/libs/ui/tool/kis_tool_paint.h b/libs/ui/tool/kis_tool_paint.h index c057886ef02..d1c3a47556f 100644 --- a/libs/ui/tool/kis_tool_paint.h +++ b/libs/ui/tool/kis_tool_paint.h @@ -175,7 +175,6 @@ private: = bool isPickingAction(AlternateAction action); = - struct PickingJob { PickingJob() {} PickingJob(QPointF _documentPixel, diff --git a/libs/ui/tool/kis_tool_utils.cpp b/libs/ui/tool/kis_tool_utils.= cpp index 16022636f8e..cfc8298b4db 100644 --- a/libs/ui/tool/kis_tool_utils.cpp +++ b/libs/ui/tool/kis_tool_utils.cpp @@ -1,5 +1,6 @@ /* * Copyright (c) 2009 Boudewijn Rempt + * Copyright (c) 2018 Emmet & Eoin O'Neill * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -15,15 +16,11 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-13= 01, USA. */ + #include = -#include #include -#include -#include #include -#include -#include #include #include #include @@ -32,12 +29,13 @@ = namespace KisToolUtils { = - bool pick(KisPaintDeviceSP dev, const QPoint& pos, KoColor *color, int= radius) + bool pick(KisPaintDeviceSP dev, const QPoint &pos, KoColor *color, KoC= olor *previousColor, int radius, int blend) { KIS_ASSERT(dev); const KoColorSpace* cs =3D dev->colorSpace(); KoColor pickedColor(Qt::transparent, cs); = + // Ctrl picker sampling radius. if (radius <=3D 1) { dev->pixel(pos.x(), pos.y(), &pickedColor); } else { @@ -59,9 +57,25 @@ namespace KisToolUtils { } } = - const quint8** cpixels =3D const_cast(pixels.c= onstData()); + const quint8 **cpixels =3D const_cast(pixels.c= onstData()); cs->mixColorsOp()->mixColors(cpixels, pixels.size(), pickedCol= or.data()); } + = + // Ctrl picker color blending. + if (previousColor && blend < 100) { + //Scale from 0..100% to 0..255 range for mixOp weights. + quint8 blendScaled =3D static_cast(blend * 2.55f); + + const quint8 *colors[2]; + colors[0] =3D previousColor->data(); + colors[1] =3D pickedColor.data(); + qint16 weights[2]; + weights[0] =3D 255 - blendScaled; + weights[1] =3D blendScaled; + + const KoMixColorsOp *mixOp =3D dev->colorSpace()->mixColorsOp(= ); + mixOp->mixColors(colors, weights, 2, pickedColor.data()); + } = pickedColor.convertTo(dev->compositionSourceColorSpace()); = @@ -146,6 +160,7 @@ namespace KisToolUtils { , normaliseValues(false) , sampleMerged(true) , radius(1) + , blend(100) { } = @@ -163,6 +178,7 @@ namespace KisToolUtils { props.setProperty("normaliseValues", normaliseValues); props.setProperty("sampleMerged", sampleMerged); props.setProperty("radius", radius); + props.setProperty("blend", blend); = KConfigGroup config =3D KSharedConfig::openConfig()->group(CONFIG= _GROUP_NAME); = @@ -182,6 +198,7 @@ namespace KisToolUtils { normaliseValues =3D props.getBool("normaliseValues", false); sampleMerged =3D props.getBool("sampleMerged", !defaultActivation = ? false : true); radius =3D props.getInt("radius", 1); + blend =3D props.getInt("blend", 100); } = } diff --git a/libs/ui/tool/kis_tool_utils.h b/libs/ui/tool/kis_tool_utils.h index f78b2cf8eeb..f1701f72903 100644 --- a/libs/ui/tool/kis_tool_utils.h +++ b/libs/ui/tool/kis_tool_utils.h @@ -1,5 +1,6 @@ /* * Copyright (c) 2009 Boudewijn Rempt + * Copyright (c) 2018 Emmet & Eoin O'Neill * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -15,16 +16,15 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-13= 01, USA. */ + #ifndef KIS_TOOL_UTILS_H #define KIS_TOOL_UTILS_H = -#include - -#include #include #include -#include = +class QPoint; +class KoColor; = namespace KisToolUtils { = @@ -37,6 +37,7 @@ struct KRITAUI_EXPORT ColorPickerConfig { bool normaliseValues; bool sampleMerged; int radius; + int blend; = void save(bool defaultActivation =3D true) const; void load(bool defaultActivation =3D true); @@ -47,7 +48,8 @@ private: /** * return the color at the given position on the given paint device. */ -bool KRITAUI_EXPORT pick(KisPaintDeviceSP dev, const QPoint& pos, KoColor = *color, int radius =3D 1); +bool KRITAUI_EXPORT pick(KisPaintDeviceSP dev, const QPoint &pos, KoColor = *color, + KoColor *previousColor =3D nullptr, int radius = =3D 1, int blend =3D 100); = /** * Recursively search a node with a non-transparent pixel diff --git a/libs/ui/tool/strokes/kis_color_picker_stroke_strategy.cpp b/li= bs/ui/tool/strokes/kis_color_picker_stroke_strategy.cpp index 5ddf177f522..a197334748d 100644 --- a/libs/ui/tool/strokes/kis_color_picker_stroke_strategy.cpp +++ b/libs/ui/tool/strokes/kis_color_picker_stroke_strategy.cpp @@ -18,22 +18,16 @@ = #include "kis_color_picker_stroke_strategy.h" = -#include - - -#include "kis_debug.h" #include "kis_tool_utils.h" -#include -#include "kis_default_bounds.h" #include "kis_paint_device.h" = - struct KisColorPickerStrokeStrategy::Private { Private() : shouldSkipWork(false) {} = bool shouldSkipWork; int radius =3D 1; + int blend =3D 100; }; = KisColorPickerStrokeStrategy::KisColorPickerStrokeStrategy(int lod) @@ -46,6 +40,7 @@ KisColorPickerStrokeStrategy::KisColorPickerStrokeStrateg= y(int lod) config.load(); = m_d->radius =3D qMax(1, qRound(config.radius * KisLodTransform::lodToS= cale(lod))); + m_d->blend =3D config.blend; } = KisColorPickerStrokeStrategy::~KisColorPickerStrokeStrategy() @@ -60,7 +55,8 @@ void KisColorPickerStrokeStrategy::doStrokeCallback(KisSt= rokeJobData *data) KIS_ASSERT_RECOVER_RETURN(d); = KoColor color; - bool result =3D KisToolUtils::pick(d->dev, d->pt, &color, m_d->radius); + KoColor previous =3D d->currentColor; + bool result =3D KisToolUtils::pick(d->dev, d->pt, &color, &previous, m= _d->radius, m_d->blend); Q_UNUSED(result); = emit sigColorUpdated(color); @@ -76,4 +72,3 @@ KisStrokeStrategy* KisColorPickerStrokeStrategy::createLo= dClone(int levelOfDetai Qt::DirectConnection); return lodStrategy; } - diff --git a/libs/ui/tool/strokes/kis_color_picker_stroke_strategy.h b/libs= /ui/tool/strokes/kis_color_picker_stroke_strategy.h index 09633ea6665..940f1cd3552 100644 --- a/libs/ui/tool/strokes/kis_color_picker_stroke_strategy.h +++ b/libs/ui/tool/strokes/kis_color_picker_stroke_strategy.h @@ -20,12 +20,9 @@ #define __KIS_COLOR_PICKER_STROKE_STRATEGY_H = #include -#include #include "kis_simple_stroke_strategy.h" #include "kis_lod_transform.h" - -class KoColor; - +#include "KoColor.h" = class KisColorPickerStrokeStrategy : public QObject, public KisSimpleStrok= eStrategy { @@ -33,19 +30,20 @@ class KisColorPickerStrokeStrategy : public QObject, pu= blic KisSimpleStrokeStrat public: class Data : public KisStrokeJobData { public: - Data(KisPaintDeviceSP _dev, const QPoint _pt) - : dev(_dev), pt(_pt) + Data(KisPaintDeviceSP _dev, const QPoint _pt, KoColor _currentColo= r) + : dev(_dev), pt(_pt), currentColor(_currentColor) {} = KisStrokeJobData* createLodClone(int levelOfDetail) override { KisLodTransform t(levelOfDetail); const QPoint realPoint =3D t.map(pt); = - return new Data(dev, realPoint); + return new Data(dev, realPoint, currentColor); } = KisPaintDeviceSP dev; QPoint pt; + KoColor currentColor; // Used for color picker blending. }; public: KisColorPickerStrokeStrategy(int lod =3D 0); diff --git a/plugins/tools/basictools/kis_tool_colorpicker.cc b/plugins/too= ls/basictools/kis_tool_colorpicker.cc index 0d1259682b4..5db84f9aae2 100644 --- a/plugins/tools/basictools/kis_tool_colorpicker.cc +++ b/plugins/tools/basictools/kis_tool_colorpicker.cc @@ -2,6 +2,7 @@ * Copyright (c) 1999 Matthias Elter * Copyright (c) 2002 Patrick Julien * Copyright (c) 2010 Luk=C3=A1=C5=A1 Tvrd=C3=BD + * Copyright (c) 2018 Emmet & Eoin O'Neill * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -19,55 +20,27 @@ */ = #include "kis_tool_colorpicker.h" -#include = #include - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - #include - -#include "kis_layer.h" #include "kis_cursor.h" -#include "kis_image.h" -#include "kis_paint_device.h" -#include "kis_properties_configuration.h" #include "KisDocument.h" #include "kis_canvas2.h" #include "KisReferenceImagesLayer.h" - -#include "KoPointerEvent.h" #include "KoCanvasBase.h" #include "kis_random_accessor_ng.h" -#include "KoColor.h" #include "KoResourceServerProvider.h" -#include -#include #include - #include "kis_wrapped_rect.h" #include "kis_tool_utils.h" = - namespace { -// The location of the sample all visible layers in the combobox +// GUI ComboBox index constants const int SAMPLE_MERGED =3D 0; } = -KisToolColorPicker::KisToolColorPicker(KoCanvasBase* canvas) +KisToolColorPicker::KisToolColorPicker(KoCanvasBase *canvas) : KisTool(canvas, KisCursor::pickerCursor()), m_config(new KisToolUtils::ColorPickerConfig) { @@ -84,7 +57,7 @@ KisToolColorPicker::~KisToolColorPicker() } } = -void KisToolColorPicker::paint(QPainter& gc, const KoViewConverter &conver= ter) +void KisToolColorPicker::paint(QPainter &gc, const KoViewConverter &conver= ter) { Q_UNUSED(gc); Q_UNUSED(converter); @@ -99,6 +72,7 @@ void KisToolColorPicker::activate(ToolActivation activati= on, const QSetsave(m_toolActivationSource =3D=3D KisTool::DefaultActivatio= n); @@ -106,7 +80,7 @@ void KisToolColorPicker::deactivate() KisTool::deactivate(); } = -void KisToolColorPicker::pickColor(const QPointF& pos) +void KisToolColorPicker::pickColor(const QPointF &pos) { if (m_colorPickerDelayTimer.isActive()) { return; @@ -116,8 +90,7 @@ void KisToolColorPicker::pickColor(const QPointF& pos) m_colorPickerDelayTimer.start(100); } = - - QScopedPointer > imageLocker; + QScopedPointer> imageLocker; = m_pickedColor.setOpacity(0.0); = @@ -147,6 +120,7 @@ void KisToolColorPicker::pickColor(const QPointF& pos) dev =3D currentImage()->projection(); } = + // Color sampling radius. if (m_config->radius =3D=3D 1) { QPoint realPos =3D pos.toPoint(); if (currentImage()->wrapAroundModePermitted()) { @@ -156,7 +130,6 @@ void KisToolColorPicker::pickColor(const QPointF& pos) dev->pixel(realPos.x(), realPos.y(), &m_pickedColor); } else { - const KoColorSpace *cs =3D dev->colorSpace(); int pixelSize =3D cs->pixelSize(); = @@ -181,7 +154,6 @@ void KisToolColorPicker::pickColor(const QPointF& pos) } } = - const quint8 **cpixels =3D const_cast(pixels.= constData()); cs->mixColorsOp()->mixColors(cpixels, pixels.size(), dstColor); = @@ -190,20 +162,38 @@ void KisToolColorPicker::pickColor(const QPointF& pos) delete[] dstColor; } = - m_pickedColor.convertTo(dev->compositionSourceColorSpace()); - } + // Color blending. + if(m_config->blend < 100){ + //Scale from 0..100% to 0..255 range for mixOp weights. + quint8 blendScaled =3D static_cast(m_config->blend * 2= .55f); = - if (m_config->updateColor && - m_pickedColor.opacityU8() !=3D OPACITY_TRANSPARENT_U8) { + KoColor previousColor =3D canvas()->resourceManager()->foregro= undColor(); = - KoColor publicColor =3D m_pickedColor; - publicColor.setOpacity(OPACITY_OPAQUE_U8); + const quint8 *colors[2]; + colors[0] =3D previousColor.data(); + colors[1] =3D m_pickedColor.data(); + qint16 weights[2]; + weights[0] =3D 255 - blendScaled; + weights[1] =3D blendScaled; = - if (m_config->toForegroundColor) { - canvas()->resourceManager()->setResource(KoCanvasResourceManag= er::ForegroundColor, publicColor); + const KoMixColorsOp *mixOp =3D dev->colorSpace()->mixColorsOp(= ); + mixOp->mixColors(colors, weights, 2, m_pickedColor.data()); } - else { - canvas()->resourceManager()->setResource(KoCanvasResourceManag= er::BackgroundColor, publicColor); + + m_pickedColor.convertTo(dev->compositionSourceColorSpace()); + + if (m_config->updateColor && + m_pickedColor.opacityU8() !=3D OPACITY_TRANSPARENT_U8) { + + KoColor publicColor =3D m_pickedColor; + publicColor.setOpacity(OPACITY_OPAQUE_U8); + + if (m_config->toForegroundColor) { + canvas()->resourceManager()->setResource(KoCanvasResourceM= anager::ForegroundColor, publicColor); + } + else { + canvas()->resourceManager()->setResource(KoCanvasResourceM= anager::BackgroundColor, publicColor); + } } } } @@ -225,7 +215,7 @@ void KisToolColorPicker::beginPrimaryAction(KoPointerEv= ent *event) } = QPoint pos =3D convertToImagePixelCoordFloored(event); - // the color picking has to start in the visible part of the layer + // Color picking has to start in the visible part of the layer if (!currentImage()->bounds().contains(pos) && !currentImage()->wrapAroundModePermitted()) { event->ignore(); @@ -256,7 +246,7 @@ void KisToolColorPicker::endPrimaryAction(KoPointerEven= t *event) ent.color =3D m_pickedColor; // We don't ask for a name, too intrusive here = - KoColorSet* palette =3D m_palettes.at(m_optionsWidget->cmbPalette-= >currentIndex()); + KoColorSet *palette =3D m_palettes.at(m_optionsWidget->cmbPalette-= >currentIndex()); palette->add(ent); = if (!palette->save()) { @@ -265,7 +255,6 @@ void KisToolColorPicker::endPrimaryAction(KoPointerEven= t *event) } } = - struct PickedChannel { QString name; QString valueText; @@ -318,6 +307,9 @@ QWidget* KisToolColorPicker::createOptionWidget() specialSpacer->setFixedSize(0, 0); m_optionsWidget->layout()->addWidget(specialSpacer); = + // Initialize blend KisSliderSpinBox + m_optionsWidget->blend->setRange(0,100); + updateOptionWidget(); = connect(m_optionsWidget->cbUpdateCurrentColor, SIGNAL(toggled(bool)), = SLOT(slotSetUpdateColor(bool))); @@ -326,10 +318,12 @@ QWidget* KisToolColorPicker::createOptionWidget() SLOT(slotSetAddPalette(bool))); connect(m_optionsWidget->radius, SIGNAL(valueChanged(int)), SLOT(slotChangeRadius(int))); + connect(m_optionsWidget->blend, SIGNAL(valueChanged(int)), + SLOT(slotChangeBlend(int))); connect(m_optionsWidget->cmbSources, SIGNAL(currentIndexChanged(int)), SLOT(slotSetColorSource(int))); = - KoResourceServer* srv =3D KoResourceServerProvider::instan= ce()->paletteServer(); + KoResourceServer *srv =3D KoResourceServerProvider::instan= ce()->paletteServer(); = if (!srv) { return m_optionsWidget; @@ -356,6 +350,7 @@ void KisToolColorPicker::updateOptionWidget() m_optionsWidget->cmbSources->setCurrentIndex(SAMPLE_MERGED + !m_config= ->sampleMerged); m_optionsWidget->cbPalette->setChecked(m_config->addPalette); m_optionsWidget->radius->setValue(m_config->radius); + m_optionsWidget->blend->setValue(m_config->blend); } = void KisToolColorPicker::setToForeground(bool newValue) @@ -374,7 +369,6 @@ void KisToolColorPicker::slotSetUpdateColor(bool state) m_config->updateColor =3D state; } = - void KisToolColorPicker::slotSetNormaliseValues(bool state) { m_config->normaliseValues =3D state; @@ -391,17 +385,21 @@ void KisToolColorPicker::slotChangeRadius(int value) m_config->radius =3D value; } = +void KisToolColorPicker::slotChangeBlend(int value) +{ + m_config->blend =3D value; +} + void KisToolColorPicker::slotSetColorSource(int value) { m_config->sampleMerged =3D value =3D=3D SAMPLE_MERGED; } = -void KisToolColorPicker::slotAddPalette(KoResource* resource) +void KisToolColorPicker::slotAddPalette(KoResource *resource) { - KoColorSet* palette =3D dynamic_cast(resource); + KoColorSet *palette =3D dynamic_cast(resource); if (palette) { m_optionsWidget->cmbPalette->addSqueezedItem(palette->name()); m_palettes.append(palette); } } - diff --git a/plugins/tools/basictools/kis_tool_colorpicker.h b/plugins/tool= s/basictools/kis_tool_colorpicker.h index 0f00df9e96f..6c7f3d06779 100644 --- a/plugins/tools/basictools/kis_tool_colorpicker.h +++ b/plugins/tools/basictools/kis_tool_colorpicker.h @@ -2,6 +2,7 @@ * Copyright (c) 1999 Matthias Elter * Copyright (c) 2002 Patrick Julien * Copyright (c) 2010 Luk=C3=A1=C5=A1 Tvrd=C3=BD + * Copyright (c) 2018 Emmet & Eoin O'Neill * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -21,16 +22,11 @@ #ifndef KIS_TOOL_COLOR_PICKER_H_ #define KIS_TOOL_COLOR_PICKER_H_ = -#include #include - #include "KoToolFactoryBase.h" #include "ui_wdgcolorpicker.h" #include "kis_tool.h" -#include -#include #include -#include = class KoResource; class KoColorSet; @@ -51,12 +47,11 @@ public: = class KisToolColorPicker : public KisTool { - Q_OBJECT Q_PROPERTY(bool toForeground READ toForeground WRITE setToForeground N= OTIFY toForegroundChanged) = public: - KisToolColorPicker(KoCanvasBase* canvas); + KisToolColorPicker(KoCanvasBase *canvas); ~KisToolColorPicker() override; = public: @@ -69,6 +64,7 @@ public: bool normaliseValues; bool sampleMerged; int radius; + int blend; = void save(ToolActivation activation) const; void load(ToolActivation activation); @@ -81,7 +77,7 @@ public: void continuePrimaryAction(KoPointerEvent *event) override; void endPrimaryAction(KoPointerEvent *event) override; = - void paint(QPainter& gc, const KoViewConverter &converter) override; + void paint(QPainter &gc, const KoViewConverter &converter) override; = bool toForeground() const; = @@ -98,6 +94,7 @@ public Q_SLOTS: void slotSetNormaliseValues(bool); void slotSetAddPalette(bool); void slotChangeRadius(int); + void slotChangeBlend(int); void slotAddPalette(KoResource* resource); void slotSetColorSource(int value); = @@ -106,14 +103,15 @@ private: void pickColor(const QPointF& pos); void updateOptionWidget(); = - //Configuration m_config; + // Configuration QScopedPointer m_config; + ToolActivation m_toolActivationSource; bool m_isActivated; = KoColor m_pickedColor; = - // used to skip some of the tablet events and don't update the colour = that often + // Used to skip some tablet events and update color less often QTimer m_colorPickerDelayTimer; = ColorPickerOptionsWidget *m_optionsWidget; @@ -123,7 +121,6 @@ private: = class KisToolColorPickerFactory : public KoToolFactoryBase { - public: KisToolColorPickerFactory() : KoToolFactoryBase("KritaSelected/KisToolColorPicker") { @@ -137,11 +134,9 @@ public: = ~KisToolColorPickerFactory() override {} = - KoToolBase * createTool(KoCanvasBase *canvas) override { + KoToolBase *createTool(KoCanvasBase *canvas) override { return new KisToolColorPicker(canvas); } }; = - #endif // KIS_TOOL_COLOR_PICKER_H_ - diff --git a/plugins/tools/basictools/wdgcolorpicker.ui b/plugins/tools/bas= ictools/wdgcolorpicker.ui index c213ba02feb..5b8e0de5664 100644 --- a/plugins/tools/basictools/wdgcolorpicker.ui +++ b/plugins/tools/basictools/wdgcolorpicker.ui @@ -7,15 +7,102 @@ 0 0 263 - 307 + 323 Color Picker - + + + + 1 + + + + + Blend: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + 1 + + + + + + + + 0 + 0 + + + + <nobr>Blending controls the percentage of color that= is picked</nobr> and mixed with your current brush color. A full ble= nding value picks colors completely, ignoring brush color. + + + + + + + + + + 0 + 0 + + + + + 200 + 0 + + + + + 200 + 32767 + + + + <nobr>Determines whether the color picker will sample&= lt;/nobr> colors from all visible layers or only the currently selected = layer. + + + 0 + + + + Sample All Visible Layers + + + + + Sample Current Layer + + + + + + + + Displays per-channel color information below as percentages = instead of bytes. + + + Show colors as percentages + + + + + + + 0 + 100 + + 2 @@ -31,8 +118,21 @@ - - + + + + QFrame::Plain + + + 1 + + + Qt::Horizontal + + + + + 1 @@ -49,17 +149,29 @@ 0 - + - Sample radius: + Radius: Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + 1 + + + + 0 + 0 + + + + <nobr>Radius controls the color picker's sampling ar= ea.</nobr> Pixel colors within this radius are mixed together. + px @@ -74,14 +186,7 @@ - - - Show colors as percentages - - - - - + 1 @@ -99,6 +204,9 @@ + + <nobr>Checking this box will add a new color swatch&= lt;/nobr> to a palette each time you pick a color. + Add to palette: @@ -109,48 +217,41 @@ - - - - Update current color - - + + + + + + <nobr>Controls whether the color picker updates the&= lt;/nobr> current foreground or not. + + + Update color + + + + - - - - - 0 - 0 - + + + + QFrame::Plain - - - 200 - 0 - + + 1 - - - 200 - 32767 - + + Qt::Horizontal - - - Sample All Visible Layers - - - - - Current Layer - - + + KisSliderSpinBox + QWidget +
kis_slider_spin_box.h
+
SqueezedComboBox QComboBox