From 16e1563c00130aea40e57dd712632b7ae0bf5791 Mon Sep 17 00:00:00 2001 From: Johannes Schultz Date: Wed, 13 Nov 2024 23:07:07 +0000 Subject: [PATCH] [Mod] Main toolbar: Hide separator before VU Meters when VU Meters are not displayed. git-svn-id: https://source.openmpt.org/svn/openmpt/trunk/OpenMPT@22183 56274372-70c3-4bfc-bfc3-4c3a0b034d27 --- mptrack/Mainbar.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mptrack/Mainbar.cpp b/mptrack/Mainbar.cpp index ba9be6339a4..a15ebc18a31 100644 --- a/mptrack/Mainbar.cpp +++ b/mptrack/Mainbar.cpp @@ -169,7 +169,8 @@ enum ToolbarItemIndex EDITGLOBALVOL_INDEX = GLOBALVOLTEXT_INDEX + 1, // Edit Speed SPINGLOBALVOL_INDEX = EDITGLOBALVOL_INDEX + 1, // Spin Speed DIVGLOBALVOL_INDEX = SPINGLOBALVOL_INDEX + 1, // Divider at end - VUMETER_INDEX = SPINGLOBALVOL_INDEX + 6, // VU Meters + DIVVUMETER_INDEX = SPINGLOBALVOL_INDEX + 5, // Divider before VU Meters + VUMETER_INDEX = DIVVUMETER_INDEX + 1, // VU Meters }; #define TOOLBAR_IMAGE_PAUSE 8 @@ -441,6 +442,7 @@ void CMainToolBar::UpdateControls() UpdateControl(visibleItems[MainToolBarItem::GlobalVolume], m_SpinGlobalVolume, SPINGLOBALVOL_INDEX, IDC_SPIN_GLOBALVOL); SetButtonVisibility(DIVGLOBALVOL_INDEX, visibleItems.test_any_except(MainToolBarItem::VUMeter)); + SetButtonVisibility(DIVVUMETER_INDEX, visibleItems[MainToolBarItem::VUMeter]); m_VuMeter.SetOrientation(!m_bVertical); if(m_bVertical) m_VuMeter.SetWindowPos(nullptr, 0, 0, VUMETER_HEIGHT, VUMETER_HEIGHT, SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE);