mirror of
https://github.com/brl/mutter.git
synced 2024-11-30 03:50:47 -05:00
2008-06-23 Emmanuele Bassi <ebassi@openedhand.com>
Bug 905 - Paint cursor directly (Xan López) * clutter/clutter-entry.c: (clutter_entry_paint_cursor), (clutter_entry_init), (clutter_entry_set_color): Directly paint the cursor on the entry instead of using an actor.
This commit is contained in:
parent
1562347302
commit
a843a5f90e
10
ChangeLog
10
ChangeLog
@ -1,3 +1,13 @@
|
|||||||
|
2008-06-23 Emmanuele Bassi <ebassi@openedhand.com>
|
||||||
|
|
||||||
|
Bug 905 - Paint cursor directly (Xan López)
|
||||||
|
|
||||||
|
* clutter/clutter-entry.c:
|
||||||
|
(clutter_entry_paint_cursor),
|
||||||
|
(clutter_entry_init),
|
||||||
|
(clutter_entry_set_color): Directly paint the cursor on the
|
||||||
|
entry instead of using an actor.
|
||||||
|
|
||||||
2008-06-23 Emmanuele Bassi <ebassi@openedhand.com>
|
2008-06-23 Emmanuele Bassi <ebassi@openedhand.com>
|
||||||
|
|
||||||
Bug 981 - clutter_stage_read_pixels temprow fix (Haakon Sporsheim)
|
Bug 981 - clutter_stage_read_pixels temprow fix (Haakon Sporsheim)
|
||||||
|
@ -37,6 +37,8 @@
|
|||||||
#include "config.h"
|
#include "config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <cogl/cogl.h>
|
||||||
|
|
||||||
#include "clutter-entry.h"
|
#include "clutter-entry.h"
|
||||||
|
|
||||||
#include "clutter-debug.h"
|
#include "clutter-debug.h"
|
||||||
@ -126,7 +128,6 @@ struct _ClutterEntryPrivate
|
|||||||
gint width_chars;
|
gint width_chars;
|
||||||
|
|
||||||
ClutterGeometry cursor_pos;
|
ClutterGeometry cursor_pos;
|
||||||
ClutterActor *cursor;
|
|
||||||
gboolean show_cursor;
|
gboolean show_cursor;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -381,15 +382,15 @@ clutter_entry_paint_cursor (ClutterEntry *entry)
|
|||||||
|
|
||||||
if (priv->show_cursor)
|
if (priv->show_cursor)
|
||||||
{
|
{
|
||||||
clutter_actor_set_size (CLUTTER_ACTOR (priv->cursor),
|
cogl_push_matrix ();
|
||||||
|
|
||||||
|
cogl_color (&priv->fgcol);
|
||||||
|
cogl_rectangle (priv->cursor_pos.x,
|
||||||
|
priv->cursor_pos.y,
|
||||||
priv->cursor_pos.width,
|
priv->cursor_pos.width,
|
||||||
priv->cursor_pos.height);
|
priv->cursor_pos.height);
|
||||||
|
|
||||||
clutter_actor_set_position (priv->cursor,
|
cogl_pop_matrix ();
|
||||||
priv->cursor_pos.x,
|
|
||||||
priv->cursor_pos.y);
|
|
||||||
|
|
||||||
clutter_actor_paint (priv->cursor);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -904,9 +905,6 @@ clutter_entry_init (ClutterEntry *self)
|
|||||||
/ 72.0;
|
/ 72.0;
|
||||||
clutter_actor_set_size (CLUTTER_ACTOR (self), font_size * 20, 50);
|
clutter_actor_set_size (CLUTTER_ACTOR (self), font_size * 20, 50);
|
||||||
|
|
||||||
priv->cursor = clutter_rectangle_new_with_color (&priv->fgcol);
|
|
||||||
clutter_actor_set_parent (priv->cursor, CLUTTER_ACTOR (self));
|
|
||||||
|
|
||||||
priv->show_cursor = TRUE;
|
priv->show_cursor = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1183,8 +1181,6 @@ clutter_entry_set_color (ClutterEntry *entry,
|
|||||||
|
|
||||||
clutter_actor_set_opacity (actor, priv->fgcol.alpha);
|
clutter_actor_set_opacity (actor, priv->fgcol.alpha);
|
||||||
|
|
||||||
clutter_rectangle_set_color (CLUTTER_RECTANGLE (priv->cursor), &priv->fgcol);
|
|
||||||
|
|
||||||
if (CLUTTER_ACTOR_IS_VISIBLE (actor))
|
if (CLUTTER_ACTOR_IS_VISIBLE (actor))
|
||||||
clutter_actor_queue_redraw (actor);
|
clutter_actor_queue_redraw (actor);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user