From 6fa9df7e90817a3572b01486869b684adf384ff2 Mon Sep 17 00:00:00 2001 From: Greg Ercolano Date: Sun, 17 Jul 2011 16:40:41 +0000 Subject: Fixing STR #2679; Fl_Table makes use of FLTK's Fl::scrollbar_size() global. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8863 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl_Table.cxx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/Fl_Table.cxx') diff --git a/src/Fl_Table.cxx b/src/Fl_Table.cxx index 6b73879ce..070e9e545 100644 --- a/src/Fl_Table.cxx +++ b/src/Fl_Table.cxx @@ -30,7 +30,7 @@ #include // currently only Windows and Linux #endif -#define SCROLLBAR_SIZE 16 +#define SCROLLBAR_SIZE (Fl::scrollbar_size()) // Scroll display so 'row' is at top void Fl_Table::row_position(int row) { @@ -1117,6 +1117,13 @@ void Fl_Table::set_selection(int row_top, int col_left, int row_bot, int col_rig // Then tell the group to draw over us. // void Fl_Table::draw() { + // Check if scrollbar size changed + if ( ( vscrollbar && (SCROLLBAR_SIZE != vscrollbar->w()) ) || + ( hscrollbar && (SCROLLBAR_SIZE != hscrollbar->h()) ) ) { + // handle size change, min/max, table dim's, etc + table_resized(); + } + draw_cell(CONTEXT_STARTPAGE, 0, 0, // let user's drawing routine tix, tiy, tiw, tih); // prep new page -- cgit v1.2.3