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++

Remove canvas space, it is not available in the preferences.

Wolthera van Hövell tot Westerflier4f682b96939e
diff --git a/libs/ui/dialogs/kis_dlg_preferences.cc b/libs/ui/dialogs/kis_dlg_preferences.cc
index 5ff7945cc2..986c674a94 100644
--- a/libs/ui/dialogs/kis_dlg_preferences.cc
+++ b/libs/ui/dialogs/kis_dlg_preferences.cc
@@ -1392,19 +1392,15 @@ ColorSettingsTab::ColorSettingsTab(QWidget *parent, const char *name)
m_preferredSpaceGraphicMode.addButton(masteringSpace, MasteringSpace);
masteringSpace->setToolTip(i18nc("@info:tooltip", "This is the space representing the currently active display."));
- QRadioButton *canvasSpace = new QRadioButton(i18nc("@info:radiobutton", "Canvas Space"), this);
- colorDescriptionChoice->addWidget(canvasSpace);
- canvasSpace->setToolTip(i18nc("@info:tooltip", "This is the space chosen for the canvas surface."));
- m_preferredSpaceGraphicMode.addButton(canvasSpace, CanvasSpace);
- containerSpace->setChecked(true);
- colorDescriptionChoice->addItem(new QSpacerItem(0, 0, QSizePolicy::Expanding));
-
QHBoxLayout *colorDescriptionLayout = new QHBoxLayout();
vboxLayout->addLayout(colorDescriptionLayout);
m_preferredSpaceGraphic = new KisCIETongueWidget(this);
colorDescriptionLayout->addWidget(m_preferredSpaceGraphic);
colorDescriptionLayout->addWidget(preferredLbl);
+ containerSpace->setChecked(true);
+ colorDescriptionChoice->addItem(new QSpacerItem(0, 0, QSizePolicy::Expanding));
+
m_preferredSpaceGraphic->setFixedSize(QSize(200, 200));
updatePreferredSpaceGraphic();
connect(&m_preferredSpaceGraphicMode, SIGNAL(buttonClicked(QAbstractButton*)), this, SLOT(updatePreferredSpaceGraphic()));
@@ -1700,15 +1696,6 @@ void ColorSettingsTab::updatePreferredSpaceGraphic()
} else {
m_preferredSpaceGraphic->setProfileDataAvailable(false);
}
- } else { /// canvas space.
- if (proxy.rootSurfaceProfile()) {
- // TODO: replace wth display config for canvas...
- colorants = proxy.rootSurfaceProfile()->getColorantsxyY();
- whitePoint = proxy.rootSurfaceProfile()->getWhitePointxyY();
- m_preferredSpaceGraphic->setProfileData(colorants, whitePoint, true);
- } else {
- m_preferredSpaceGraphic->setProfileDataAvailable(false);
- }
}
m_preferredSpaceGraphic->update();
}