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 641879 - Shrink workspace thumbnails to prevent overflow
Shrink workspace thumbnails to prevent overflow
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Florian Müllner
gnome-shell-maint
: 642520 (view as bug list)
Depends on:
Blocks: 641880 641881
 
 
Reported: 2011-02-08 22:56 UTC by Owen Taylor
Modified: 2011-02-17 16:35 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Make a separate class for workspace thumbnails box (15.23 KB, patch)
2011-02-11 18:34 UTC, Owen Taylor
committed Details | Review
Improve allocation of workspace controls (2.58 KB, patch)
2011-02-11 18:34 UTC, Owen Taylor
committed Details | Review
Use a fixed width for visible portion of workspace thumbnails (3.07 KB, patch)
2011-02-11 18:34 UTC, Owen Taylor
committed Details | Review
workspacesView: Update zoom scale when controls are reallocated (4.95 KB, patch)
2011-02-11 18:34 UTC, Owen Taylor
committed Details | Review
Scale thumbnails to fit in the vertical space (8.72 KB, patch)
2011-02-11 18:34 UTC, Owen Taylor
none Details | Review
Scale thumbnails to fit in the vertical space (8.72 KB, patch)
2011-02-11 22:08 UTC, Owen Taylor
committed Details | Review

Description Owen Taylor 2011-02-08 22:56:18 UTC
As more workspaces are created than would fit in the allocated area, the thumbnails should scale down to fit. See:

 http://git.gnome.org/browse/gnome-shell-design/plain/mockups/static/overview-window-picker-9-workspaces.png
Comment 1 Owen Taylor 2011-02-11 18:34:11 UTC
Created attachment 180672 [details] [review]
Make a separate class for workspace thumbnails box

Add WorkspaceThumbnail.ThumbnailsBox to handle managing the array
of workspace thumbnails; the logic will get more complex as we add
scaling and animation.
Comment 2 Owen Taylor 2011-02-11 18:34:14 UTC
Created attachment 180673 [details] [review]
Improve allocation of workspace controls

Fix a bug in the computation of the zoomed-out scale and use a StBin
and instead of an unnecessary StBoxLayout. Using the StBin will allow
correct width-for-height behavior for the controls.
Comment 3 Owen Taylor 2011-02-11 18:34:17 UTC
Created attachment 180674 [details] [review]
Use a fixed width for visible portion of workspace thumbnails

We will change the workspace thumbnail size as we get more thumbnails; it doesn't
really make sense to always show 1/5 of the thumbnails how big or small they are,
so instead show a CSS-configurable length.
Comment 4 Owen Taylor 2011-02-11 18:34:20 UTC
Created attachment 180675 [details] [review]
workspacesView: Update zoom scale when controls are reallocated

The scale we zoom to in the "zoomed out" mode depends on the width of the
controls area. Once we rescale the workspaces dynamically, we'll need to
update the zoom scale as we add and remove workspaces.
Comment 5 Owen Taylor 2011-02-11 18:34:23 UTC
Created attachment 180676 [details] [review]
Scale thumbnails to fit in the vertical space

When we have more thumbnails than can fit in the vertical space, scale
them down. This is implemented by using a generic container so we can
compute positions and sizes on the fly and do the appropriate
width-for-height behavior.

The usage of clutter constraints to position the indicator is droppped
since it less complicated to just position the indicator in the right
place ourselves.
Comment 6 Owen Taylor 2011-02-11 22:08:06 UTC
Created attachment 180691 [details] [review]
Scale thumbnails to fit in the vertical space

Tiny fix to size allocation logic
Comment 7 Florian Müllner 2011-02-14 15:45:01 UTC
Comment on attachment 180676 [details] [review]
Scale thumbnails to fit in the vertical space

Attachment 180676 [details] has been updated, marking obsolete.
Comment 8 Owen Taylor 2011-02-16 23:52:34 UTC
*** Bug 642520 has been marked as a duplicate of this bug. ***
Comment 9 Florian Müllner 2011-02-17 14:49:24 UTC
Review of attachment 180672 [details] [review]:

Looks good.
Comment 10 Florian Müllner 2011-02-17 14:50:17 UTC
Review of attachment 180673 [details] [review]:

Looks good, except for a typo in the commit message: "use a StBin and instead of"
Comment 11 Florian Müllner 2011-02-17 15:19:06 UTC
Review of attachment 180674 [details] [review]:

Looks good.
Comment 12 Florian Müllner 2011-02-17 15:19:55 UTC
Review of attachment 180675 [details] [review]:

Yup.
Comment 13 Florian Müllner 2011-02-17 15:20:06 UTC
Review of attachment 180691 [details] [review]:

Looks good as well.

::: js/ui/workspaceThumbnail.js
@@ +464,3 @@
+            let y1 = Math.round(y);
+            let y2 = Math.round(y + thumbnailHeight);
+            let thisScale = (y2 - y1) / screenHeight;

Mmmh, variable names starting with "this" are slightly confusing in JS ...
Comment 14 Owen Taylor 2011-02-17 16:32:55 UTC
(In reply to comment #13)
> Review of attachment 180691 [details] [review]:
> 
> Looks good as well.
> 
> ::: js/ui/workspaceThumbnail.js
> @@ +464,3 @@
> +            let y1 = Math.round(y);
> +            let y2 = Math.round(y + thumbnailHeight);
> +            let thisScale = (y2 - y1) / screenHeight;
> 
> Mmmh, variable names starting with "this" are slightly confusing in JS ...

Yeah. changed to roundedScale locally.
Comment 15 Owen Taylor 2011-02-17 16:35:32 UTC
Attachment 180672 [details] pushed as ae5131f - Make a separate class for workspace thumbnails box
Attachment 180673 [details] pushed as 630f0f0 - Improve allocation of workspace controls
Attachment 180674 [details] pushed as 85ecd18 - Use a fixed width for visible portion of workspace thumbnails
Attachment 180675 [details] pushed as fb8f3f1 - workspacesView: Update zoom scale when controls are reallocated
Attachment 180691 [details] pushed as 0ef3f99 - Scale thumbnails to fit in the vertical space