summaryrefslogtreecommitdiff
path: root/Userland/Applications/PixelPaint/PaletteWidget.h
diff options
context:
space:
mode:
authorMustafa Quraish <mustafaq9@gmail.com>2021-09-01 23:57:30 -0400
committerAndreas Kling <kling@serenityos.org>2021-09-02 09:09:12 +0200
commit8d8ec6365b37f3c3347874f887ce0ca8bc034ca8 (patch)
treeb4ad751dd32fd5c96172b1ef422023ecc2e90655 /Userland/Applications/PixelPaint/PaletteWidget.h
parent58797a1289b2719b731dbb6a81e064fd4786db03 (diff)
downloadserenity-8d8ec6365b37f3c3347874f887ce0ca8bc034ca8.zip
PixelPaint: Allow changing colors temporarily without palette
Previously, if you wanted to use a custom color, the only way to do so was to first Ctrl+click on one of the pallette colors, which would just change that palette item. Then, you would need to manually click on that color. Now, you can just click on the preview of the primary/secondary color to open up the picker and only temporarily use the new color without affecting the palette at all.
Diffstat (limited to 'Userland/Applications/PixelPaint/PaletteWidget.h')
-rw-r--r--Userland/Applications/PixelPaint/PaletteWidget.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/Userland/Applications/PixelPaint/PaletteWidget.h b/Userland/Applications/PixelPaint/PaletteWidget.h
index b90e5d8b42..4e8a48a9b0 100644
--- a/Userland/Applications/PixelPaint/PaletteWidget.h
+++ b/Userland/Applications/PixelPaint/PaletteWidget.h
@@ -1,6 +1,7 @@
/*
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2021, Felix Rauch <noreply@felixrau.ch>
+ * Copyright (c) 2021, Mustafa Quraish <mustafa@cs.toronto.edu>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@@ -14,6 +15,7 @@
namespace PixelPaint {
class ImageEditor;
+class SelectedColorWidget;
class PaletteWidget final : public GUI::Frame {
C_OBJECT(PaletteWidget);
@@ -41,8 +43,8 @@ private:
explicit PaletteWidget();
ImageEditor* m_editor { nullptr };
- RefPtr<GUI::Frame> m_primary_color_widget;
- RefPtr<GUI::Frame> m_secondary_color_widget;
+ RefPtr<SelectedColorWidget> m_primary_color_widget;
+ RefPtr<SelectedColorWidget> m_secondary_color_widget;
RefPtr<GUI::Widget> m_color_container;
};