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 672560 - Call window inline toolbar borders are not crisp
Call window inline toolbar borders are not crisp
Status: RESOLVED FIXED
Product: empathy
Classification: Core
Component: VoIP
3.3.x
Other Linux
: Normal normal
: ---
Assigned To: empathy-maint
empathy-maint
Depends on: 656877
Blocks:
 
 
Reported: 2012-03-21 15:02 UTC by Cosimo Cecchi
Modified: 2012-03-27 13:18 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
screenshot (201.84 KB, image/png)
2012-03-21 15:03 UTC, Cosimo Cecchi
  Details
call-window: fix incorrect comment (1.21 KB, patch)
2012-03-22 22:42 UTC, Cosimo Cecchi
committed Details | Review
call-window: use a ClutterBoxLayout to separate previews/toolbar (16.39 KB, patch)
2012-03-22 22:42 UTC, Cosimo Cecchi
committed Details | Review
call-window: don't use EmpathyRoundedActor for the floating toolbar (5.67 KB, patch)
2012-03-22 22:42 UTC, Cosimo Cecchi
committed Details | Review
call-window: factor out some common code (3.60 KB, patch)
2012-03-22 22:42 UTC, Cosimo Cecchi
committed Details | Review

Description Cosimo Cecchi 2012-03-21 15:02:45 UTC
See attached screenshot.
Comment 1 Cosimo Cecchi 2012-03-21 15:03:05 UTC
Created attachment 210247 [details]
screenshot
Comment 2 Guillaume Desmottes 2012-03-22 07:58:47 UTC
You mean the rounded corners are not anti-aliased? That's because we had to do it manually using cogl as Clutter doesn't support this yet: bug #656877
Comment 3 Cosimo Cecchi 2012-03-22 22:42:43 UTC
Created attachment 210386 [details] [review]
call-window: fix incorrect comment
Comment 4 Cosimo Cecchi 2012-03-22 22:42:50 UTC
Created attachment 210387 [details] [review]
call-window: use a ClutterBoxLayout to separate previews/toolbar

It's way easier to use a ClutterBoxLayout to ensure the preview
rectangles and the floating toolbar don't overlap.
This way, we can get rid of some complicated manual UI layouting code
and just a margin to set the bottom spacing for the floating toolbar.
Also, this makes the code not dependent on a hardcoded toolbar size
anymore.
Comment 5 Cosimo Cecchi 2012-03-22 22:42:53 UTC
Created attachment 210388 [details] [review]
call-window: don't use EmpathyRoundedActor for the floating toolbar

Make this a real toolbar, and add a CSS provider to set the correct
border radius.
In the future, GTK and Adwaita will support an 'OSD' style class that
takes care of this automatically, but right now we have add these few
lines of code.
Comment 6 Cosimo Cecchi 2012-03-22 22:42:57 UTC
Created attachment 210389 [details] [review]
call-window: factor out some common code
Comment 7 Guillaume Desmottes 2012-03-23 08:22:31 UTC
Review of attachment 210386 [details] [review]:

++
Comment 8 Guillaume Desmottes 2012-03-23 08:34:38 UTC
Review of attachment 210387 [details] [review]:

Nice cleanup, thanks!

::: src/empathy-call-window.c
@@ +643,1 @@
+  clutter_bin_layout_add (CLUTTER_BIN_LAYOUT (self->priv->preview_layout), 

You introduced a trailing space here making git a sad panda.

@@ +1667,3 @@
+
+  clutter_bin_layout_add (CLUTTER_BIN_LAYOUT (priv->video_layout),
+      priv->overlay_box, 

trailing space here too
Comment 9 Guillaume Desmottes 2012-03-23 09:01:54 UTC
Review of attachment 210388 [details] [review]:

::: src/empathy-call-window.c
@@ +1598,3 @@
+  provider = gtk_css_provider_new ();
+  gtk_css_provider_load_from_data (provider,
+      "#CallFloatingToolbar { border-radius: 6px; }", -1, NULL);

Wouldn't be cleaner to use a proper css file? That's something I'm considering to use anyway: bug #669473

::: src/empathy-call-window.ui
@@ +257,3 @@
             <property name="visible">True</property>
             <property name="homogeneous">False</property>
+            <property name="show_arrow">False</property>

You should remove the homogeneous property to fix:
Gtk-WARNING **: Unknown property: GtkToolbar.homogeneous
Comment 10 Guillaume Desmottes 2012-03-23 09:02:17 UTC
Review of attachment 210389 [details] [review]:

++
Comment 11 Cosimo Cecchi 2012-03-23 13:47:14 UTC
(In reply to comment #9)

> Wouldn't be cleaner to use a proper css file? That's something I'm considering
> to use anyway: bug #669473

Thanks for the review.

Hmm, as I wrote in the commit message, ideally this wouldn't need additional CSS, but would be available to applications as a "stock" OSD style class, which will happen for 3.6 in all likelihood.
For this reason I preferred having an embedded style provider here instead of an application CSS file (which is usually problematic for themes != Adwaita).

I could probably add a comment in the code to explain it's a temporary workaround if you want.
Comment 12 Guillaume Desmottes 2012-03-23 14:01:37 UTC
(In reply to comment #11)

> I could probably add a comment in the code to explain it's a temporary
> workaround if you want.

Sounds good to me.
Comment 13 Guillaume Desmottes 2012-03-27 07:06:31 UTC
2.4.0 has been released; feel free to merge.
Comment 14 Cosimo Cecchi 2012-03-27 13:18:07 UTC
Attachment 210386 [details] pushed as 60e0705 - call-window: fix incorrect comment
Attachment 210387 [details] pushed as d9c6227 - call-window: use a ClutterBoxLayout to separate previews/toolbar
Attachment 210388 [details] pushed as 3873c83 - call-window: don't use EmpathyRoundedActor for the floating toolbar
Attachment 210389 [details] pushed as d9765b1 - call-window: factor out some common code

Pushed to master, thanks.