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 677713 - pimp the sidebar
pimp the sidebar
Status: RESOLVED FIXED
Product: gnome-boxes
Classification: Applications
Component: general
unspecified
Other Linux
: Normal normal
: --
Assigned To: GNOME Boxes maintainer(s)
GNOME Boxes maintainer(s)
: 674665 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2012-06-08 13:59 UTC by Alexander Larsson
Modified: 2016-03-31 14:03 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add names to more actors for easier debugging (1.08 KB, patch)
2012-06-08 14:01 UTC, Alexander Larsson
committed Details | Review
Fix up indentation (770 bytes, patch)
2012-06-08 14:01 UTC, Alexander Larsson
committed Details | Review
Add shadow to sidebar (4.35 KB, patch)
2012-06-08 14:01 UTC, Alexander Larsson
committed Details | Review
Make properties sidebar look like mockup (2.83 KB, patch)
2012-06-08 14:01 UTC, Alexander Larsson
committed Details | Review
Make MiniGraphs look like mockup (2.44 KB, patch)
2012-06-08 14:01 UTC, Alexander Larsson
committed Details | Review
Fix bold in properties sidebar (1.23 KB, patch)
2012-06-08 14:13 UTC, Alexander Larsson
committed Details | Review

Description Alexander Larsson 2012-06-08 13:59:50 UTC
It doesn't look like the mockups
Comment 1 Alexander Larsson 2012-06-08 14:01:44 UTC
Created attachment 215959 [details] [review]
Add names to more actors for easier debugging
Comment 2 Alexander Larsson 2012-06-08 14:01:46 UTC
Created attachment 215960 [details] [review]
Fix up indentation
Comment 3 Alexander Larsson 2012-06-08 14:01:49 UTC
Created attachment 215961 [details] [review]
Add shadow to sidebar

We remove the background from the sidebar Gtk+ widgets and
put in an actor background with a shadow.
Comment 4 Alexander Larsson 2012-06-08 14:01:52 UTC
Created attachment 215962 [details] [review]
Make properties sidebar look like mockup
Comment 5 Alexander Larsson 2012-06-08 14:01:54 UTC
Created attachment 215963 [details] [review]
Make MiniGraphs look like mockup

Use the right colors and line widht. Stroke after fill.
Comment 6 Christophe Fergeau 2012-06-08 14:08:04 UTC
*** Bug 674665 has been marked as a duplicate of this bug. ***
Comment 7 Alexander Larsson 2012-06-08 14:13:06 UTC
Created attachment 215964 [details] [review]
Fix bold in properties sidebar

It seems the cell renderer doesn't pick up the css font weight.
Also, with the bold, drop the font size to compensate.
Comment 8 Zeeshan Ali 2012-06-08 14:47:18 UTC
Review of attachment 215959 [details] [review]:

ACK
Comment 9 Zeeshan Ali 2012-06-08 14:47:43 UTC
Review of attachment 215960 [details] [review]:

ACK
Comment 10 Zeeshan Ali 2012-06-11 21:12:09 UTC
Review of attachment 215961 [details] [review]:

Aside from the nitpicks, I also get loads of warnings on this one: http://fpaste.org/oDXL/

::: src/sidebar.vala
@@ -127,0 +129,12 @@
+        bin_actor = new Clutter.Actor ();
+        var bin = new Clutter.BinLayout (Clutter.BinAlignment.FILL,
+                                         Clutter.BinAlignment.FILL);
... 9 more ...

* indentation is off by 1char here i think (or splinter is messing it up)
* p -> pattern

@@ +145,3 @@
+           cr.rectangle (0, 0, w, h);
+           cr.fill ();
+           return true;

newline before return

@@ -127,0 +129,38 @@
+        bin_actor = new Clutter.Actor ();
+        var bin = new Clutter.BinLayout (Clutter.BinAlignment.FILL,
+                                         Clutter.BinAlignment.FILL);
... 35 more ...

No need to break a call on multiple lines if it fits 120chars.
Comment 11 Zeeshan Ali 2012-06-11 22:35:15 UTC
Review of attachment 215961 [details] [review]:

