Commit 891cd55e authored by Havoc Pennington's avatar Havoc Pennington Committed by Havoc Pennington

make motion around the ring much slower but finer-grained (gtk_hsv_focus):

2001-03-24  Havoc Pennington  <hp@pobox.com>

	* gtk/gtkhsv.c (gtk_hsv_move): make motion around the ring much
	slower but finer-grained
	(gtk_hsv_focus): get initial focus on the ring or triangle
	according to tab direction

	* gtk/testgtk.c (main): get rid of weird sleep(1) on exit
parent 207e3bb9
2001-03-24 Havoc Pennington <hp@pobox.com>
* gtk/gtkhsv.c (gtk_hsv_move): make motion around the ring much
slower but finer-grained
(gtk_hsv_focus): get initial focus on the ring or triangle
according to tab direction
* gtk/testgtk.c (main): get rid of weird sleep(1) on exit
2001-03-23 Havoc Pennington <hp@pobox.com>
* gtk/gtkhsv.c: make this somewhat key-navigable
......
2001-03-24 Havoc Pennington <hp@pobox.com>
* gtk/gtkhsv.c (gtk_hsv_move): make motion around the ring much
slower but finer-grained
(gtk_hsv_focus): get initial focus on the ring or triangle
according to tab direction
* gtk/testgtk.c (main): get rid of weird sleep(1) on exit
2001-03-23 Havoc Pennington <hp@pobox.com>
* gtk/gtkhsv.c: make this somewhat key-navigable
......
2001-03-24 Havoc Pennington <hp@pobox.com>
* gtk/gtkhsv.c (gtk_hsv_move): make motion around the ring much
slower but finer-grained
(gtk_hsv_focus): get initial focus on the ring or triangle
according to tab direction
* gtk/testgtk.c (main): get rid of weird sleep(1) on exit
2001-03-23 Havoc Pennington <hp@pobox.com>
* gtk/gtkhsv.c: make this somewhat key-navigable
......
2001-03-24 Havoc Pennington <hp@pobox.com>
* gtk/gtkhsv.c (gtk_hsv_move): make motion around the ring much
slower but finer-grained
(gtk_hsv_focus): get initial focus on the ring or triangle
according to tab direction
* gtk/testgtk.c (main): get rid of weird sleep(1) on exit
2001-03-23 Havoc Pennington <hp@pobox.com>
* gtk/gtkhsv.c: make this somewhat key-navigable
......
2001-03-24 Havoc Pennington <hp@pobox.com>
* gtk/gtkhsv.c (gtk_hsv_move): make motion around the ring much
slower but finer-grained
(gtk_hsv_focus): get initial focus on the ring or triangle
according to tab direction
* gtk/testgtk.c (main): get rid of weird sleep(1) on exit
2001-03-23 Havoc Pennington <hp@pobox.com>
* gtk/gtkhsv.c: make this somewhat key-navigable
......
2001-03-24 Havoc Pennington <hp@pobox.com>
* gtk/gtkhsv.c (gtk_hsv_move): make motion around the ring much
slower but finer-grained
(gtk_hsv_focus): get initial focus on the ring or triangle
according to tab direction
* gtk/testgtk.c (main): get rid of weird sleep(1) on exit
2001-03-23 Havoc Pennington <hp@pobox.com>
* gtk/gtkhsv.c: make this somewhat key-navigable
......
2001-03-24 Havoc Pennington <hp@pobox.com>
* gtk/gtkhsv.c (gtk_hsv_move): make motion around the ring much
slower but finer-grained
(gtk_hsv_focus): get initial focus on the ring or triangle
according to tab direction
* gtk/testgtk.c (main): get rid of weird sleep(1) on exit
2001-03-23 Havoc Pennington <hp@pobox.com>
* gtk/gtkhsv.c: make this somewhat key-navigable
......
......@@ -1363,6 +1363,11 @@ gtk_hsv_focus (GtkContainer *container,
if (!GTK_WIDGET_HAS_FOCUS (hsv))
{
if (dir == GTK_DIR_TAB_BACKWARD)
priv->focus_on_ring = FALSE;
else
priv->focus_on_ring = TRUE;
gtk_widget_grab_focus (GTK_WIDGET (hsv));
return TRUE;
}
......@@ -1663,12 +1668,13 @@ gtk_hsv_move (GtkHSV *hsv,
x = floor (sx + (vx - sx) * priv->v + (hx - vx) * priv->s * priv->v + 0.5);
y = floor (sy + (vy - sy) * priv->v + (hy - vy) * priv->s * priv->v + 0.5);
#define HUE_DELTA 0.002
switch (dir)
{
case GTK_DIR_UP:
if (priv->focus_on_ring)
hue += 0.02;
hue += HUE_DELTA;
else
{
y -= 1;
......@@ -1678,7 +1684,7 @@ gtk_hsv_move (GtkHSV *hsv,
case GTK_DIR_DOWN:
if (priv->focus_on_ring)
hue -= 0.02;
hue -= HUE_DELTA;
else
{
y += 1;
......@@ -1688,7 +1694,7 @@ gtk_hsv_move (GtkHSV *hsv,
case GTK_DIR_LEFT:
if (priv->focus_on_ring)
hue += 0.02;
hue += HUE_DELTA;
else
{
x -= 1;
......@@ -1698,7 +1704,8 @@ gtk_hsv_move (GtkHSV *hsv,
case GTK_DIR_RIGHT:
if (priv->focus_on_ring)
hue -= 0.02;
hue -= HUE_DELTA
;
else
{
x += 1;
......@@ -1719,3 +1726,4 @@ gtk_hsv_move (GtkHSV *hsv,
gtk_hsv_set_color (hsv, hue, sat, val);
}
......@@ -9990,9 +9990,11 @@ main (int argc, char *argv[])
{
while (g_main_pending ())
g_main_iteration (FALSE);
#if 0
sleep (1);
while (g_main_pending ())
g_main_iteration (FALSE);
#endif
}
return 0;
......
......@@ -9990,9 +9990,11 @@ main (int argc, char *argv[])
{
while (g_main_pending ())
g_main_iteration (FALSE);
#if 0
sleep (1);
while (g_main_pending ())
g_main_iteration (FALSE);
#endif
}
return 0;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment