From 33e4516589ba9d0311a62c567596e9a7a3852930 Mon Sep 17 00:00:00 2001 From: Jonathan Moore Liles Date: Fri, 22 Jan 2010 19:27:25 -0600 Subject: [PATCH] Timeline: Attempt to constrain main window to size of screen, but don't automatically fill the screen. Also, set a sane minimum window size. --- Timeline/TLE.fl | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Timeline/TLE.fl b/Timeline/TLE.fl index a8d1656..41a25fb 100644 --- a/Timeline/TLE.fl +++ b/Timeline/TLE.fl @@ -159,13 +159,18 @@ system_colors[ 0 ] = (Fl_Color)Fl::get_color( FL_BACKGROUND_COLOR ); system_colors[ 1 ] = (Fl_Color)Fl::get_color( FL_FOREGROUND_COLOR ); system_colors[ 2 ] = (Fl_Color)Fl::get_color( FL_BACKGROUND2_COLOR ); -// try to fill the screen +// constrain window to size of screen. { int sx, sy, sw, sh; Fl::screen_xywh( sx, sy, sw, sh ); - main_window->resize( sx, sy, sw, sh ); + main_window->size( 947, 600 ); + main_window->size_range( 947, 600 ); + + if ( main_window->w() > sw || + main_window->h() > sh ) + main_window->resize( sx, sy, sw, sh ); } Fl::add_timeout( STATUS_UPDATE_FREQ, update_cb, this );