projects
/
synfig.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use Color::is_straight(). Also, re-enable the optimization for straight blending...
[synfig.git]
/
synfig-studio
/
trunk
/
src
/
gtkmm
/
dockmanager.cpp
diff --git
a/synfig-studio/trunk/src/gtkmm/dockmanager.cpp
b/synfig-studio/trunk/src/gtkmm/dockmanager.cpp
index
661b24b
..
7b5e204
100644
(file)
--- a/
synfig-studio/trunk/src/gtkmm/dockmanager.cpp
+++ b/
synfig-studio/trunk/src/gtkmm/dockmanager.cpp
@@
-38,6
+38,8
@@
#include <synfigapp/main.h>
#include <gdkmm/general.h>
#include <synfigapp/main.h>
#include <gdkmm/general.h>
+#include "general.h"
+
#endif
/* === U S I N G =========================================================== */
#endif
/* === U S I N G =========================================================== */
@@
-133,7
+135,8
@@
public:
if(key=="contents_size")
{
try {
if(key=="contents_size")
{
try {
-
+ int width, height;
+ Gtk::IconSize::lookup(Gtk::IconSize(4),width,height);
vector<int> data;
String::size_type n=0;
String value_(value);
vector<int> data;
String::size_type n=0;
String value_(value);
@@
-142,7
+145,14
@@
public:
int size;
if(!strscanf(value_,"%d",&size))
break;
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;
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(" ");
data.push_back(size);
n=value_.find(" ");
@@
-164,6
+174,8
@@
public:
int x,y;
if(!strscanf(value,"%d %d",&x, &y))
return false;
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);
x=x*screen_w/SCALE_FACTOR;
y=y*screen_h/SCALE_FACTOR;
dock_dialog.move(x,y);
@@
-174,6
+186,8
@@
public:
int x,y;
if(!strscanf(value,"%d %d",&x, &y))
return false;
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);
x=x*screen_w/SCALE_FACTOR;
y=y*screen_h/SCALE_FACTOR;
dock_dialog.set_default_size(x,y);