1
0
Fork 0

visualSubToolBar now use same style as other toolbars

Previously visualSubToolBar has boarder while visualToolBar does not. So the width of the toolbar will change when toggling visualSubToolBar.

Now we remove the boarder so they have the same width. A separator is added at the top of visualToolBar instead to provide visual cue.

Fix wangqr/Aegisub#11
This commit is contained in:
wangqr 2019-09-01 22:55:13 -04:00 committed by Thomas Goyne
parent 0a2a07ba7e
commit b429645006
2 changed files with 2 additions and 1 deletions

View File

@ -70,7 +70,7 @@ VideoBox::VideoBox(wxWindow *parent, bool isDetached, agi::Context *context)
auto zoomBox = new wxComboBox(this, -1, "75%", wxDefaultPosition, wxDefaultSize, choices, wxCB_DROPDOWN | wxTE_PROCESS_ENTER);
auto visualToolBar = toolbar::GetToolbar(this, "visual_tools", context, "Video", true);
auto visualSubToolBar = new wxToolBar(this, -1, wxDefaultPosition, wxDefaultSize, wxTB_VERTICAL | wxTB_BOTTOM | wxTB_FLAT);
auto visualSubToolBar = new wxToolBar(this, -1, wxDefaultPosition, wxDefaultSize, wxTB_VERTICAL | wxTB_BOTTOM | wxTB_NODIVIDER | wxTB_FLAT);
auto videoDisplay = new VideoDisplay(visualSubToolBar, isDetached, zoomBox, this, context);
videoDisplay->MoveBeforeInTabOrder(videoSlider);

View File

@ -410,6 +410,7 @@ void VideoDisplay::SetZoomFromBoxText(wxCommandEvent &) {
void VideoDisplay::SetTool(std::unique_ptr<VisualToolBase> new_tool) {
toolBar->ClearTools();
toolBar->AddSeparator();
toolBar->Realize();
toolBar->Show(false);