X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-studio%2Ftrunk%2Fsrc%2Fgtkmm%2Fdockmanager.cpp;h=b483ae892d2638958d21ff456beda2dcead5052f;hb=adebca381cd0897bc0edf3e7572339c99c207814;hp=09660ebbac2e02766d446687e68bba84921831a7;hpb=0acdf0f274fa06c50e1625add9a96f3dbc0f9a00;p=synfig.git diff --git a/synfig-studio/trunk/src/gtkmm/dockmanager.cpp b/synfig-studio/trunk/src/gtkmm/dockmanager.cpp index 09660eb..b483ae8 100644 --- a/synfig-studio/trunk/src/gtkmm/dockmanager.cpp +++ b/synfig-studio/trunk/src/gtkmm/dockmanager.cpp @@ -6,6 +6,7 @@ ** ** \legal ** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007 Chris Moore ** ** This package is free software; you can redistribute it and/or ** modify it under the terms of the GNU General Public License as @@ -132,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); @@ -142,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(" ");