Skip to content

armgit / krita

Public Imported from GitHub
0

Krita is a free and open source cross-platform application that offers an end-to-end solution for creating digital art files from scratch built on the KDE and Qt frameworks.

C++

Make the all-colors channel in the adjustment filter not contain "A".

Wolthera van Hövell tot Westerflier231d117c5a2f
diff --git a/plugins/filters/colorsfilters/virtual_channel_info.cpp b/plugins/filters/colorsfilters/virtual_channel_info.cpp
index dab74e86c8..7154c272f0 100644
--- a/plugins/filters/colorsfilters/virtual_channel_info.cpp
+++ b/plugins/filters/colorsfilters/virtual_channel_info.cpp
@@ -8,6 +8,7 @@
#include <klocalizedstring.h>
#include <KoColorSpace.h>
+#include <KoColorModelStandardIds.h>
VirtualChannelInfo::VirtualChannelInfo()
@@ -34,13 +35,25 @@ VirtualChannelInfo::VirtualChannelInfo(Type type,
m_valueTypeOverride = KoChannelInfo::FLOAT32;
m_channelSizeOverride = 4;
} else if (m_type == LIGHTNESS) {
- m_nameOverride = i18nc("Lightness HSI", "Lightness");
+ m_nameOverride = i18nc("Lightness L*a*b*", "Lightness");
m_valueTypeOverride = KoChannelInfo::FLOAT32;
m_channelSizeOverride = 4;
} else if (m_type == ALL_COLORS) {
const QList<KoChannelInfo*> channels = cs->channels();
- m_nameOverride = cs->colorModelId().id();
+ if (cs->colorModelId() == RGBAColorModelID) {
+ m_nameOverride = "RGB";
+ } else if (cs->colorModelId() == CMYKAColorModelID) {
+ m_nameOverride = "CMYK";
+ } else if (cs->colorModelId() == XYZAColorModelID) {
+ m_nameOverride = "XYZ";
+ } else if (cs->colorModelId() == LABAColorModelID) {
+ m_nameOverride = "L*a*b*";
+ } else if (cs->colorModelId() == YCbCrAColorModelID) {
+ m_nameOverride = "YCbCr";
+ } else {
+ m_nameOverride = cs->colorModelId().id();
+ }
m_valueTypeOverride = channels.first()->channelValueType();
m_channelSizeOverride = channels.first()->size();
}