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 595023 - activities icons not fully on screen
activities icons not fully on screen
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2009-09-12 20:50 UTC by Luis Villa
Modified: 2009-09-25 01:51 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Icons in upper left are hanging off side of screen. (369.98 KB, image/png)
2009-09-12 20:50 UTC, Luis Villa
  Details
[AppWell] Fall back to fewer than 4 columns if space limited (4.20 KB, patch)
2009-09-17 17:33 UTC, Colin Walters
none Details | Review
[AppWell] Fall back to fewer than 4 columns if space limited (4.22 KB, patch)
2009-09-24 04:00 UTC, Marina Zhurakhinskaya
none Details | Review
[AppWell] Fall back to fewer than 4 columns if space limited (4.21 KB, patch)
2009-09-24 04:04 UTC, Marina Zhurakhinskaya
committed Details | Review

Description Luis Villa 2009-09-12 20:50:32 UTC
Created attachment 143082 [details]
Icons in upper left are hanging off side of screen.

As shown in attached screenshot, the activities icons don't slide all the way
in for me- some of them are off the left side of the screen.

This is with trunk as of today (Sat.... something, I miss the popup calendar ;)
plus F11, intel graphics.
Comment 1 Colin Walters 2009-09-13 18:13:57 UTC
This looks like a failure when we can't fit 4 columns onto the screen.  In the output do you see a warning like "WellGrid: trying to allocate for width..."?

I'm fairly shortly going to get a netbook with a similar resolution =)
Comment 2 Luis Villa 2009-09-13 18:20:19 UTC
No, nothing like that on the console. Note that I'm not running enough apps (AFAICT) to justify needing four columns?
Comment 3 Colin Walters 2009-09-17 17:33:17 UTC
Created attachment 143386 [details] [review]
[AppWell] Fall back to fewer than 4 columns if space limited

First eliminate the variable WELL_ITEM_HSPACING since it was 0
and thus effectively was not used.

Add a new variable WELL_ITEM_MIN_HSPACING which is the minimum
space between grid items we allow.  When computing layout, allow
for a number of columns less than 4 by using the minimum item
size.
Comment 4 Marina Zhurakhinskaya 2009-09-24 04:00:26 UTC
Created attachment 143859 [details] [review]
[AppWell] Fall back to fewer than 4 columns if space limited

This is Colin's patch, rebased to the latest on master.

The patch looks good. One place that needs to be changed:

+            while (nColumns <= WELL_DEFAULT_COLUMNS &&
+                   nColumns <= children.length &&
+                   usedWidth <= forWidth) {
+                usedWidth += itemMinWidth;
+                nColumns++;
+            }
+            let minSizedHorizSpacingTotal = forWidth - (nColumns * itemMinWidth);
+            let allowedMinHorizSpacingTotal = Math.max(nColumns - 1, 0) * WELL_ITEM_MIN_HSPACING;
+            if (allowedMinHorizSpacingTotal > minSizedHorizSpacingTotal)
+                nColumns--;
+        }

The while loop increments nColumns one extra time. However, the end result is fine because nColumns is just always adjusted in the code that follows the while loop.

I think the code below should produce the same result and is shorter. I added a comment to compensate :). I was initially unsure why WELL_ITEM_MIN_HSPACING is only used in that one place, so thought that could use an explanation.

while (nColumns < WELL_DEFAULT_COLUMNS &&
       nColumns < children.length &&
       usedWidth + itemMinWidth <= forWidth) {
    // By including WELL_ITEM_MIN_HSPACING in usedWidth, we are ensuring
    // that the number of columns we end up with will allow the spacing
    // between the columns to be at least that value.
    usedWidth += itemMinWidth + WELL_ITEM_MIN_HSPACING;
    nColumns++;
}
Comment 5 Marina Zhurakhinskaya 2009-09-24 04:04:22 UTC
Created attachment 143860 [details] [review]
[AppWell] Fall back to fewer than 4 columns if space limited

A patch with the change that I proposed in the previous comment.
Comment 6 Colin Walters 2009-09-25 01:28:13 UTC
Comment on attachment 143860 [details] [review]
[AppWell] Fall back to fewer than 4 columns if space limited

Sure.