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

Revert "Fix Visual Color Selector to behave correctly with display scaling on"

Halla Rempt1321e795ba29
diff --git a/libs/widgets/KisVisualColorSelector.cpp b/libs/widgets/KisVisualColorSelector.cpp
index 71231ae6cc..cdbe5f07e1 100644
--- a/libs/widgets/KisVisualColorSelector.cpp
+++ b/libs/widgets/KisVisualColorSelector.cpp
@@ -19,8 +19,6 @@
#include "kis_signal_compressor.h"
#include "kis_debug.h"
-#include <KisScreenMigrationTracker.h>
-
#include "KisVisualColorSelectorShape.h"
#include "KisVisualDiamondSelectorShape.h"
#include "KisVisualRectangleSelectorShape.h"
@@ -47,7 +45,6 @@ struct KisVisualColorSelector::Private
KisVisualColorModelSP selectorModel;
QPointer<const KoColorDisplayRendererInterface> displayRenderer;
KoGamutMaskSP gamutMask;
- QPointer<KisScreenMigrationTracker> screenMigrationTracker;
};
KisVisualColorSelector::KisVisualColorSelector(QWidget *parent, KisVisualColorModelSP model)
@@ -67,15 +64,6 @@ KisVisualColorSelector::KisVisualColorSelector(QWidget *parent, KisVisualColorMo
m_d->updateTimer = new KisSignalCompressor(100 /* ms */, KisSignalCompressor::POSTPONE);
connect(m_d->updateTimer, SIGNAL(timeout()), SLOT(slotReloadConfiguration()), Qt::UniqueConnection);
-
- m_d->screenMigrationTracker = new KisScreenMigrationTracker(this, this);
- connect(m_d->screenMigrationTracker, &KisScreenMigrationTracker::sigScreenOrResolutionChanged,
- this, [this] (QScreen *screen) {
- Q_UNUSED(screen);
- Q_FOREACH(KisVisualColorSelectorShape *shape, m_d->widgetlist) {
- shape->notifyDevicePixelRationChanged();
- }
- });
}
KisVisualColorSelector::~KisVisualColorSelector()
diff --git a/libs/widgets/KisVisualColorSelectorShape.cpp b/libs/widgets/KisVisualColorSelectorShape.cpp
index 733b388556..899b04df48 100644
--- a/libs/widgets/KisVisualColorSelectorShape.cpp
+++ b/libs/widgets/KisVisualColorSelectorShape.cpp
@@ -375,12 +375,6 @@ void KisVisualColorSelectorShape::paintEvent(QPaintEvent*)
}
void KisVisualColorSelectorShape::resizeEvent(QResizeEvent *)
-{
- // just reuse the content of notifyDevicePixelRationChanged()
- notifyDevicePixelRationChanged();
-}
-
-void KisVisualColorSelectorShape::notifyDevicePixelRationChanged()
{
forceImageUpdate();
updateGamutMask();
diff --git a/libs/widgets/KisVisualColorSelectorShape.h b/libs/widgets/KisVisualColorSelectorShape.h
index a45b8b39a6..f32f87d3d6 100644
--- a/libs/widgets/KisVisualColorSelectorShape.h
+++ b/libs/widgets/KisVisualColorSelectorShape.h
@@ -137,12 +137,6 @@ public:
void setAcceptTabletEvents(bool on);
- /**
- * This signal is delivered in a centralized way by
- * KisVisualColorSelector
- */
- void notifyDevicePixelRationChanged();
-
Q_SIGNALS:
void sigCursorMoved(QPointF pos);