[dialogs] Display all controls in AccelConfig on Mac (#1349)
Calling `ExpandAll()` on the `wxTreeCtrl` would cause it to display outside of its intended view, hiding other controls. Instead, this sets a minimum size for the tree control, so the default window size is reasonable. Fixes #1348
This commit is contained in:
parent
4c450ab360
commit
e1c2ecc584
|
@ -145,9 +145,11 @@ AccelConfig::AccelConfig(wxWindow* parent,
|
||||||
PopulateTreeWithMenu(&command_to_item_id_, tree_, id, menu->GetMenu(i), recents,
|
PopulateTreeWithMenu(&command_to_item_id_, tree_, id, menu->GetMenu(i), recents,
|
||||||
menu->GetMenuLabelText(i) + '\n');
|
menu->GetMenuLabelText(i) + '\n');
|
||||||
}
|
}
|
||||||
tree_->ExpandAll();
|
|
||||||
tree_->SelectItem(menu_id);
|
tree_->SelectItem(menu_id);
|
||||||
|
|
||||||
|
// Set a minimum size for the tree so the default dialog size is reasonable.
|
||||||
|
tree_->SetMinSize(wxSize(300, 300));
|
||||||
|
|
||||||
int w, h;
|
int w, h;
|
||||||
current_keys_->GetTextExtent("CTRL-ALT-SHIFT-ENTER", &w, &h);
|
current_keys_->GetTextExtent("CTRL-ALT-SHIFT-ENTER", &w, &h);
|
||||||
wxSize size(w, h);
|
wxSize size(w, h);
|
||||||
|
|
|
@ -97,7 +97,7 @@ public:
|
||||||
bool pending_fullscreen;
|
bool pending_fullscreen;
|
||||||
#if __WXMAC__
|
#if __WXMAC__
|
||||||
// I suppose making this work will require tweaking the bundle
|
// I suppose making this work will require tweaking the bundle
|
||||||
void MacOpenFile(const wxString& f)
|
void MacOpenFile(const wxString& f) override
|
||||||
{
|
{
|
||||||
pending_load = f;
|
pending_load = f;
|
||||||
};
|
};
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<resource xmlns="http://www.wxwidgets.org/wxxrc" version="2.5.3.0">
|
<resource xmlns="http://www.wxwidgets.org/wxxrc" version="2.5.3.0">
|
||||||
<object class="wxDialog" name="AccelConfig">
|
<object class="wxDialog" name="AccelConfig">
|
||||||
<title>Key Shortcuts</title>
|
<title>Key Shortcuts</title>
|
||||||
<style>wxRESIZE_BORDER</style>
|
<style>wxRESIZE_BORDER|wxCLOSE_BOX</style>
|
||||||
<object class="wxBoxSizer">
|
<object class="wxBoxSizer">
|
||||||
<orient>wxVERTICAL</orient>
|
<orient>wxVERTICAL</orient>
|
||||||
<flag>wxEXPAND</flag>
|
<flag>wxEXPAND</flag>
|
||||||
|
@ -56,6 +56,7 @@
|
||||||
</object>
|
</object>
|
||||||
</object>
|
</object>
|
||||||
<object class="sizeritem">
|
<object class="sizeritem">
|
||||||
|
<flag>wxEXPAND</flag>
|
||||||
<object class="wxBoxSizer">
|
<object class="wxBoxSizer">
|
||||||
<object class="sizeritem">
|
<object class="sizeritem">
|
||||||
<object class="wxButton" name="Assign">
|
<object class="wxButton" name="Assign">
|
||||||
|
@ -80,7 +81,6 @@
|
||||||
</object>
|
</object>
|
||||||
<orient>wxVERTICAL</orient>
|
<orient>wxVERTICAL</orient>
|
||||||
</object>
|
</object>
|
||||||
<flag>wxEXPAND</flag>
|
|
||||||
</object>
|
</object>
|
||||||
<object class="sizeritem">
|
<object class="sizeritem">
|
||||||
<flag>wxALL</flag>
|
<flag>wxALL</flag>
|
||||||
|
@ -98,6 +98,7 @@
|
||||||
</object>
|
</object>
|
||||||
</object>
|
</object>
|
||||||
<object class="sizeritem">
|
<object class="sizeritem">
|
||||||
|
<flag>wxEXPAND</flag>
|
||||||
<object class="wxBoxSizer">
|
<object class="wxBoxSizer">
|
||||||
<object class="sizeritem">
|
<object class="sizeritem">
|
||||||
<flag>wxALL</flag>
|
<flag>wxALL</flag>
|
||||||
|
@ -113,7 +114,6 @@
|
||||||
</object>
|
</object>
|
||||||
<orient>wxVERTICAL</orient>
|
<orient>wxVERTICAL</orient>
|
||||||
</object>
|
</object>
|
||||||
<flag>wxEXPAND</flag>
|
|
||||||
</object>
|
</object>
|
||||||
</object>
|
</object>
|
||||||
</object>
|
</object>
|
||||||
|
|
Loading…
Reference in New Issue