From 9e5cb8f6af067b12bce46fcc8b631f0e6759e7e3 Mon Sep 17 00:00:00 2001 From: mchinen Date: Sat, 5 Feb 2011 13:37:31 +0000 Subject: [PATCH] DeviceToolbar.cpp: better fit for resize and fix overspilling of channels combo when toolbar is very small. --- src/toolbars/DeviceToolBar.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/toolbars/DeviceToolBar.cpp b/src/toolbars/DeviceToolBar.cpp index 3eb5b2e4e..98e81035a 100644 --- a/src/toolbars/DeviceToolBar.cpp +++ b/src/toolbars/DeviceToolBar.cpp @@ -41,6 +41,7 @@ #include "../Prefs.h" #include "../Project.h" #include "../Theme.h" +#include "../widgets/Grabber.h" IMPLEMENT_CLASS(DeviceToolBar, ToolBar); @@ -539,7 +540,8 @@ void DeviceToolBar::RepositionCombos() if (dockw < w) w = dockw; } - w -= GetResizeGrabberWidth(); + // subtract the main grabber on the left and the resizer as well + w -= grabberWidth + GetResizeGrabberWidth(); if (w <= 0) return; @@ -563,7 +565,7 @@ void DeviceToolBar::RepositionCombos() desiredChannels.SetHeight(desiredHost.GetHeight()); #endif - ratioUnused = 0.98f - (kHostWidthRatio + kInputWidthRatio + kOutputWidthRatio + kChannelsWidthRatio); + ratioUnused = 0.995f - (kHostWidthRatio + kInputWidthRatio + kOutputWidthRatio + kChannelsWidthRatio); int i = 0; // limit the amount of times we solve contraints to 5 while (constrained && ratioUnused > 0.01f && i < 5) {