From b429645006c8c912d14c1c47ddb7b1f175e2aeb8 Mon Sep 17 00:00:00 2001 From: wangqr Date: Sun, 1 Sep 2019 22:55:13 -0400 Subject: [PATCH] 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 --- src/video_box.cpp | 2 +- src/video_display.cpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/video_box.cpp b/src/video_box.cpp index 0b1da4096..086aa1ce0 100644 --- a/src/video_box.cpp +++ b/src/video_box.cpp @@ -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); diff --git a/src/video_display.cpp b/src/video_display.cpp index 2df9ec3c0..3a5c2d40d 100644 --- a/src/video_display.cpp +++ b/src/video_display.cpp @@ -410,6 +410,7 @@ void VideoDisplay::SetZoomFromBoxText(wxCommandEvent &) { void VideoDisplay::SetTool(std::unique_ptr new_tool) { toolBar->ClearTools(); + toolBar->AddSeparator(); toolBar->Realize(); toolBar->Show(false);