mirror of
https://github.com/cookiengineer/audacity
synced 2025-06-26 00:58:37 +02:00
DeviceToolbar.cpp: better fit for resize and fix overspilling of channels combo when toolbar is very small.
This commit is contained in:
parent
500b3a32df
commit
9e5cb8f6af
@ -41,6 +41,7 @@
|
|||||||
#include "../Prefs.h"
|
#include "../Prefs.h"
|
||||||
#include "../Project.h"
|
#include "../Project.h"
|
||||||
#include "../Theme.h"
|
#include "../Theme.h"
|
||||||
|
#include "../widgets/Grabber.h"
|
||||||
|
|
||||||
IMPLEMENT_CLASS(DeviceToolBar, ToolBar);
|
IMPLEMENT_CLASS(DeviceToolBar, ToolBar);
|
||||||
|
|
||||||
@ -539,7 +540,8 @@ void DeviceToolBar::RepositionCombos()
|
|||||||
if (dockw < w)
|
if (dockw < w)
|
||||||
w = dockw;
|
w = dockw;
|
||||||
}
|
}
|
||||||
w -= GetResizeGrabberWidth();
|
// subtract the main grabber on the left and the resizer as well
|
||||||
|
w -= grabberWidth + GetResizeGrabberWidth();
|
||||||
if (w <= 0)
|
if (w <= 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -563,7 +565,7 @@ void DeviceToolBar::RepositionCombos()
|
|||||||
desiredChannels.SetHeight(desiredHost.GetHeight());
|
desiredChannels.SetHeight(desiredHost.GetHeight());
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
ratioUnused = 0.98f - (kHostWidthRatio + kInputWidthRatio + kOutputWidthRatio + kChannelsWidthRatio);
|
ratioUnused = 0.995f - (kHostWidthRatio + kInputWidthRatio + kOutputWidthRatio + kChannelsWidthRatio);
|
||||||
int i = 0;
|
int i = 0;
|
||||||
// limit the amount of times we solve contraints to 5
|
// limit the amount of times we solve contraints to 5
|
||||||
while (constrained && ratioUnused > 0.01f && i < 5) {
|
while (constrained && ratioUnused > 0.01f && i < 5) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user