mirror of
https://github.com/cookiengineer/audacity
synced 2025-07-07 07:57:43 +02:00
bug 11 followup: let DeviceToolBar be resize smaller than intial width
This commit is contained in:
parent
90be578616
commit
4511331f88
@ -56,6 +56,7 @@ class DeviceToolBar:public ToolBar {
|
|||||||
/// When the prefs don't exist this value is used.
|
/// When the prefs don't exist this value is used.
|
||||||
/// It should be small enough to work on tiny screens
|
/// It should be small enough to work on tiny screens
|
||||||
int GetInitialWidth() {return 520;}
|
int GetInitialWidth() {return 520;}
|
||||||
|
virtual int GetMinToolbarWidth() {return 200;}
|
||||||
private:
|
private:
|
||||||
int ChangeHost();
|
int ChangeHost();
|
||||||
void FillHostDevices();
|
void FillHostDevices();
|
||||||
|
@ -265,11 +265,16 @@ void ToolBar::ReCreateButtons()
|
|||||||
|
|
||||||
// Set the true AND minimum sizes and do final layout
|
// Set the true AND minimum sizes and do final layout
|
||||||
if(IsResizable())
|
if(IsResizable())
|
||||||
{// EM: allows narrow Meter Toolbar
|
{
|
||||||
sz.SetWidth(GetInitialWidth());
|
sz.SetWidth(GetMinToolbarWidth());
|
||||||
SetMinSize(sz);
|
SetMinSize(sz);
|
||||||
|
sz.SetWidth(GetInitialWidth());
|
||||||
|
SetSize(sz);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
SetInitialSize(sz);
|
||||||
}
|
}
|
||||||
SetInitialSize(sz);
|
|
||||||
Layout();
|
Layout();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -102,6 +102,7 @@ class ToolBar:public wxPanel
|
|||||||
|
|
||||||
/// Resizable toolbars should implement this.
|
/// Resizable toolbars should implement this.
|
||||||
virtual int GetInitialWidth() {return -1;}
|
virtual int GetInitialWidth() {return -1;}
|
||||||
|
virtual int GetMinToolbarWidth() {return GetInitialWidth();}
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
AButton *MakeButton(teBmps eUp,
|
AButton *MakeButton(teBmps eUp,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user