[graphics/krita] libs/ui/dialogs: Disable HDR tab when the document is not HDR capable.

Wolthera van Hövell <[email protected]>
Newsgroups gmane.comp.kde.cvs
Message-ID <[email protected]>
Git commit a270fb1b78f68e6f83c7c0502bcb581387390ba9 by Wolthera van Hövell, on behalf of Wolthera van Hövell tot Westerflier.
Committed on 07/08/2026 at 09:24.
Pushed by woltherav into branch 'master'.

Disable HDR tab when the document is not HDR capable.

M  +4    -0    libs/ui/dialogs/kis_dlg_image_properties.cc

https://invent.kde.org/graphics/krita/-/commit/a270fb1b78f68e6f83c7c0502bcb581387390ba9

diff --git a/libs/ui/dialogs/kis_dlg_image_properties.cc b/libs/ui/dialogs/kis_dlg_image_properties.cc
index 9c4ca8380dc..f6567c7ddf6 100644
--- a/libs/ui/dialogs/kis_dlg_image_properties.cc
+++ b/libs/ui/dialogs/kis_dlg_image_properties.cc
@@ -165,6 +165,10 @@ KisDlgImageProperties::KisDlgImageProperties(KisImageWSP image, KisDisplayColorC
     connect(m_page->spnMaxLuminance, &QDoubleSpinBox::valueChanged, &d->colorVolumeCompressor, &KisSignalCompressor::start);
     connect(&d->colorVolumeCompressor, &KisSignalCompressor::timeout, this, &KisDlgImageProperties::setHDRColorVolumeOnImage);
 
+    const bool hdr = (d->image->colorSpace()->hasHighDynamicRange()
+                      || d->image->colorSpace()->profile()->getTransferCharacteristics() == TRC_ITU_R_BT_2100_0_PQ);
+    m_page->grpHdrMeta->setEnabled(hdr);
+
     //annotations
     vKisAnnotationSP_it beginIt = image->beginAnnotations();
     vKisAnnotationSP_it endIt = image->endAnnotations();
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.