Fix previous commit (independent eye movement).
Last time I got the brackets wrong, so the eyes did not look exactly in the right direction.
This commit is contained in:
parent
c5f5e0484d
commit
8164b087d1
1 changed files with 4 additions and 6 deletions
|
|
@ -75,12 +75,10 @@ calculate_pupil_xy (EyesPlugin *eyes_applet,
|
|||
height = GTK_WIDGET(widget)->allocation.height;
|
||||
gtk_misc_get_alignment(GTK_MISC(widget), &xalign, &yalign);
|
||||
|
||||
nx = x - (MAX(width - eyes_applet->eye_width, 0)
|
||||
* xalign - eyes_applet->eye_width / 2)
|
||||
- GTK_WIDGET(widget)->allocation.x;
|
||||
ny = y - (MAX(height - eyes_applet->eye_height, 0)
|
||||
* yalign - eyes_applet->eye_height / 2)
|
||||
- GTK_WIDGET(widget)->allocation.y;
|
||||
nx = x - MAX(width - eyes_applet->eye_width, 0) * xalign
|
||||
- eyes_applet->eye_width / 2 - GTK_WIDGET(widget)->allocation.x;
|
||||
ny = y - MAX(height - eyes_applet->eye_height, 0) * yalign
|
||||
- eyes_applet->eye_height / 2 - GTK_WIDGET(widget)->allocation.y;
|
||||
|
||||
h = hypot (nx, ny);
|
||||
if (h < 0.5 ||
|
||||
|
|
|
|||
Reference in a new issue