diff --git a/krita/data/kritarc b/krita/data/kritarc
index 16ce4b018a..13cc8372ae 100644
--- a/krita/data/kritarc
+++ b/krita/data/kritarc
@@ -1,478 +1,478 @@
favoriteCompositeOps=normal,erase,multiply,burn,darken,add,dodge,screen,overlay,soft_light_svg,luminize,lighten,saturation,color
ArtColorSel.ColorSpace=0
ArtColorSel.InversedSaturation=false
ArtColorSel.Light=0.5
ArtColorSel.LightPieces=11
ArtColorSel.NumRings=7
ArtColorSel.RingAngles=0,0,0,0,0,0,0,0,0,0,0
ArtColorSel.RingPieces=12
ArtColorSel.SelColorA=1
ArtColorSel.SelColorH=0
ArtColorSel.SelColorS=0
ArtColorSel.SelColorX=0.5
BackgroundColorForNewImage=255,255,255
BackgroundOpacityForNewImage=255
BackgroundStyleForNewImage=0
Krita/Ocio/OcioColorManagementMode=0
Krita/Ocio/OcioLockColorVisualRepresentation=false
Krita/Ocio/UseOcio=false
LastBackGroundColor=\n\n \n\n
LastForeGroundColor=\n\n \n\n
LastPreset=Basic_circle
LastPreset_-1=Basic_circle
LineSmoothingDelayDistance=50
LineSmoothingDistance=50
LineSmoothingFinishStabilizedCurve=true
LineSmoothingStabilizeSensors=true
LineSmoothingTailAggressiveness=0.14999999999999999
LineSmoothingType=1
LineSmoothingUseDelayDistance=true
NumberOfLayersForNewImage=2
PaintopPopupDetached=false
SpecificColorSelector/ShowColorSpaceSelector=false
baseLength=50
colorDepthDef=U8
colorModelDef=RGBA
colorProfileDef=sRGB-elle-V2-srgbtrc.icc
favoritePresetsTag=★ My Favorites
internal_selector_active_color_set=Default
globalSnapBoundingBox=false
globalSnapExtension=false
globalSnapImageBounds=true
globalSnapImageCenter=true
globalSnapIntersection=false
globalSnapNode=false
globalSnapOrthogonal=false
gridmaincolor=99,99,99
gridmainstyle=0
gridsubdivisioncolor=150,150,150
gridsubdivisionstyle=1
guidesColor=99,99,99
guidesLineStyle=0
imageHeightDef=1200
imageResolutionDef=300
imageWidthDef=1600
levelOfDetailEnabled=true
numberOfOnionSkins=10
oninSkinTintColorForward=0,255,0
onionSkinOpacity_-1=173
onionSkinOpacity_-10=22
onionSkinOpacity_-2=163
onionSkinOpacity_-3=147
onionSkinOpacity_-4=127
onionSkinOpacity_-5=107
onionSkinOpacity_-6=84
onionSkinOpacity_-7=63
onionSkinOpacity_-8=48
onionSkinOpacity_-9=33
onionSkinOpacity_0=175
onionSkinOpacity_1=173
onionSkinOpacity_10=22
onionSkinOpacity_2=163
onionSkinOpacity_3=147
onionSkinOpacity_4=127
onionSkinOpacity_5=107
onionSkinOpacity_6=84
onionSkinOpacity_7=63
onionSkinOpacity_8=48
onionSkinOpacity_9=33
onionSkinState_-1=true
onionSkinState_-10=false
onionSkinState_-2=true
onionSkinState_-3=false
onionSkinState_-4=false
onionSkinState_-5=false
onionSkinState_-6=false
onionSkinState_-7=false
onionSkinState_-8=false
onionSkinState_-9=false
onionSkinState_0=true
onionSkinState_1=true
onionSkinState_10=false
onionSkinState_2=true
onionSkinState_3=false
onionSkinState_4=false
onionSkinState_5=false
onionSkinState_6=false
onionSkinState_7=false
onionSkinState_8=false
onionSkinState_9=false
onionSkinTintColorBackward=255,0,0
onionSkinTintFactor=191
presethistory=Basic_tip_default
showAdditionalOnionSkinsSettings=true
toolbarslider_1=opacity
toolbarslider_2=size
toolbarslider_3=flow
[advancedColorSelector]
allowHorizontalLayout=true
colorSelectorConfiguration=3|0|5|0
commonColorsAlignment=false
commonColorsAutoUpdate=false
commonColorsCount=12
commonColorsHeight=16
commonColorsNumCols=1
commonColorsNumRows=1
-commonColorsScrolling=false
+commonColorsScrolling=true
commonColorsShow=true
commonColorsWidth=16
customColorSpaceDepthID=U8
customColorSpaceModel=RGBA
customColorSpaceProfile=sRGB built-in
lastUsedColorsAlignment=true
lastUsedColorsCount=20
lastUsedColorsHeight=16
lastUsedColorsNumCols=1
lastUsedColorsNumRows=1
lastUsedColorsScrolling=true
lastUsedColorsShow=true
lastUsedColorsWidth=16
minimalShadeSelectorAsGradient=true
minimalShadeSelectorLineConfig=0|0.2|0|0|0|0|0;1|0|1|1|0|0|0;2|0|-1|1|0|0|0;
minimalShadeSelectorLineHeight=10
minimalShadeSelectorPatchCount=10
popupOnMouseClick=true
popupOnMouseOver=false
shadeSelectorHideable=false
shadeSelectorType=Minimal
shadeSelectorUpdateOnBackground=true
shadeSelectorUpdateOnForeground=true
shadeSelectorUpdateOnLeftClick=false
shadeSelectorUpdateOnRightClick=false
useCustomColorSpace=false
zoomSize=280
[DockWidget sharedtooldocker]
TabbedMode=false
[KisToolTransform]
filterId=Bicubic
[MainWindow]
State=AAAA/wAAAAD9AAAABAAAAAAAAABJAAADzfwCAAAAA/sAAAAOAFQAbwBvAGwAQgBvAHgBAAAAPwAAA80AAAAxAP////sAAAAkAEYAbABvAHcAUwBoAGEAcABlAEIAbwB4AEQAbwBjAGsAZQByAAAAA2oAAADHAAAAAAAAAAD7AAAAKABGAGwAbwB3AFMAdABlAG4AYwBpAGwAQgBvAHgARABvAGMAawBlAHIAAAADfQAAAMcAAAAAAAAAAAAAAAEAAAEGAAADzfwCAAAAQPsAAAAaAEsAaQBzAEIAaQByAGQAZQB5AGUAQgBvAHgAAAAAAP////8AAAAAAAAAAPsAAAAgAEsAaQBzAFAAYQBsAGUAdAB0AGUARABvAGMAawBlAHIAAAAAAP////8AAAAAAAAAAPsAAAAaAEsAbwBDAG8AbABvAHIARABvAGMAawBlAHIAAAAAAP////8AAAAAAAAAAPsAAAAwAEsAaQBzAFQAcgBpAGEAbgBnAGwAZQBDAG8AbABvAHIAUwBlAGwAZQBjAHQAbwByAAAAAAD/////AAAAAAAAAAD7AAAAIgBTAGgAYQBkAG8AdwAgAFAAcgBvAHAAZQByAHQAaQBlAHMAAAAAAP////8AAAAAAAAAAPsAAAAgAFMAaABhAHAAZQAgAFAAcgBvAHAAZQByAHQAaQBlAHMAAAAAAP////8AAAAAAAAAAPsAAAAaAFMAaABhAHAAZQBTAGUAbABlAGMAdABvAHIAAAAASAAAAEQAAAAAAAAAAPsAA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ACMAP////sAAAAWAFQAbwB1AGMAaABEAG8AYwBrAGUAcgAAAAJMAAABMQAAABMA////+wAAABoAQQByAHIAYQBuAGcAZQBEAG8AYwBrAGUAcgAAAAAA/////wAAAHoA////+wAAADoAYwBvAG0AaQBjAHMAXwBwAHIAbwBqAGUAYwB0AF8AbQBhAG4AYQBnAGUAcgBfAGQAbwBjAGsAZQByAAAAAAD/////AAAAuQD////7AAAAKgBxAHUAaQBjAGsAXwBzAGUAdAB0AGkAbgBnAHMAXwBkAG8AYwBrAGUAcgAAAAAA/////wAAAIwA////+wAAABYAUABhAGcAZQByAEQAbwBjAGsAZQByAAAAAAD/////AAAALQD////7AAAAJgBsAGEAcwB0AGQAbwBjAHUAbQBlAG4AdABzAGQAbwBjAGsAZQByAAAAAAD/////AAAAiQD///8AAAACAAAKAAAAALz8AQAAAAH7AAAAGgBUAG8AbwBsAEIAYQByAEQAbwBjAGsAZQByAAAAAAD/////AAAAAAAAAAAAAAADAAAAAAAAAAD8AQAAAAT7AAAAHABGAGwAaQBwAGIAbwBvAGsARABvAGMAawBlAHIAAAAAAP////8AAAAAAAAAAPsAAAAeAEEAbgBpAG0AYQB0AGkAbwBuAEQAbwBjAGsAZQByAAAAAAD/////AAABBQD////7AAAAIABPAG4AaQBvAG4AUwBrAGkAbgBzAEQAbwBjAGsAZQByAAAAAAD/////AAABNgD////7AAAAHABUAGkAbQBlAGwAaQBuAGUARABvAGMAawBlAHIAAAAAAP////8AAABVAP///wAABU0AAAPNAAAABAAAAAQAAAAIAAAACPwAAAABAAAAAgAAAAIAAAAWAG0AYQBpAG4AVABvAG8AbABCAGEAcgEAAAAA/////wAAAAAAAAAAAAAAHgBCAHIAdQBzAGgAZQBzAEEAbgBkAFMAdAB1AGYAZgEAAAC5/////wAAAAAAAAAA
[advancedColorSelector]
gamma=2.2000000000000002
hidePopupOnClickCheck=false
hsxSettingType=0
lumaB=0.0722
lumaG=0.71519999999999995
lumaR=0.21260000000000001
onDockerResize=0
shadeMyPaintType=HSV
zoomSelectorOptions=0
[calligra]
ColorSpaceExtensionsPlugins=\\0
ColorSpaceExtensionsPluginsDisabled=
ColorSpacePlugins=\\0
ColorSpacePluginsDisabled=
DockerPlugins=\\0
DockerPluginsDisabled=textdocumentinspection
FlakePlugins=,
ShapePlugins=,
ToolsBlacklist=CreatePathTool,KoPencilTool,ConnectionTool,KarbonFilterEffectsTool,KritaShape/KisToolText,ArtisticTextTool,TextTool
ToolPlugins=,,
ToolPluginsDisabled=
[KoShapeCollection]
QuickShapes=ArtisticText,TextShapeID,EllipseShape,RectangleShape
[colorhotkeys]
steps_blueyellow=10
steps_hue=36
steps_lightness=10
steps_redgreen=10
steps_saturation=10
[crashprevention]
CreatingCanvas=false
[hsxColorSlider]
hsiH=false
hsiI=false
hsiS=false
hslH=true
hslL=true
hslS=true
hsvH=false
hsvS=false
hsvV=false
hsyH=false
hsyS=false
hsyY=false
[krita]
State=AAAA/wAAAAD9AAAABAAAAAAAAABEAAAE6PwCAAAAA/sAAAAOAFQAbwBvAGwAQgBvAHgBAAAARAAABOgAAAAdAQAAA/sAAAAkAEYAbABvAHcAUwBoAGEAcABlAEIAbwB4AEQAbwBjAGsAZQByAAAAA2oAAADHAAAAAAAAAAD7AAAAKABGAGwAbwB3AFMAdABlAG4AYwBpAGwAQgBvAHgARABvAGMAawBlAHIAAAADfQAAAMcAAAAAAAAAAAAAAAEAAAEZAAAE6PwCAAAAO/sAAAAaAEsAaQBzAEIAaQByAGQAZQB5AGUAQgBvAHgAAAAAAP////8AAAAAAAAAAPsAAAAgAEsAaQBzAFAAYQBsAGUAdAB0AGUARABvAGMAawBlAHIAAAAAAP////8AAAAAAAAAAPsAAAAaAEsAbwBDAG8AbABvAHIARABvAGMAawBlAHIAAAAAAP////8AAAAAAAAAAPsAAAAwAEsAaQBzAFQAcgBpAGEAbgBnAGwAZQBDAG8AbABvAHIAUwBlAGwAZQBjAHQAbwByAAAAAAD/////AAAAAAAAAAD7AAAAIgBTAGgAYQBkAG8A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GUAcgAAAAAA/////wAAAFABAAAD+wAAABoAUAByAGUAcwBlAHQASABpAHMAdABvAHIAeQAAAAAA/////wAAAHABAAAD+wAAADIAUwB2AGcAUwB5AG0AYgBvAGwAQwBvAGwAbABlAGMAdABpAG8AbgBEAG8AYwBrAGUAcgAAAAAA/////wAAAAAAAAAA+wAAABYAVABvAHUAYwBoAEQAbwBjAGsAZQByAAAAAAD/////AAAAHAEAAAP7AAAAGgBBAHIAcgBhAG4AZwBlAEQAbwBjAGsAZQByAAAAAAD/////AAAAkAEAAAP7AAAAKgBBAG4AaQBtAGEAdABpAG8AbgBDAHUAcgB2AGUAcwBEAG8AYwBrAGUAcgAAAAAA/////wAAAJgBAAADAAAAAgAAB4AAAAC8/AEAAAAB+wAAABoAVABvAG8AbABCAGEAcgBEAG8AYwBrAGUAcgAAAAAA/////wAAAAAAAAAAAAAAAwAAAAAAAAAA/AEAAAAE+wAAABwARgBsAGkAcABiAG8AbwBrAEQAbwBjAGsAZQByAAAAAAD/////AAAAAAAAAAD7AAAAIABPAG4AaQBvAG4AUwBrAGkAbgBzAEQAbwBjAGsAZQByAAAAAAD/////AAABSAEAAAP7AAAAHgBBAG4AaQBtAGEAdABpAG8AbgBEAG8AYwBrAGUAcgAAAAAA/////wAAASUBAAAD+wAAABwAVABpAG0AZQBsAGkAbgBlAEQAbwBjAGsAZQByAAAAAAD/////AAAAlgEAAAMAAAihAAAE6AAAAAQAAAAEAAAACAAAAAj8AAAAAQAAAAIAAAACAAAAFgBtAGEAaQBuAFQAbwBvAGwAQgBhAHIBAAAAAP////8AAAAAAAAAAAAAAB4AQgByAHUAcwBoAGUAcwBBAG4AZABTAHQAdQBmAGYBAAAA1P////8AAAAAAAAAAA==
ToolBarsMovable=Enabled
[krita][DockWidget AnimationCurvesDocker]
Collapsed=false
DockArea=2
Locked=false
height=421
width=448
xPosition=0
yPosition=0
[krita][DockWidget AnimationDocker]
Collapsed=false
DockArea=8
Locked=false
height=160
width=280
xPosition=0
yPosition=0
[krita][DockWidget ArtisticColorSelector]
Collapsed=false
DockArea=2
Locked=false
height=294
width=337
xPosition=0
yPosition=0
[krita][DockWidget ChannelDocker]
Collapsed=false
DockArea=2
Locked=false
height=30
width=100
xPosition=0
yPosition=0
[krita][DockWidget ColorSelectorNg]
Collapsed=false
DockArea=2
Locked=false
height=176
width=281
xPosition=0
yPosition=20
[krita][DockWidget ColorSlider]
Collapsed=false
DockArea=2
Locked=false
height=460
width=640
xPosition=0
yPosition=20
[krita][DockWidget CompositionDocker]
Collapsed=false
DockArea=2
Locked=false
height=300
width=400
xPosition=0
yPosition=0
[krita][DockWidget DigitalMixer]
Collapsed=false
DockArea=2
Locked=false
height=30
width=100
xPosition=0
yPosition=0
[krita][DockWidget GridDocker]
Collapsed=false
DockArea=2
Locked=false
height=342
width=441
xPosition=0
yPosition=0
[krita][DockWidget HistogramDocker]
Collapsed=false
DockArea=2
Locked=false
height=91
width=281
xPosition=0
yPosition=20
[krita][DockWidget History]
Collapsed=false
DockArea=2
Locked=false
height=460
width=640
xPosition=0
yPosition=20
[krita][DockWidget ImageDocker]
Collapsed=false
DockArea=2
Locked=false
height=300
width=399
xPosition=0
yPosition=0
[krita][DockWidget KisLayerBox]
DockArea=2
Locked=false
height=358
width=281
xPosition=0
yPosition=20
[krita][DockWidget LutDocker]
Collapsed=false
DockArea=2
Locked=false
height=286
width=357
xPosition=0
yPosition=0
[krita][DockWidget OnionSkinsDocker]
Collapsed=false
DockArea=8
Locked=false
height=210
width=356
xPosition=0
yPosition=0
[krita][DockWidget OverviewDocker]
Collapsed=false
DockArea=2
Locked=false
height=30
width=100
xPosition=0
yPosition=0
[krita][DockWidget PaletteDocker]
Collapsed=false
DockArea=2
Locked=false
height=219
width=256
xPosition=0
yPosition=0
[krita][DockWidget PatternDocker]
Collapsed=false
DockArea=2
Locked=false
height=30
width=100
xPosition=0
yPosition=0
[krita][DockWidget PresetDocker]
Collapsed=false
DockArea=2
Locked=false
height=460
width=640
xPosition=0
yPosition=20
[krita][DockWidget PresetHistory]
Collapsed=false
DockArea=2
Locked=false
height=30
width=100
xPosition=0
yPosition=0
[krita][DockWidget Shape Properties]
DockArea=2
Locked=false
height=480
width=640
xPosition=0
yPosition=0
[krita][DockWidget ShapeCollectionDocker]
Collapsed=false
DockArea=2
Locked=false
height=0
width=0
xPosition=0
yPosition=20
[krita][DockWidget SmallColorSelector]
DockArea=2
Locked=false
height=460
width=640
xPosition=0
yPosition=20
[krita][DockWidget SpecificColorSelector]
DockArea=2
Locked=false
height=460
width=640
xPosition=0
yPosition=20
[krita][DockWidget TasksetDocker]
Collapsed=false
DockArea=2
Locked=false
height=300
width=400
xPosition=0
yPosition=0
[krita][DockWidget TimelineDocker]
Collapsed=false
DockArea=8
Locked=false
height=30
width=100
xPosition=0
yPosition=0
[krita][DockWidget ToolBox]
DockArea=1
Locked=false
height=610
width=63
xPosition=0
yPosition=20
[krita][DockWidget sharedtooldocker]
Collapsed=false
DockArea=2
Locked=false
height=460
width=640
xPosition=0
yPosition=20
[krita][Toolbar mainToolBar]
ToolButtonStyle=IconOnly
[TemplateChooserDialog]
ShowCustomDocumentWidgetByDefault=true
LastReturnType=Custom Document
[theme]
Theme=Krita dark
[python]
enable_colorspace=true
enable_comics_project_management_tools=true
enable_documenttools=true
enable_exportlayers=true
enable_filtermanager=true
enable_lastdocumentsdocker=true
enable_quick_settings_docker=true
enable_scripter=true
enable_tenbrushes=true
enable_tenscripts=true
diff --git a/plugins/dockers/advancedcolorselector/kis_color_patches.cpp b/plugins/dockers/advancedcolorselector/kis_color_patches.cpp
index 4c5261e7f4..f54557494c 100644
--- a/plugins/dockers/advancedcolorselector/kis_color_patches.cpp
+++ b/plugins/dockers/advancedcolorselector/kis_color_patches.cpp
@@ -1,350 +1,352 @@
/*
* Copyright (c) 2010 Adam Celarek
*
* This library is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; version 2.1 of the License.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include "kis_color_patches.h"
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include "kis_canvas2.h"
#include "KoCanvasResourceProvider.h"
#include "kis_display_color_converter.h"
KisColorPatches::KisColorPatches(QString configPrefix, QWidget *parent) :
KisColorSelectorBase(parent), m_allowColorListChangeGuard(true), m_scrollValue(0), m_configPrefix(configPrefix)
{
resize(1, 1);
updateSettings();
}
void KisColorPatches::setColors(QListcolors)
{
if (m_allowColorListChangeGuard) {
m_colors = colors;
m_allowColorListChangeGuard=false;
KisColorPatches* parent = dynamic_cast(m_parent);
if (parent) parent->setColors(colors);
KisColorPatches* popup = dynamic_cast(m_popup);
if (popup) popup->setColors(colors);
m_allowColorListChangeGuard=true;
update();
}
}
void KisColorPatches::paintEvent(QPaintEvent* e)
{
QPainter painter(this);
if(m_allowScrolling) {
if(m_direction == Vertical)
painter.translate(0, m_scrollValue);
else
painter.translate(m_scrollValue, 0);
}
int widgetWidth = width();
int numPatchesInARow = qMax(widgetWidth/m_patchWidth, 1);
int widgetHeight = height();
int numPatchesInACol = qMax(widgetHeight/m_patchHeight, 1);
for(int i = m_buttonList.size(); i < qMin(fieldCount(), m_colors.size() + m_buttonList.size()); i++) {
int row;
int col;
if(m_direction == Vertical) {
row = i /numPatchesInARow;
col = i % numPatchesInARow;
}
else {
row= i % numPatchesInACol;
col = i / numPatchesInACol;
}
QColor qcolor = converter()->toQColor(m_colors.at(i - m_buttonList.size()));
painter.fillRect(col*m_patchWidth,
row*m_patchHeight,
m_patchWidth,
m_patchHeight,
qcolor);
}
QWidget::paintEvent(e);
+
}
void KisColorPatches::wheelEvent(QWheelEvent* event)
{
m_scrollValue+=event->delta()/2;
if(m_direction == Vertical) {
if(m_scrollValue < -1*(heightOfAllPatches()-height()))
m_scrollValue = -1*(heightOfAllPatches()-height());
}
else {
if(m_scrollValue < -1*(widthOfAllPatches()-width()))
m_scrollValue = -1*(widthOfAllPatches()-width());
}
if(m_scrollValue>0) m_scrollValue=0;
update();
}
void KisColorPatches::resizeEvent(QResizeEvent* event)
{
if(size()==QSize(1, 1))
return;
QWheelEvent dummyWheelEvent(QPoint(), 0, Qt::NoButton, Qt::NoModifier);
wheelEvent(&dummyWheelEvent);
if(parentWidget()==0) {
// this instance is a popup
setMinimumWidth(m_patchWidth*(m_patchCount/4));
setMaximumWidth(minimumWidth());
}
- if(m_allowScrolling == false && event->oldSize() != event->size()) {
+
+ if (m_allowScrolling == false && event->oldSize() != event->size()) {
if(m_direction == Horizontal) {
setMaximumHeight(heightForWidth(width()));
setMinimumHeight(heightForWidth(width()));
}
else {
setMaximumWidth(widthForHeight(height()));
setMinimumWidth(widthForHeight(height()));
}
}
}
void KisColorPatches::mouseReleaseEvent(QMouseEvent* event)
{
KisColorSelectorBase::mouseReleaseEvent(event);
event->setAccepted(false);
KisColorSelectorBase::mouseReleaseEvent(event);
if (event->isAccepted() || !rect().contains(event->pos()))
return;
if (!m_canvas) return;
KoColor color;
if(colorAt(event->pos(), &color)) {
if (event->button()==Qt::LeftButton)
m_canvas->resourceManager()->setForegroundColor(color);
else if (event->button()==Qt::RightButton)
m_canvas->resourceManager()->setBackgroundColor(color);
}
}
void KisColorPatches::mousePressEvent(QMouseEvent *event)
{
KoColor koColor;
if(!colorAt(event->pos(), &koColor))
return;
KisColorSelectorBase::mousePressEvent(event);
if(event->isAccepted())
return;
updateColorPreview(koColor);
if (event->button() == Qt::LeftButton)
m_dragStartPos = event->pos();
}
void KisColorPatches::mouseMoveEvent(QMouseEvent *event)
{
event->ignore();
KisColorSelectorBase::mouseMoveEvent(event);
if(event->isAccepted())
return;
if (!(event->buttons() & Qt::LeftButton))
return;
if ((event->pos() - m_dragStartPos).manhattanLength()
< QApplication::startDragDistance())
return;
KoColor koColor;
if(!colorAt(m_dragStartPos, &koColor))
return;
QDrag *drag = new QDrag(this);
QMimeData *mimeData = new QMimeData;
QColor color = converter()->toQColor(koColor);
mimeData->setColorData(color);
mimeData->setText(color.name());
drag->setMimeData(mimeData);
drag->exec(Qt::CopyAction);
event->accept();
}
int KisColorPatches::patchCount() const
{
return m_patchCount;
}
bool KisColorPatches::colorAt(const QPoint &pos, KoColor *result) const
{
if(!rect().contains(pos))
return false;
int scrollX = m_direction==Horizontal?m_scrollValue:0;
int scrollY = m_direction==Vertical?m_scrollValue:0;
int column = (pos.x()-scrollX)/m_patchWidth;
int row = (pos.y()-scrollY)/m_patchHeight;
int patchNr;
if(m_direction == Vertical) {
int patchesInARow = width()/m_patchWidth;
patchNr=row*patchesInARow+column;
}
else {
// Vertical
int patchesInAColumn = height()/m_patchHeight;
patchNr=column*patchesInAColumn+row;
}
patchNr-=m_buttonList.size();
if(patchNr>=0 && patchNr buttonList)
{
for(int i=0; isetParent(this);
}
m_buttonList = buttonList;
}
void KisColorPatches::updateSettings()
{
KisColorSelectorBase::updateSettings();
KConfigGroup cfg = KSharedConfig::openConfig()->group("advancedColorSelector");
if(cfg.readEntry(m_configPrefix+"Alignment", false))
m_direction=Vertical;
else
m_direction=Horizontal;
-
m_allowScrolling=cfg.readEntry(m_configPrefix+"Scrolling", true);
m_numCols=cfg.readEntry(m_configPrefix+"NumCols", 1);
m_numRows=cfg.readEntry(m_configPrefix+"NumRows", 1);
m_patchCount=cfg.readEntry(m_configPrefix+"Count", 15);
m_patchWidth=cfg.readEntry(m_configPrefix+"Width", 20);
m_patchHeight=cfg.readEntry(m_configPrefix+"Height", 20);
if(m_patchHeight == 0) {
m_patchHeight = 1;
}
if(parentWidget()==0) {
// this instance is a popup
m_allowScrolling = false;
m_direction = Horizontal;
m_patchWidth*=2;
m_patchHeight*=2;
}
for(int i=0; isetGeometry(0, i*m_patchHeight, m_patchWidth, m_patchHeight);
}
setMaximumWidth(QWIDGETSIZE_MAX);
setMinimumWidth(1);
setMaximumHeight(QWIDGETSIZE_MAX);
setMinimumHeight(1);
if(m_allowScrolling && m_direction == Horizontal) {
setMaximumHeight(m_numRows*m_patchHeight);
setMinimumHeight(m_numRows*m_patchHeight);
}
if(m_allowScrolling && m_direction == Vertical) {
setMaximumWidth(m_numCols*m_patchWidth);
setMinimumWidth(m_numCols*m_patchWidth);
}
if(m_allowScrolling == false) {
m_scrollValue = 0;
}
+
QResizeEvent dummy(size(), QSize(-1,-1));
resizeEvent(&dummy);
setPopupBehaviour(false, false);
update();
}
int KisColorPatches::widthOfAllPatches()
{
return (fieldCount()/m_numRows)*m_patchWidth;
}
int KisColorPatches::heightOfAllPatches()
{
return (fieldCount()/m_numCols)*m_patchHeight;
}
int KisColorPatches::heightForWidth(int width) const
{
int numPatchesInARow = width / m_patchWidth;
int numRows = qMax((fieldCount() - 1), 1) / qMax(numPatchesInARow + 1, 1);
- return numRows * m_patchHeight;
+ return qMax(numRows * m_patchHeight, m_patchHeight);
}
int KisColorPatches::widthForHeight(int height) const
{
if (height == 0) {
return 0;
}
if (m_patchHeight == 0) {
return 0;
}
int numPatchesInACol = height / m_patchHeight;
int numCols = (fieldCount() - 1) / (numPatchesInACol + 1);
- return numCols*m_patchWidth;
+ return qMax(numCols*m_patchWidth, m_patchWidth);
}
int KisColorPatches::fieldCount() const
{
return m_patchCount+m_buttonList.size();
}
diff --git a/plugins/dockers/advancedcolorselector/kis_color_selector_settings.cpp b/plugins/dockers/advancedcolorselector/kis_color_selector_settings.cpp
index 229e9f3a6e..c648ec5ed4 100644
--- a/plugins/dockers/advancedcolorselector/kis_color_selector_settings.cpp
+++ b/plugins/dockers/advancedcolorselector/kis_color_selector_settings.cpp
@@ -1,632 +1,632 @@
/*
* Copyright (C) 2010 Celarek Adam
*
* 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
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include "kis_color_selector_settings.h"
#include "ui_wdg_color_selector_settings.h"
#include
#include
#include
#include
#include
#include
#include "KoColorSpace.h"
#include "KoColorSpaceRegistry.h"
#include "KoColorProfile.h"
#include "kis_color_selector_combo_box.h"
#include "kis_color_selector.h"
#include "kis_config.h"
KisColorSelectorSettings::KisColorSelectorSettings(QWidget *parent) :
KisPreferenceSet(parent),
ui(new Ui::KisColorSelectorSettings)
{
ui->setupUi(this);
resize(minimumSize());
ui->colorSelectorConfiguration->setColorSpace(ui->colorSpace->currentColorSpace());
ui->useDifferentColorSpaceCheckbox->setChecked(false);
connect(ui->useDifferentColorSpaceCheckbox, SIGNAL(clicked(bool)), this, SLOT(useDifferentColorSpaceChecked(bool)));
/* color docker selector drop down */
ui->dockerColorSettingsComboBox->addItem(i18n("Advanced Color Selector"));
//ui->dockerColorSettingsComboBox->addItem(i18n("Color Sliders"));
ui->dockerColorSettingsComboBox->addItem(i18n("Color Hotkeys"));
ui->dockerColorSettingsComboBox->setCurrentIndex(0); // start off seeing advanced color selector properties
connect( ui->dockerColorSettingsComboBox, SIGNAL(currentIndexChanged(int)),this, SLOT(changedColorDocker(int)));
changedColorDocker(0);
/* advanced color docker options */
ui->dockerResizeOptionsComboBox->addItem(i18n("Change to a Horizontal Layout"));
ui->dockerResizeOptionsComboBox->addItem(i18n("Hide Shade Selector"));
ui->dockerResizeOptionsComboBox->addItem(i18n("Do Nothing"));
ui->dockerResizeOptionsComboBox->setCurrentIndex(0);
ui->zoomSelectorOptionComboBox->addItem(i18n("When Pressing Middle Mouse Button"));
ui->zoomSelectorOptionComboBox->addItem(i18n("On Mouse Over"));
ui->zoomSelectorOptionComboBox->addItem(i18n("Never"));
ui->zoomSelectorOptionComboBox->setCurrentIndex(0);
ui->colorSelectorTypeComboBox->addItem(i18n("HSV"));
ui->colorSelectorTypeComboBox->addItem(i18n("HSL"));
ui->colorSelectorTypeComboBox->addItem(i18n("HSI"));
ui->colorSelectorTypeComboBox->addItem(i18n("HSY'"));
ui->colorSelectorTypeComboBox->setCurrentIndex(0);
connect( ui->colorSelectorTypeComboBox, SIGNAL(currentIndexChanged(int)),this, SLOT(changedACSColorSelectorType(int)));
changedACSColorSelectorType(0); // initialize everything to HSV at the start
ui->ACSshadeSelectorMyPaintColorModelComboBox->addItem(i18n("HSV"));
ui->ACSshadeSelectorMyPaintColorModelComboBox->addItem(i18n("HSL"));
ui->ACSshadeSelectorMyPaintColorModelComboBox->addItem(i18n("HSI"));
ui->ACSshadeSelectorMyPaintColorModelComboBox->addItem(i18n("HSY'"));
ui->ACSshadeSelectorMyPaintColorModelComboBox->setCurrentIndex(0);
ui->ACSShadeSelectorTypeComboBox->addItem(i18n("MyPaint"));
ui->ACSShadeSelectorTypeComboBox->addItem(i18n("Minimal"));
ui->ACSShadeSelectorTypeComboBox->addItem(i18n("Do Not Show"));
ui->ACSShadeSelectorTypeComboBox->setCurrentIndex(0);
changedACSShadeSelectorType(0); // show/hide UI elements for MyPaint settings
connect( ui->ACSShadeSelectorTypeComboBox, SIGNAL(currentIndexChanged(int)),this, SLOT(changedACSShadeSelectorType(int)));
ui->commonColorsAlignVertical->setChecked(true);
ui->commonColorsAlignHorizontal->setChecked(true);
connect( ui->commonColorsAlignHorizontal, SIGNAL(toggled(bool)), this, SLOT(changedACSColorAlignment(bool)));
connect( ui->lastUsedColorsAlignHorizontal, SIGNAL(toggled(bool)), this, SLOT(changedACSLastUsedColorAlignment(bool)));
changedACSColorAlignment(ui->commonColorsAlignHorizontal->isChecked());
changedACSLastUsedColorAlignment(ui->lastUsedColorsAlignHorizontal->isChecked());
connect(ui->colorSpace, SIGNAL(colorSpaceChanged(const KoColorSpace*)),
ui->colorSelectorConfiguration, SLOT(setColorSpace(const KoColorSpace*)));
connect(this, SIGNAL(hsxchanged(int)),
ui->colorSelectorConfiguration, SLOT(setList(int)));
connect(ui->minimalShadeSelectorLineCount, SIGNAL(valueChanged(int)),
ui->minimalShadeSelectorLineSettings, SLOT(setLineCount(int)));
connect(ui->minimalShadeSelectorLineSettings, SIGNAL(lineCountChanged(int)),
ui->minimalShadeSelectorLineCount, SLOT(setValue(int)));
connect(ui->minimalShadeSelectorAsGradient, SIGNAL(toggled(bool)),
ui->minimalShadeSelectorLineSettings, SIGNAL(setGradient(bool)));
connect(ui->minimalShadeSelectorAsColorPatches, SIGNAL(toggled(bool)),
ui->minimalShadeSelectorLineSettings, SIGNAL(setPatches(bool)));
connect(ui->minimalShadeSelectorLineHeight, SIGNAL(valueChanged(int)),
ui->minimalShadeSelectorLineSettings, SIGNAL(setLineHeight(int)));
connect(ui->minimalShadeSelectorPatchesPerLine, SIGNAL(valueChanged(int)),
ui->minimalShadeSelectorLineSettings, SIGNAL(setPatchCount(int)));
}
KisColorSelectorSettings::~KisColorSelectorSettings()
{
delete ui;
}
QString KisColorSelectorSettings::id()
{
return QString("advancedColorSelector");
}
QString KisColorSelectorSettings::name()
{
return header();
}
QString KisColorSelectorSettings::header()
{
return QString(i18n("Color Selector Settings"));
}
QIcon KisColorSelectorSettings::icon()
{
return KisIconUtils::loadIcon("extended_color_selector");
}
void KisColorSelectorSettings::savePreferences() const
{
// write cfg
KConfigGroup cfg = KSharedConfig::openConfig()->group("advancedColorSelector");
KConfigGroup hsxcfg = KSharedConfig::openConfig()->group("hsxColorSlider");
KConfigGroup hotkeycfg = KSharedConfig::openConfig()->group("colorhotkeys");
// advanced color selector
cfg.writeEntry("onDockerResize", ui->dockerResizeOptionsComboBox->currentIndex());
cfg.writeEntry("zoomSelectorOptions", ui->zoomSelectorOptionComboBox->currentIndex() );
cfg.writeEntry("zoomSize", ui->popupSize->value());
bool useCustomColorSpace = ui->useDifferentColorSpaceCheckbox->isChecked();
const KoColorSpace* colorSpace = useCustomColorSpace ? ui->colorSpace->currentColorSpace() : 0;
KisConfig kisconfig(false);
kisconfig.setCustomColorSelectorColorSpace(colorSpace);
//color patches
cfg.writeEntry("lastUsedColorsShow", ui->lastUsedColorsShow->isChecked());
cfg.writeEntry("lastUsedColorsAlignment", ui->lastUsedColorsAlignVertical->isChecked());
cfg.writeEntry("lastUsedColorsScrolling", ui->lastUsedColorsAllowScrolling->isChecked());
cfg.writeEntry("lastUsedColorsNumCols", ui->lastUsedColorsNumCols->value());
cfg.writeEntry("lastUsedColorsNumRows", ui->lastUsedColorsNumRows->value());
cfg.writeEntry("lastUsedColorsCount", ui->lastUsedColorsPatchCount->value());
cfg.writeEntry("lastUsedColorsWidth", ui->lastUsedColorsWidth->value());
cfg.writeEntry("lastUsedColorsHeight", ui->lastUsedColorsHeight->value());
cfg.writeEntry("commonColorsShow", ui->commonColorsShow->isChecked());
cfg.writeEntry("commonColorsAlignment", ui->commonColorsAlignVertical->isChecked());
cfg.writeEntry("commonColorsScrolling", ui->commonColorsAllowScrolling->isChecked());
cfg.writeEntry("commonColorsNumCols", ui->commonColorsNumCols->value());
cfg.writeEntry("commonColorsNumRows", ui->commonColorsNumRows->value());
cfg.writeEntry("commonColorsCount", ui->commonColorsPatchCount->value());
cfg.writeEntry("commonColorsWidth", ui->commonColorsWidth->value());
cfg.writeEntry("commonColorsHeight", ui->commonColorsHeight->value());
cfg.writeEntry("commonColorsAutoUpdate", ui->commonColorsAutoUpdate->isChecked());
//shade selector
int shadeSelectorTypeIndex = ui->ACSShadeSelectorTypeComboBox->currentIndex();
if(shadeSelectorTypeIndex == 0) {
cfg.writeEntry("shadeSelectorType", "MyPaint");
} else if (shadeSelectorTypeIndex == 1) {
cfg.writeEntry("shadeSelectorType", "Minimal");
} else {
cfg.writeEntry("shadeSelectorType", "Hidden");
}
cfg.writeEntry("shadeSelectorUpdateOnRightClick", ui->shadeSelectorUpdateOnRightClick->isChecked());
cfg.writeEntry("shadeSelectorUpdateOnForeground", ui->shadeSelectorUpdateOnForeground->isChecked());
cfg.writeEntry("shadeSelectorUpdateOnLeftClick", ui->shadeSelectorUpdateOnLeftClick->isChecked());
cfg.writeEntry("shadeSelectorUpdateOnBackground", ui->shadeSelectorUpdateOnBackground->isChecked());
cfg.writeEntry("hidePopupOnClickCheck", ui->hidePopupOnClickCheck->isChecked());
//mypaint model
int shadeMyPaintComboBoxIndex = ui->ACSshadeSelectorMyPaintColorModelComboBox->currentIndex();
if (shadeMyPaintComboBoxIndex == 0 ) {
cfg.writeEntry("shadeMyPaintType", "HSV");
} else if (shadeMyPaintComboBoxIndex == 1 ) {
cfg.writeEntry("shadeMyPaintType", "HSL");
} else if (shadeMyPaintComboBoxIndex == 2 ) {
cfg.writeEntry("shadeMyPaintType", "HSI");
} else { // HSY
cfg.writeEntry("shadeMyPaintType", "HSY");
}
cfg.writeEntry("minimalShadeSelectorAsGradient", ui->minimalShadeSelectorAsGradient->isChecked());
cfg.writeEntry("minimalShadeSelectorPatchCount", ui->minimalShadeSelectorPatchesPerLine->value());
cfg.writeEntry("minimalShadeSelectorLineConfig", ui->minimalShadeSelectorLineSettings->toString());
cfg.writeEntry("minimalShadeSelectorLineHeight", ui->minimalShadeSelectorLineHeight->value());
//color selector
KisColorSelectorComboBox* cstw = dynamic_cast(ui->colorSelectorConfiguration);
cfg.writeEntry("colorSelectorConfiguration", cstw->configuration().toString());
cfg.writeEntry("hsxSettingType", ui->colorSelectorTypeComboBox->currentIndex());
//luma//
cfg.writeEntry("lumaR", ui->l_lumaR->value());
cfg.writeEntry("lumaG", ui->l_lumaG->value());
cfg.writeEntry("lumaB", ui->l_lumaB->value());
cfg.writeEntry("gamma", ui->SP_Gamma->value());
//slider//
hsxcfg.writeEntry("hsvH", ui->csl_hsvH->isChecked());
hsxcfg.writeEntry("hsvS", ui->csl_hsvS->isChecked());
hsxcfg.writeEntry("hsvV", ui->csl_hsvV->isChecked());
hsxcfg.writeEntry("hslH", ui->csl_hslH->isChecked());
hsxcfg.writeEntry("hslS", ui->csl_hslS->isChecked());
hsxcfg.writeEntry("hslL", ui->csl_hslL->isChecked());
hsxcfg.writeEntry("hsiH", ui->csl_hsiH->isChecked());
hsxcfg.writeEntry("hsiS", ui->csl_hsiS->isChecked());
hsxcfg.writeEntry("hsiI", ui->csl_hsiI->isChecked());
hsxcfg.writeEntry("hsyH", ui->csl_hsyH->isChecked());
hsxcfg.writeEntry("hsyS", ui->csl_hsyS->isChecked());
hsxcfg.writeEntry("hsyY", ui->csl_hsyY->isChecked());
//hotkeys//
hotkeycfg.writeEntry("steps_lightness", ui->sb_lightness->value());
hotkeycfg.writeEntry("steps_saturation", ui->sb_saturation->value());
hotkeycfg.writeEntry("steps_hue", ui->sb_hue->value());
hotkeycfg.writeEntry("steps_redgreen", ui->sb_rg->value());
hotkeycfg.writeEntry("steps_blueyellow", ui->sb_by->value());
emit settingsChanged();
}
//void KisColorSelectorSettings::changeEvent(QEvent *e)
//{
// QDialog::changeEvent(e);
// switch (e->type()) {
// case QEvent::LanguageChange:
// ui->retranslateUi(this);
// break;
// default:
// break;
// }
//}
void KisColorSelectorSettings::changedColorDocker(int index)
{
// having a situation where too many sections are visible makes the window too large. turn all off before turning more on
ui->colorSliderOptions->hide();
ui->advancedColorSelectorOptions->hide();
ui->hotKeyOptions->hide();
if (index == 0) { // advanced color selector options selected
ui->advancedColorSelectorOptions->show();
ui->colorSliderOptions->hide();
ui->hotKeyOptions->hide();
}
// else if (index == 1) { // color slider options selected
// ui->advancedColorSelectorOptions->hide();
// ui->hotKeyOptions->hide();
// ui->colorSliderOptions->show();
// }
else {
ui->colorSliderOptions->hide();
ui->advancedColorSelectorOptions->hide();
ui->hotKeyOptions->show();
}
}
void KisColorSelectorSettings::changedACSColorSelectorType(int index)
{
ui->lumaCoefficientGroupbox->setVisible(false);
if (index == 0) { // HSV
ui->ACSTypeDescriptionLabel->setText(i18n("Values goes from black to white, or black to the most saturated colour. Saturation, in turn, goes from the most saturated colour to white, grey or black."));
}
else if (index == 1) { // HSL
ui->ACSTypeDescriptionLabel->setText(i18n("Lightness goes from black to white, with middle grey being equal to the most saturated colour."));
}
else if (index == 2) { // HSI
ui->ACSTypeDescriptionLabel->setText(i18n("Intensity maps to the sum of rgb components"));
}
else { // HSY'
ui->ACSTypeDescriptionLabel->setText(i18n("Luma(Y') is weighted by its coefficients which are configurable. Default values are set to 'rec 709'."));
ui->lumaCoefficientGroupbox->setVisible(true);
}
ui->colorSelectorConfiguration->update();
emit hsxchanged(index);
}
void KisColorSelectorSettings::changedACSColorAlignment(bool toggled)
{
// this slot is tied to the horizontal radio button's state being changed
// you can infer the vertical state
ui->lbl_commonColorsNumCols->setDisabled(toggled);
ui->commonColorsNumCols->setDisabled(toggled);
ui->lbl_commonColorsNumRows->setEnabled(toggled);
ui->commonColorsNumRows->setEnabled(toggled);
}
void KisColorSelectorSettings::changedACSLastUsedColorAlignment(bool toggled)
{
// this slot is tied to the horizontal radio button's state being changed
// you can infer the vertical state
ui->lbl_lastUsedNumCols->setDisabled(toggled);
ui->lastUsedColorsNumCols->setDisabled(toggled);
ui->lbl_lastUsedNumRows->setEnabled(toggled);
ui->lastUsedColorsNumRows->setEnabled(toggled);
}
void KisColorSelectorSettings::changedACSShadeSelectorType(int index)
{
if (index == 0) { // MyPaint
ui->minimalShadeSelectorGroup->hide();
ui->myPaintColorModelLabel->show();
ui->ACSshadeSelectorMyPaintColorModelComboBox->show();
} else if (index == 1) { // Minimal
ui->minimalShadeSelectorGroup->show();
ui->myPaintColorModelLabel->hide();
ui->ACSshadeSelectorMyPaintColorModelComboBox->hide();
}else { // do not show
ui->minimalShadeSelectorGroup->hide();
ui->myPaintColorModelLabel->hide();
ui->ACSshadeSelectorMyPaintColorModelComboBox->hide();
}
}
void KisColorSelectorSettings::useDifferentColorSpaceChecked(bool enabled)
{
ui->colorSpace->setEnabled(enabled);
}
void KisColorSelectorSettings::loadPreferences()
{
//read cfg
//don't forget to also add a new entry to the default preferences
KConfigGroup cfg = KSharedConfig::openConfig()->group("advancedColorSelector");
KConfigGroup hsxcfg = KSharedConfig::openConfig()->group("hsxColorSlider");
KConfigGroup hotkeycfg = KSharedConfig::openConfig()->group("colorhotkeys");
// Advanced color selector
ui->dockerResizeOptionsComboBox->setCurrentIndex( (int)cfg.readEntry("onDockerResize", 0) );
ui->zoomSelectorOptionComboBox->setCurrentIndex( (int) cfg.readEntry("zoomSelectorOptions", 0) );
ui->popupSize->setValue(cfg.readEntry("zoomSize", 280));
{
KisConfig kisconfig(true);
const KoColorSpace *cs = kisconfig.customColorSelectorColorSpace();
if (cs) {
ui->useDifferentColorSpaceCheckbox->setChecked(true);
ui->colorSpace->setEnabled(true);
ui->colorSpace->setCurrentColorSpace(cs);
} else {
ui->useDifferentColorSpaceCheckbox->setChecked(false);
ui->colorSpace->setEnabled(false);
}
}
//color patches
ui->lastUsedColorsShow->setChecked(cfg.readEntry("lastUsedColorsShow", true));
bool a = cfg.readEntry("lastUsedColorsAlignment", true);
ui->lastUsedColorsAlignVertical->setChecked(a);
ui->lastUsedColorsAlignHorizontal->setChecked(!a);
ui->lastUsedColorsAllowScrolling->setChecked(cfg.readEntry("lastUsedColorsScrolling", true));
ui->lastUsedColorsNumCols->setValue(cfg.readEntry("lastUsedColorsNumCols", 1));
ui->lastUsedColorsNumRows->setValue(cfg.readEntry("lastUsedColorsNumRows", 1));
ui->lastUsedColorsPatchCount->setValue(cfg.readEntry("lastUsedColorsCount", 20));
ui->lastUsedColorsWidth->setValue(cfg.readEntry("lastUsedColorsWidth", 16));
ui->lastUsedColorsHeight->setValue(cfg.readEntry("lastUsedColorsHeight", 16));
ui->commonColorsShow->setChecked(cfg.readEntry("commonColorsShow", true));
a = cfg.readEntry("commonColorsAlignment", false);
ui->commonColorsAlignVertical->setChecked(a);
ui->commonColorsAlignHorizontal->setChecked(!a);
- ui->commonColorsAllowScrolling->setChecked(cfg.readEntry("commonColorsScrolling", false));
+ ui->commonColorsAllowScrolling->setChecked(cfg.readEntry("commonColorsScrolling", true));
ui->commonColorsNumCols->setValue(cfg.readEntry("commonColorsNumCols", 1));
ui->commonColorsNumRows->setValue(cfg.readEntry("commonColorsNumRows", 1));
ui->commonColorsPatchCount->setValue(cfg.readEntry("commonColorsCount", 12));
ui->commonColorsWidth->setValue(cfg.readEntry("commonColorsWidth", 16));
ui->commonColorsHeight->setValue(cfg.readEntry("commonColorsHeight", 16));
ui->commonColorsAutoUpdate->setChecked(cfg.readEntry("commonColorsAutoUpdate", false));
//shade selector
QString shadeSelectorType=cfg.readEntry("shadeSelectorType", "Minimal");
if ( shadeSelectorType == "MyPaint") {
ui->ACSShadeSelectorTypeComboBox->setCurrentIndex(0);
} else if (shadeSelectorType == "Minimal") {
ui->ACSShadeSelectorTypeComboBox->setCurrentIndex(1);
} else { // Hidden
ui->ACSShadeSelectorTypeComboBox->setCurrentIndex(2);
}
ui->shadeSelectorUpdateOnRightClick->setChecked(cfg.readEntry("shadeSelectorUpdateOnRightClick", false));
ui->shadeSelectorUpdateOnLeftClick->setChecked(cfg.readEntry("shadeSelectorUpdateOnLeftClick", false));
ui->shadeSelectorUpdateOnForeground->setChecked(cfg.readEntry("shadeSelectorUpdateOnForeground", true));
ui->shadeSelectorUpdateOnBackground->setChecked(cfg.readEntry("shadeSelectorUpdateOnBackground", true));
ui->hidePopupOnClickCheck->setChecked(cfg.readEntry("hidePopupOnClickCheck", false));
QString shadeMyPaintType = cfg.readEntry("shadeMyPaintType", "HSV");
if (shadeMyPaintType == "HSV" ) {
ui->ACSshadeSelectorMyPaintColorModelComboBox->setCurrentIndex(0);
} else if (shadeMyPaintType == "HSL" ) {
ui->ACSshadeSelectorMyPaintColorModelComboBox->setCurrentIndex(1);
} else if (shadeMyPaintType == "HSI" ) {
ui->ACSshadeSelectorMyPaintColorModelComboBox->setCurrentIndex(2);
} else { // HSY
ui->ACSshadeSelectorMyPaintColorModelComboBox->setCurrentIndex(3);
}
bool asGradient = cfg.readEntry("minimalShadeSelectorAsGradient", true);
if(asGradient) ui->minimalShadeSelectorAsGradient->setChecked(true);
else ui->minimalShadeSelectorAsColorPatches->setChecked(true);
ui->minimalShadeSelectorPatchesPerLine->setValue(cfg.readEntry("minimalShadeSelectorPatchCount", 10));
ui->minimalShadeSelectorLineSettings->fromString(cfg.readEntry("minimalShadeSelectorLineConfig", "0|0.2|0|0|0|0|0;1|0|1|1|0|0|0;2|0|-1|1|0|0|0;"));
ui->minimalShadeSelectorLineHeight->setValue(cfg.readEntry("minimalShadeSelectorLineHeight", 10));
int hsxSettingType= (int)cfg.readEntry("hsxSettingType", 0);
ui->colorSelectorTypeComboBox->setCurrentIndex(hsxSettingType);
//color selector
KisColorSelectorComboBox* cstw = dynamic_cast(ui->colorSelectorConfiguration);
cstw->setConfiguration(KisColorSelectorConfiguration::fromString(cfg.readEntry("colorSelectorConfiguration", "3|0|5|0"))); // triangle selector
//luma values//
ui->l_lumaR->setValue(cfg.readEntry("lumaR", 0.2126));
ui->l_lumaG->setValue(cfg.readEntry("lumaG", 0.7152));
ui->l_lumaB->setValue(cfg.readEntry("lumaB", 0.0722));
ui->SP_Gamma->setValue(cfg.readEntry("gamma", 2.2));
//color sliders//
ui->csl_hsvH->setChecked(hsxcfg.readEntry("hsvH", false));
ui->csl_hsvS->setChecked(hsxcfg.readEntry("hsvS", false));
ui->csl_hsvV->setChecked(hsxcfg.readEntry("hsvV", false));
ui->csl_hslH->setChecked(hsxcfg.readEntry("hslH", true));
ui->csl_hslS->setChecked(hsxcfg.readEntry("hslS", true));
ui->csl_hslL->setChecked(hsxcfg.readEntry("hslL", true));
ui->csl_hsiH->setChecked(hsxcfg.readEntry("hsiH", false));
ui->csl_hsiS->setChecked(hsxcfg.readEntry("hsiS", false));
ui->csl_hsiI->setChecked(hsxcfg.readEntry("hsiI", false));
ui->csl_hsyH->setChecked(hsxcfg.readEntry("hsyH", false));
ui->csl_hsyS->setChecked(hsxcfg.readEntry("hsyS", false));
ui->csl_hsyY->setChecked(hsxcfg.readEntry("hsyY", false));
//hotkeys//
ui->sb_lightness->setValue(hotkeycfg.readEntry("steps_lightness", 10));
ui->sb_saturation->setValue(hotkeycfg.readEntry("steps_saturation", 10));
ui->sb_hue->setValue(hotkeycfg.readEntry("steps_hue", 36));
ui->sb_rg->setValue(hotkeycfg.readEntry("steps_redgreen", 10));
ui->sb_by->setValue(hotkeycfg.readEntry("steps_blueyellow", 10));
}
void KisColorSelectorSettings::loadDefaultPreferences()
{
//set defaults
//if you change something, don't forget that loadPreferences should be kept in sync
// advanced color selector docker
ui->dockerResizeOptionsComboBox->setCurrentIndex(0);
ui->zoomSelectorOptionComboBox->setCurrentIndex(0);
ui->popupSize->setValue(280);
ui->useDifferentColorSpaceCheckbox->setChecked(false);
ui->colorSpace->setCurrentColorModel(KoID("RGBA"));
ui->colorSpace->setCurrentColorDepth(KoID("U8"));
ui->colorSpace->setCurrentProfile(KoColorSpaceRegistry::instance()->rgb8()->profile()->name());
//color patches
ui->lastUsedColorsShow->setChecked(true);
ui->lastUsedColorsAlignVertical->setChecked(true);
ui->lastUsedColorsAlignHorizontal->setChecked(false);
ui->lastUsedColorsAllowScrolling->setChecked(true);
ui->lastUsedColorsNumCols->setValue(1);
ui->lastUsedColorsNumRows->setValue(1);
ui->lastUsedColorsPatchCount->setValue(20);
ui->lastUsedColorsWidth->setValue(16);
ui->lastUsedColorsHeight->setValue(16);
ui->commonColorsShow->setChecked(true);
ui->commonColorsAlignVertical->setChecked(false);
ui->commonColorsAlignHorizontal->setChecked(true);
- ui->commonColorsAllowScrolling->setChecked(false);
+ ui->commonColorsAllowScrolling->setChecked(true);
ui->commonColorsNumCols->setValue(1);
ui->commonColorsNumRows->setValue(1);
ui->commonColorsPatchCount->setValue(12);
ui->commonColorsWidth->setValue(16);
ui->commonColorsHeight->setValue(16);
ui->commonColorsAutoUpdate->setChecked(false);
//shade selector
ui->ACSShadeSelectorTypeComboBox->setCurrentIndex(1); // Minimal
ui->ACSshadeSelectorMyPaintColorModelComboBox->setCurrentIndex(0);
ui->shadeSelectorUpdateOnRightClick->setChecked(false);
ui->shadeSelectorUpdateOnLeftClick->setChecked(false);
ui->shadeSelectorUpdateOnForeground->setChecked(true);
ui->shadeSelectorUpdateOnBackground->setChecked(true);
bool asGradient = true;
if(asGradient) ui->minimalShadeSelectorAsGradient->setChecked(true);
else ui->minimalShadeSelectorAsColorPatches->setChecked(true);
ui->minimalShadeSelectorPatchesPerLine->setValue(10);
ui->minimalShadeSelectorLineSettings->fromString("0|0.2|0|0|0|0|0;1|0|1|1|0|0|0;2|0|-1|1|0|0|0;");
ui->minimalShadeSelectorLineHeight->setValue(10);
// set advanced color selector to use HSV
ui->colorSelectorTypeComboBox->setCurrentIndex(0);
KisColorSelectorComboBox* cstw = dynamic_cast(ui->colorSelectorConfiguration);
cstw->setConfiguration(KisColorSelectorConfiguration("3|0|5|0")); // triangle selector
//luma//
ui->l_lumaR->setValue(0.2126);
ui->l_lumaG->setValue(0.7152);
ui->l_lumaB->setValue(0.0722);
ui->SP_Gamma->setValue(2.2);
//color sliders//
ui->csl_hsvH->setChecked(false);
ui->csl_hsvS->setChecked(false);
ui->csl_hsvV->setChecked(false);
ui->csl_hslH->setChecked(true);
ui->csl_hslS->setChecked(true);
ui->csl_hslL->setChecked(true);
ui->csl_hsiH->setChecked(false);
ui->csl_hsiS->setChecked(false);
ui->csl_hsiI->setChecked(false);
ui->csl_hsyH->setChecked(false);
ui->csl_hsyS->setChecked(false);
ui->csl_hsyY->setChecked(false);
//hotkeys//
ui->sb_lightness->setValue(10);
ui->sb_saturation->setValue(10);
ui->sb_hue->setValue(36);
ui->sb_rg->setValue(10);
ui->sb_by->setValue(10);
}
KisColorSelectorSettingsDialog::KisColorSelectorSettingsDialog(QWidget *parent) :
QDialog(parent),
m_widget(new KisColorSelectorSettings(this))
{
QLayout* l = new QVBoxLayout(this);
l->addWidget(m_widget);
m_widget->loadPreferences();
QDialogButtonBox* buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok|QDialogButtonBox::Cancel|QDialogButtonBox::RestoreDefaults,
Qt::Horizontal,
this);
l->addWidget(buttonBox);
connect(buttonBox, SIGNAL(accepted()), m_widget, SLOT(savePreferences()));
connect(buttonBox, SIGNAL(accepted()), this, SLOT(accept()));
connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
connect(buttonBox->button(QDialogButtonBox::RestoreDefaults),
SIGNAL(clicked()), m_widget, SLOT(loadDefaultPreferences()));
}
diff --git a/plugins/dockers/advancedcolorselector/wdg_color_selector_settings.ui b/plugins/dockers/advancedcolorselector/wdg_color_selector_settings.ui
index 2397ed6b47..1228962083 100644
--- a/plugins/dockers/advancedcolorselector/wdg_color_selector_settings.ui
+++ b/plugins/dockers/advancedcolorselector/wdg_color_selector_settings.ui
@@ -1,1557 +1,1560 @@
KisColorSelectorSettings
0
0
721
1108
0
0
Color Selector Settings
-
Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop
6
20
-
Docker:
-
0
0
0
30
-
0
0
0
280
0
Color Selector
-
-
-
0
0
-
Qt::Vertical
QSizePolicy::MinimumExpanding
20
5
-
6
-
12
6
6
-
-
0
0
Qt::LeftToRight
Color &Model Type:
Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter
colorSelectorConfiguration
-
0
0
-
0
0
Type Description goes here
Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop
true
-
0
0
Luma Coefficients
-
0
0
6
-
0
0
Red':
Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
-
0
0
50
0
4
-
0
0
Green':
-
0
0
Blue':
-
0
0
50
0
4
-
0
0
50
0
4
-
<html><head/><body><p>This sets the gamma value that the linearised HSY Luminosity is crunched with. 1 makes the selector fully linear, 2.2 is a practical default value.</p></body></html>
1
-3.000000000000000
3.000000000000000
0.100000000000000
2.200000000000000
-
Gamma:
-
0
0
Color Selector Uses Different Color Space than Ima&ge
true
-
false
0
0
-
Qt::Vertical
QSizePolicy::MinimumExpanding
20
5
Behavior
-
-
0
0
Qt::LeftToRight
When Docker Resizes:
Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
-
-
Show Zoom Selector UI:
Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
-
Zoom Selector Size:
Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
-
0
0
px
100
1000
10
260
-
true
0
0
-
Hide Popup on click.
-
Qt::Vertical
QSizePolicy::MinimumExpanding
20
40
Shade Selector
-
-
-
-
Type:
-
Color model:
-
-
-
Qt::Horizontal
20
20
-
0
-
0
0
Update Selector When:
-
Right clicking on shade selector
-
Left clicking on shade selector
-
this doesn't include a color change by the shade selector
Foreground color changes
false
-
this doesn't include a color change by the shade selector
Background color change
true
-
0
0
Minimal Shade Selector
-
-
-
0
0
Display:
-
&Gradient
-
Colo&r Patches
-
0
0
-
Qt::Horizontal
59
20
-
-
Line Count:
Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
-
1
10
3
-
Line Height:
Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
-
px
8
99
16
-
Patches Per Line:
Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
-
-
Qt::Vertical
QSizePolicy::MinimumExpanding
20
10
true
0
0
Color History
-
0
0
Show Color Histor&y
true
-
-
Patch Options
-
Height:
Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
-
px
16
-
Width:
Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
-
px
16
-
Max Patches:
Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
-
1
30
-
Qt::Horizontal
40
20
-
Layout
0
-
&Vertical
true
-
Colu&mns:
Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
lastUsedColorsNumCols
-
1
20
2
-
Hori&zontal
-
&Rows:
Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
lastUsedColorsNumRows
-
1
20
3
-
Allow scrolling
true
-
Qt::Vertical
QSizePolicy::MinimumExpanding
20
5
Colors from Image
-
true
Show Colors from the ima&ge
true
-
-
Patch Options
-
Height:
Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
-
px
16
-
Width:
Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
-
px
16
-
Max Patches:
Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
-
1
30
-
Qt::Horizontal
40
20
-
Layout
6
0
-
&Vertical
-
Colu&mns:
Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
commonColorsNumCols
-
1
20
2
-
Hori&zontal
true
-
&Rows:
Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
commonColorsNumRows
-
1
20
3
-
this can be slow on big images
Update after every stroke
-
Allow scrolling
+
+ true
+
-
Qt::Vertical
QSizePolicy::MinimumExpanding
20
10
-
-
HSV Sliders to Show
-
Hue
-
Saturation
-
Value
-
HSL Sliders to Show
-
Hue
-
Saturation
-
Lightness
-
HSI Sliders to Show
-
Hue
-
Saturation
-
Intensity
-
HSY' Sliders to Show
-
Hue
-
Saturation
-
Luma
-
-
Lightness, Saturation and Hue hotkey steps
-
Lightness:
-
steps
-
Qt::Horizontal
40
20
-
Saturation:
-
steps
-
Qt::Horizontal
40
20
-
Hue:
-
steps
-
YUV Redder/Greener/Bluer/Yellower hotkey steps
-
Redder/Greener:
-
steps
-
Qt::Horizontal
40
20
-
Bluer/Yellower:
-
steps
-
Qt::Vertical
20
10
KisDoubleParseSpinBox
QDoubleSpinBox
kis_double_parse_spin_box.h
KisColorSpaceSelector
QWidget
widgets/kis_color_space_selector.h
1
KisIntParseSpinBox
QSpinBox
KisColorSelectorComboBox
QComboBox
kis_color_selector_combo_box.h
KisShadeSelectorLinesSettings
QComboBox
kis_shade_selector_lines_settings.h
minimalShadeSelectorAsColorPatches
toggled(bool)
minimalShadeSelectorPatchesPerLine
setEnabled(bool)
194
393
520
463