| 27 | ColorPickerWidget::~ColorPickerWidget() = default; |
| 28 | |
| 29 | void ColorPickerWidget::setColor(const QColor& color) { |
| 30 | if (color_ == color) { |
| 31 | return; |
| 32 | } |
| 33 | color_ = color; |
| 34 | update(); |
| 35 | } |
| 36 | |
| 37 | QSize ColorPickerWidget::sizeHint() const { |
| 38 | return {kSwatchWidth, kSwatchHeight}; |