mirror of
https://github.com/brl/mutter.git
synced 2024-12-27 13:22:15 +00:00
test-text-field: Use ActorBox methods for the border
Clamp to pixel and use get_size() when painting the border of the text field.
This commit is contained in:
parent
3fdb0a5950
commit
2670fc5871
@ -12,8 +12,8 @@ on_entry_paint (ClutterActor *actor,
|
||||
gfloat width, height;
|
||||
|
||||
clutter_actor_get_allocation_box (actor, &allocation);
|
||||
width = allocation.x2 - allocation.x1;
|
||||
height = allocation.y2 - allocation.y1;
|
||||
clutter_actor_box_clamp_to_pixel (&allocation);
|
||||
clutter_actor_box_get_size (&allocation, &width, &height);
|
||||
|
||||
cogl_set_source_color4ub (255, 255, 255, 255);
|
||||
cogl_path_round_rectangle (0, 0, width, height, 4.0, 1.0);
|
||||
|
Loading…
Reference in New Issue
Block a user