mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-29 12:32:52 +00:00
Enter key selects the preset palette
Also the listbox doesn't lost the focus, so we can continue navigating preset palettes.
This commit is contained in:
parent
9b1f0bf33c
commit
a19a834c4d
@ -5,7 +5,7 @@
|
|||||||
<label text="Available Palettes:" />
|
<label text="Available Palettes:" />
|
||||||
<view id="view" expansive="true" />
|
<view id="view" expansive="true" />
|
||||||
<hbox>
|
<hbox>
|
||||||
<button id="load_pal" text="&Load" width="80" />
|
<button id="load_pal" text="&Load" width="80" magnet="true" />
|
||||||
<hbox expansive="true" />
|
<hbox expansive="true" />
|
||||||
<button id="open_folder" text="Open &Folder" width="60" />
|
<button id="open_folder" text="Open &Folder" width="60" />
|
||||||
</hbox>
|
</hbox>
|
||||||
|
@ -34,6 +34,7 @@ PalettePopup::PalettePopup()
|
|||||||
{
|
{
|
||||||
setAutoRemap(false);
|
setAutoRemap(false);
|
||||||
setBorder(gfx::Border(4*guiscale()));
|
setBorder(gfx::Border(4*guiscale()));
|
||||||
|
setEnterBehavior(EnterBehavior::DoNothingOnEnter);
|
||||||
|
|
||||||
addChild(m_popup);
|
addChild(m_popup);
|
||||||
|
|
||||||
@ -76,6 +77,8 @@ void PalettePopup::onLoadPal()
|
|||||||
CommandsModule::instance()->getCommandByName(CommandId::SetPalette));
|
CommandsModule::instance()->getCommandByName(CommandId::SetPalette));
|
||||||
cmd->setPalette(palette);
|
cmd->setPalette(palette);
|
||||||
UIContext::instance()->executeCommand(cmd);
|
UIContext::instance()->executeCommand(cmd);
|
||||||
|
|
||||||
|
m_paletteListBox.requestFocus();
|
||||||
}
|
}
|
||||||
|
|
||||||
void PalettePopup::onOpenFolder()
|
void PalettePopup::onOpenFolder()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user