mirror of
https://github.com/brl/mutter.git
synced 2024-11-27 02:20:43 -05:00
Bug 1085 - Cursor is in wrong position on ClutterEntry if set
x-align property * clutter/clutter-entry.c (clutter_entry_paint): When calculating the position to draw the cursor at, take into account the alignment of the text. Queue a redraw when the x-align property is changed.
This commit is contained in:
parent
cd7b7c9c72
commit
6b4a033efe
10
ChangeLog
10
ChangeLog
@ -1,3 +1,13 @@
|
|||||||
|
2008-08-18 Neil Roberts <neil@o-hand.com>
|
||||||
|
|
||||||
|
Bug 1085 - Cursor is in wrong position on ClutterEntry if set
|
||||||
|
x-align property
|
||||||
|
|
||||||
|
* clutter/clutter-entry.c (clutter_entry_paint): When calculating
|
||||||
|
the position to draw the cursor at, take into account the
|
||||||
|
alignment of the text. Queue a redraw when the x-align property is
|
||||||
|
changed.
|
||||||
|
|
||||||
2008-08-07 Neil Roberts <neil@o-hand.com>
|
2008-08-07 Neil Roberts <neil@o-hand.com>
|
||||||
|
|
||||||
Bug 1091 - WM_MOUSEWHEEL (scroll-event) not handled correctlly
|
Bug 1091 - WM_MOUSEWHEEL (scroll-event) not handled correctlly
|
||||||
|
@ -191,6 +191,7 @@ clutter_entry_set_property (GObject *object,
|
|||||||
break;
|
break;
|
||||||
case PROP_X_ALIGN:
|
case PROP_X_ALIGN:
|
||||||
entry->priv->x_align = g_value_get_double (value);
|
entry->priv->x_align = g_value_get_double (value);
|
||||||
|
clutter_actor_queue_redraw (CLUTTER_ACTOR (object));
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||||
@ -492,7 +493,7 @@ clutter_entry_paint (ClutterActor *self)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
priv->text_x = (actor_width - text_width) * priv->x_align;
|
priv->text_x = (actor_width - text_width) * priv->x_align;
|
||||||
priv->cursor_pos.x += priv->entry_padding;
|
priv->cursor_pos.x += priv->text_x + priv->entry_padding;
|
||||||
}
|
}
|
||||||
|
|
||||||
memcpy (&color, &priv->fgcol, sizeof (ClutterColor));
|
memcpy (&color, &priv->fgcol, sizeof (ClutterColor));
|
||||||
|
Loading…
Reference in New Issue
Block a user