Mixer/Spatialization_Console: If screen isn't large enough, use smaller window.
This commit is contained in:
parent
6f42e2b816
commit
bf232b3928
|
@ -42,17 +42,32 @@
|
||||||
Spatialization_Console::Spatialization_Console ( void ) : Fl_Double_Window( 850, 850 )
|
Spatialization_Console::Spatialization_Console ( void ) : Fl_Double_Window( 850, 850 )
|
||||||
{
|
{
|
||||||
_resized = false;
|
_resized = false;
|
||||||
_min_width = 100;
|
|
||||||
|
|
||||||
label( "Spatialization Console" );
|
label( "Spatialization Console" );
|
||||||
|
|
||||||
fl_font( FL_HELVETICA, 14 );
|
fl_font( FL_HELVETICA, 14 );
|
||||||
|
|
||||||
panner = new Panner( 25,25, 802,802 );
|
|
||||||
|
|
||||||
|
int padding = 48;
|
||||||
|
int S = 802;
|
||||||
|
|
||||||
|
{
|
||||||
|
int sx, sy, sw, sh;
|
||||||
|
|
||||||
|
Fl::screen_xywh( sx, sy, sw, sh );
|
||||||
|
|
||||||
|
if ( sw < 850 || sh < 850 )
|
||||||
|
{
|
||||||
|
/* if screen isn't big enough, use smaller version of control */
|
||||||
|
S = 502;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
panner = new Panner( 25,25, S, S );
|
||||||
panner->callback( cb_panner_value_handle, this );
|
panner->callback( cb_panner_value_handle, this );
|
||||||
panner->when( FL_WHEN_CHANGED );
|
panner->when( FL_WHEN_CHANGED );
|
||||||
|
|
||||||
|
size( S + padding, S + padding );
|
||||||
|
|
||||||
callback( cb_window, this );
|
callback( cb_window, this );
|
||||||
end();
|
end();
|
||||||
|
|
||||||
|
|
|
@ -42,7 +42,6 @@ class Spatialization_Console : public Loggable, public Fl_Double_Window
|
||||||
static void cb_window ( Fl_Widget *w );
|
static void cb_window ( Fl_Widget *w );
|
||||||
|
|
||||||
bool _resized;
|
bool _resized;
|
||||||
int _min_width;
|
|
||||||
|
|
||||||
int azimuth_port_number;
|
int azimuth_port_number;
|
||||||
int elevation_port_number;
|
int elevation_port_number;
|
||||||
|
|
Loading…
Reference in New Issue