Weird that I only see a shadow on the right side if i revert this patch (only) in this series.

::: src/sidebar.vala
@@ -127,0 +129,21 @@
+        bin_actor = new Clutter.Actor ();
+        var bin = new Clutter.BinLayout (Clutter.BinAlignment.FILL,
+                                         Clutter.BinAlignment.FILL);
... 18 more ...

Do we need to explicitly invalidate if we move the canvas.set_size() call here after we have connected to draw signal?
Comment 12 Alexander Larsson 2012-06-12 06:40:48 UTC
Review of attachment 215961 [details] [review]:

To avoid the warnings you need:

http://git.gnome.org/browse/clutter/commit/?id=c0b3e2e83aca99541ef5eeb15549a482ecf4f7d7

::: src/sidebar.vala
@@ -127,0 +129,21 @@
+        bin_actor = new Clutter.Actor ();
+        var bin = new Clutter.BinLayout (Clutter.BinAlignment.FILL,
+                                         Clutter.BinAlignment.FILL);
... 18 more ...

No, so that seems cleaner.

@@ +150,3 @@
+        shadow.set_content (canvas);
+        shadow.set_content_gravity (Clutter.ContentGravity.RESIZE_FILL);
+        shadow.set_content_scaling_filters (Clutter.ScalingFilter.NEAREST, Clutter.ScalingFilter.NEAREST);

We can now use the new content repeat API instead of scaling here.
Comment 13 Zeeshan Ali 2012-06-12 13:55:22 UTC
(In reply to comment #12)
> Review of attachment 215961 [details] [review]:
> 
> To avoid the warnings you need:
> 
> http://git.gnome.org/browse/clutter/commit/?id=c0b3e2e83aca99541ef5eeb15549a482ecf4f7d7

Yeah, updating to latest clutter git master helps. Could you please bump our clutter dep in the same commit?
Comment 14 Zeeshan Ali 2012-06-12 14:02:03 UTC
Review of attachment 215962 [details] [review]:

Looks good, not just as in the code but the results as well. :)
Comment 15 Alexander Larsson 2012-06-13 09:23:11 UTC
There has been no clutter release with that patch, so we can't depend on it. Its just a warning though, so it can be ignored for now.
Comment 16 Zeeshan Ali 2012-06-13 12:28:00 UTC
(In reply to comment #15)
> There has been no clutter release with that patch, so we can't depend on it.

The version is bumped in clutter git master so we add depenendcy to that. Since clutter follows gnome release cycle(?), we can and IMO should do that. We do it with other deps all the time..

> Its just a warning though, so it can be ignored for now.

I don't think thats true cause I wasn't able to see the sidebar shadow before I updated my clutter install.
Comment 17 Alexander Larsson 2012-06-13 18:00:39 UTC
Ok, then we should bump the version definitely.
Comment 18 Alexander Larsson 2012-06-14 19:11:41 UTC
Attachment 215961 [details] pushed as cd718ff - Add shadow to sidebar
Attachment 215962 [details] pushed as 8820fc5 - Make properties sidebar look like mockup
Comment 19 Alexander Larsson 2012-06-14 19:20:28 UTC
Still two patches to review..
Comment 20 Zeeshan Ali 2012-06-15 00:19:16 UTC
Review of attachment 215963 [details] [review]:

I'm really not the expert of cairo so was hoping someone else reviews this but seems right and works.
Comment 21 Zeeshan Ali 2012-06-15 00:19:53 UTC
Review of attachment 215964 [details] [review]:

ACK
Comment 22 Zeeshan Ali 2012-06-15 00:20:06 UTC
Review of attachment 215963 [details] [review]:

I'm really not the expert of cairo so was hoping someone else reviews this but seems right and works.
Comment 23 Alexander Larsson 2012-06-15 11:09:22 UTC
Attachment 215963 [details] pushed as 2471e6a - Make MiniGraphs look like mockup
Attachment 215964 [details] pushed as 49b5e9e - Fix bold in properties sidebar