mirror of
https://github.com/aseprite/aseprite.git
synced 2025-04-16 05:42:32 +00:00
New Keyboard Shortcuts dialog layout (fix #777)
This commit is contained in:
parent
746f41ff5b
commit
19951c6dd5
@ -1,13 +1,22 @@
|
||||
<!-- Aseprite -->
|
||||
<!-- Copyright (C) 2001-2014 by David Capello -->
|
||||
<!-- Copyright (C) 2001-2015 by David Capello -->
|
||||
<gui>
|
||||
<window id="keyboard_shortcuts" text="Keyboard Shortcuts">
|
||||
<hbox>
|
||||
<vbox>
|
||||
<view expansive="true" width="80">
|
||||
<listbox id="section" expansive="true" />
|
||||
</view>
|
||||
<separator horizontal="true" />
|
||||
<button text="&OK" closewindow="true" id="ok" magnet="true" width="60" />
|
||||
<button text="&Cancel" closewindow="true" />
|
||||
<separator horizontal="true" />
|
||||
<button text="&Import" id="import_button" />
|
||||
<button text="&Export" id="export_button" />
|
||||
<separator horizontal="true" />
|
||||
<button text="&Reset" id="reset_button" />
|
||||
</vbox>
|
||||
<vbox expansive="true">
|
||||
<hbox>
|
||||
<label text="Section:" />
|
||||
<combobox id="section" expansive="true" />
|
||||
</hbox>
|
||||
<view id="menus_view" expansive="true">
|
||||
<listbox id="menus" />
|
||||
</view>
|
||||
@ -21,15 +30,6 @@
|
||||
<listbox id="actions" />
|
||||
</view>
|
||||
</vbox>
|
||||
<vbox>
|
||||
<button text="&OK" closewindow="true" id="ok" magnet="true" width="60" />
|
||||
<button text="&Cancel" closewindow="true" />
|
||||
<separator horizontal="true" />
|
||||
<button text="&Import" id="import_button" />
|
||||
<button text="&Export" id="export_button" />
|
||||
<separator horizontal="true" />
|
||||
<button text="&Reset" id="reset_button" />
|
||||
</vbox>
|
||||
</hbox>
|
||||
</window>
|
||||
</gui>
|
||||
|
@ -283,10 +283,10 @@ public:
|
||||
KeyboardShortcutsWindow() {
|
||||
setAutoRemap(false);
|
||||
|
||||
section()->addItem("Menus");
|
||||
section()->addItem("Commands");
|
||||
section()->addItem("Tools");
|
||||
section()->addItem("Action Modifiers");
|
||||
section()->addChild(new ListItem("Menus"));
|
||||
section()->addChild(new ListItem("Commands"));
|
||||
section()->addChild(new ListItem("Tools"));
|
||||
section()->addChild(new ListItem("Action Modifiers"));
|
||||
|
||||
section()->Change.connect(Bind<void>(&KeyboardShortcutsWindow::onSectionChange, this));
|
||||
importButton()->Click.connect(Bind<void>(&KeyboardShortcutsWindow::onImport, this));
|
||||
@ -365,11 +365,12 @@ private:
|
||||
this->tools()->sortItems();
|
||||
this->actions()->sortItems();
|
||||
|
||||
section()->selectIndex(0);
|
||||
onSectionChange();
|
||||
}
|
||||
|
||||
void onSectionChange() {
|
||||
int section = this->section()->getSelectedItemIndex();
|
||||
int section = this->section()->getSelectedIndex();
|
||||
|
||||
menusView()->setVisible(section == 0);
|
||||
commandsView()->setVisible(section == 1);
|
||||
|
Loading…
x
Reference in New Issue
Block a user