After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 671720 - The video preview is not rounded the same way as its highlight rectangle
The video preview is not rounded the same way as its highlight rectangle
Status: RESOLVED FIXED
Product: empathy
Classification: Core
Component: VoIP
3.3.x
Other Linux
: Normal normal
: ---
Assigned To: Emanuele Aina
empathy-maint
Depends on:
Blocks:
 
 
Reported: 2012-03-09 13:50 UTC by Emanuele Aina
Modified: 2012-03-12 12:02 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Match the preview highlight roundedness with the video (8.43 KB, patch)
2012-03-09 16:25 UTC, Emanuele Aina
none Details | Review
Rebased on top of the clutter-api branch (8.43 KB, patch)
2012-03-12 08:53 UTC, Emanuele Aina
reviewed Details | Review
Pass the roundedness factor to empathy_[actor|rectangle]_new() (10.96 KB, patch)
2012-03-12 11:43 UTC, Emanuele Aina
committed Details | Review

Description Emanuele Aina 2012-03-09 13:50:32 UTC
In the clutter call window the highlight rectangle has a different roundedness size than the video preview, as one is specified in absolute pixels while the other as a ratio based on the height of the actor.
Comment 1 Emanuele Aina 2012-03-09 16:25:41 UTC
Created attachment 209325 [details] [review]
Match the preview highlight roundedness with the video

Add empathy_rounded_rectangle_set_round_factor() to have the same roundedness
on the preview video and related highlight/placeholders.
Comment 2 Emanuele Aina 2012-03-12 08:53:06 UTC
Created attachment 209462 [details] [review]
Rebased on top of the clutter-api branch

Re-spin, this time basing the patch on the following branch:
http://cgit.collabora.com/git/user/cassidy/empathy/log/?h=clutter-api 
(well, actually a fast-forwarded version of it on top of master)
Comment 3 Emanuele Aina 2012-03-12 09:12:46 UTC
Whole branch available at http://cgit.collabora.com/git/user/em/empathy.git/log/?h=fix-highlight-roundedness-671720
Comment 4 Guillaume Desmottes 2012-03-12 10:17:02 UTC
Review of attachment 209462 [details] [review]:

::: src/empathy-call-window.c
@@ +649,3 @@
+      SELF_VIDEO_SECTION_HEIGHT + 2 * SELF_VIDEO_SECTION_MARGIN);
+
+  empathy_rounded_rectangle_set_round_factor (rectangle, PREVIEW_ROUND_FACTOR);

As we never change it afterward (which makes sense), wouldn't be best to pass the round-factor to _new() directly?

@@ +670,2 @@
   clutter_container_add_actor (CLUTTER_CONTAINER (box1), box2);
+  clutter_container_add_actor (CLUTTER_CONTAINER (box2), CLUTTER_ACTOR(rectangle));

Should be 'CLUTTER_ACTOR (rectangle)'.

@@ +674,3 @@
       box1, x, y);
 
+  clutter_actor_hide (CLUTTER_ACTOR(rectangle));

same here.

@@ +678,1 @@
+  return CLUTTER_ACTOR(rectangle);

ditto
Comment 5 Emanuele Aina 2012-03-12 11:43:07 UTC
Created attachment 209470 [details] [review]
Pass the roundedness factor to empathy_[actor|rectangle]_new()

Drop the empathy_[actor|rectangle]_set_round_factor() functions and
pass the roundedness factor to the contructor as it cannot be
changed.
Also fixed some coding style issues.