Select › Color Range: sampled colours, Fuzziness, Invert, a live preview and the panel (13.3b)

This commit is contained in:
ZacharyZhang-NY committed 2026-10-01 06:30:26 -04:00
1 parent 462fe805b1
commit 0b7eb6cb6f
29 files changed
+1535 -71

No files matched your search

+20
View File
@@ -0,0 +1,20 @@
#pragma once
#include "Document/HueSaturation.h"
#include <QToolButton>
#include <functional>
// Swift's plain sampling buttons: a glyph, tinted when chosen.
class SampleButton : public QToolButton {
Q_OBJECT
public:
SampleButton(std::function<void(QPainter &, const QColor &)> glyph, QWidget *parent);
protected:
void paintEvent(QPaintEvent *event) override;
private:
const std::function<void(QPainter &, const QColor &)> m_glyph;
};
// Swift's eyedropper, badged plus or minus for Add and Remove.
void sampleEyedropper(QPainter &painter, HueSampleMode mode, const QColor &ink);