Export JPEG and Canvas Size take the app's colour picker; a panel opens over a modal sheet (13.4a)
This commit is contained in:
1 parent
0b7eb6cb6f
commit
bc49b722eb
23 files changed
+470
-134
No files matched your search
@@ -0,0 +1,22 @@
|
||||
#pragma once
|
||||
#include "Document/EditorSession.h"
|
||||
#include "UI/ColorPaletteControls.h"
|
||||
|
||||
// Swift's DialogColorSwatch: a dialog's colour in the app's picker.
|
||||
class DialogColorSwatch : public SwatchButton {
|
||||
Q_OBJECT
|
||||
public:
|
||||
DialogColorSwatch(const QString &title, std::function<PaletteColor()> colour, std::function<void(const PaletteColor &)> change, EditorSession &session,
|
||||
QWidget *parent);
|
||||
// Puts the picker away with the dialog, keeping its colour.
|
||||
static void closePicker(EditorSession &session);
|
||||
|
||||
protected:
|
||||
// Swift's onDisappear: the picker goes with the swatch.
|
||||
void hideEvent(QHideEvent *event) override;
|
||||
|
||||
private:
|
||||
EditorSession &m_session;
|
||||
// Swift's onChange: the picker's colour as last seen.
|
||||
std::optional<PaletteColor> m_seen;
|
||||
};
|
||||
Reference in new issue
Block a user