mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 14:47:44 +00:00
PixelPaint: Ctrl+click on palette colors now sets primary/secondary
Previously it would only change the color of the ColorWidget itself, but not make it the primary/secondary color. I think it feels nicer this way, if I'm adding a color to the palette I likely want to use it. If you *really* need to only change the color of the palette, you can just Ctrl+Middle click.
This commit is contained in:
parent
8d8ec6365b
commit
dd5ceb74e9
1 changed files with 1 additions and 2 deletions
|
@ -39,7 +39,7 @@ public:
|
|||
|
||||
virtual void mousedown_event(GUI::MouseEvent& event) override
|
||||
{
|
||||
if (event.modifiers() & KeyModifier::Mod_Ctrl && event.button() == GUI::MouseButton::Left) {
|
||||
if (event.modifiers() & KeyModifier::Mod_Ctrl) {
|
||||
auto dialog = GUI::ColorPicker::construct(m_color, window());
|
||||
if (dialog->exec() == GUI::Dialog::ExecOK) {
|
||||
m_color = dialog->color();
|
||||
|
@ -48,7 +48,6 @@ public:
|
|||
set_palette(pal);
|
||||
update();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (event.button() == GUI::MouseButton::Left)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue