forked from mia/Aegisub
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:
parent
4200b85fb4
commit
888be0607f
2 changed files with 2 additions and 1 deletions
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue