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