From e5e9178080f8bbd8633d40c081c4f2f1b8f77adc Mon Sep 17 00:00:00 2001 From: dooglus Date: Tue, 23 Oct 2007 19:57:24 +0000 Subject: [PATCH] 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 --- synfig-studio/trunk/src/gtkmm/dockmanager.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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(" "); -- 2.7.4