From: dooglus Date: Tue, 23 Oct 2007 19:57:24 +0000 (+0000) Subject: Prevent the "** CRITICAL **: clearlooks_style_draw_box_gap: assertion `height >=... X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=e5e9178080f8bbd8633d40c081c4f2f1b8f77adc;p=synfig.git Prevent the "** CRITICAL **: clearlooks_style_draw_box_gap: assertion `height >= -1' failed" messages that appear when dock dialogs are shrunk so much they overlap. git-svn-id: http://svn.voria.com/code@953 1f10aa63-cdf2-0310-b900-c93c546f37ac --- diff --git a/synfig-studio/trunk/src/gtkmm/dockmanager.cpp b/synfig-studio/trunk/src/gtkmm/dockmanager.cpp index 661b24b..b483ae8 100644 --- a/synfig-studio/trunk/src/gtkmm/dockmanager.cpp +++ b/synfig-studio/trunk/src/gtkmm/dockmanager.cpp @@ -133,7 +133,8 @@ public: if(key=="contents_size") { try { - + int width, height; + Gtk::IconSize::lookup(Gtk::IconSize(4),width,height); vector data; String::size_type n=0; String value_(value); @@ -143,6 +144,11 @@ public: if(!strscanf(value_,"%d",&size)) break; size=size*screen_h/SCALE_FACTOR; + + // prevent errors like this, by allowing space for at least the dockable's icon: + // ** CRITICAL **: clearlooks_style_draw_box_gap: assertion `height >= -1' failed + if (size < height + 9) size = height + 9; + data.push_back(size); n=value_.find(" ");