changeset 1525:34ce887be578

Handle special case of overlay scrollbars returning size 0.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Mon, 02 Jan 2012 00:20:17 +0000
parents 010e1d916ee7
children ff78ae1d7429
files dwtest.c
diffstat 1 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/dwtest.c	Sat Dec 31 17:14:33 2011 +0000
+++ b/dwtest.c	Mon Jan 02 00:20:17 2012 +0000
@@ -980,6 +980,14 @@
     dw_window_get_preferred_size(vscrollbar, &vscrollbarwidth, NULL);
     dw_window_get_preferred_size(hscrollbar, NULL, &hscrollbarheight);
     
+    /* On GTK with overlay scrollbars enabled this returns us 0... 
+     * so in that case we need to give it some real values.
+     */
+    if(!vscrollbarwidth)
+        vscrollbarwidth = 8;
+    if(!hscrollbarheight)
+        hscrollbarheight = 8;
+    
     /* create render box for number pixmap */
     textbox1 = dw_render_new( 100 );
     dw_window_set_font(textbox1, FIXEDFONT);