fix minimum VST GUI window size (gtk padding)
This commit is contained in:
parent
dfdf9a35f1
commit
8843679e1f
@ -61,15 +61,13 @@ VSTPluginUI::preset_selected ()
|
||||
int
|
||||
VSTPluginUI::get_preferred_height ()
|
||||
{
|
||||
int preferred_height = _vst->state()->height;
|
||||
preferred_height += _vst->state()->voffset;
|
||||
return preferred_height;
|
||||
return _vst->state()->height + _vst->state()->voffset;
|
||||
}
|
||||
|
||||
int
|
||||
VSTPluginUI::get_preferred_width ()
|
||||
{
|
||||
return _vst->state()->width;
|
||||
return _vst->state()->width + _vst->state()->hoffset;
|
||||
}
|
||||
|
||||
int
|
||||
|
@ -97,6 +97,7 @@ struct LIBARDOUR_API _VSTState
|
||||
int wantIdle;
|
||||
|
||||
int voffset;
|
||||
int hoffset;
|
||||
int gui_shown;
|
||||
int destroy;
|
||||
int vst_version;
|
||||
|
@ -224,8 +224,10 @@ fst_new (void)
|
||||
fst->has_editor = 0;
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
fst->voffset = 36;
|
||||
fst->hoffset = 0;
|
||||
#else /* linux + wine */
|
||||
fst->voffset = 24;
|
||||
fst->hoffset = 6;
|
||||
#endif
|
||||
fst->program_set_without_editor = 0;
|
||||
return fst;
|
||||
@ -463,9 +465,9 @@ fst_move_window_into_view (VSTState* fst)
|
||||
{
|
||||
if (fst->windows_window) {
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
SetWindowPos ((HWND)(fst->windows_window), 0, 0, fst->voffset, fst->width, fst->height, 0);
|
||||
SetWindowPos ((HWND)(fst->windows_window), 0, fst->hoffset, fst->voffset, fst->width, fst->height, 0);
|
||||
#else /* linux + wine */
|
||||
SetWindowPos ((HWND)(fst->windows_window), 0, 0, 0, fst->width, fst->height, 0);
|
||||
SetWindowPos ((HWND)(fst->windows_window), 0, 0, 0, fst->width + fst->hoffset, fst->height + fst->voffset, 0);
|
||||
#endif
|
||||
ShowWindow ((HWND)(fst->windows_window), SW_SHOWNA);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user