X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-studio%2Ftrunk%2Fsrc%2Fgtkmm%2Fdockmanager.cpp;h=7b5e20461b2c07c26cfb367b861d0013cd7a3f84;hb=7682d14e5fb3d28285511aaa3bf6219609dfd315;hp=b483ae892d2638958d21ff456beda2dcead5052f;hpb=e5e9178080f8bbd8633d40c081c4f2f1b8f77adc;p=synfig.git diff --git a/synfig-studio/trunk/src/gtkmm/dockmanager.cpp b/synfig-studio/trunk/src/gtkmm/dockmanager.cpp index b483ae8..7b5e204 100644 --- a/synfig-studio/trunk/src/gtkmm/dockmanager.cpp +++ b/synfig-studio/trunk/src/gtkmm/dockmanager.cpp @@ -38,6 +38,8 @@ #include #include +#include "general.h" + #endif /* === U S I N G =========================================================== */ @@ -143,6 +145,8 @@ public: int size; if(!strscanf(value_,"%d",&size)) break; + if (size > SCALE_FACTOR) size = SCALE_FACTOR - 150; + if (size < 0) size = 0; size=size*screen_h/SCALE_FACTOR; // prevent errors like this, by allowing space for at least the dockable's icon: @@ -170,6 +174,8 @@ public: int x,y; if(!strscanf(value,"%d %d",&x, &y)) return false; + if (x > SCALE_FACTOR) x = SCALE_FACTOR - 150; if (x < 0) x = 0; + if (y > SCALE_FACTOR) y = SCALE_FACTOR - 150; if (y < 0) y = 0; x=x*screen_w/SCALE_FACTOR; y=y*screen_h/SCALE_FACTOR; dock_dialog.move(x,y); @@ -180,6 +186,8 @@ public: int x,y; if(!strscanf(value,"%d %d",&x, &y)) return false; + if (x > SCALE_FACTOR) x = 150; if (x < 0) x = 0; + if (y > SCALE_FACTOR) y = 150; if (y < 0) y = 0; x=x*screen_w/SCALE_FACTOR; y=y*screen_h/SCALE_FACTOR; dock_dialog.set_default_size(x,y);