Closed
Bug 823844
Opened 13 years ago
Closed 13 years ago
[Gallery] There is a blank column in the Landscape mode
Categories
(Firefox OS Graveyard :: Gaia::Gallery, defect)
Tracking
(blocking-basecamp:+, b2g18+ fixed)
VERIFIED
FIXED
| blocking-basecamp | + |
People
(Reporter: johnshih.bugs, Assigned: rexboy)
Details
Attachments
(3 files)
## Environment :
Unagi phone, release build 2012-12-21
Build info:
release/gaia: 7856aefc6e7408e4c097c5a0ec3894dfa7ed9d09
release/gecko : 2f6937efe465d8520c6c1b3583c4ce4e999fbacf
## Repro :
1. Launch the gallery
2. Rotate the phone with 90 degree to switch into landscape mode
## Expected:
* The pictures will full of the screen
## Actual:
* There is a blank column in the right of the screen which looks buggy
| Assignee | ||
Comment 1•13 years ago
|
||
I've encountered this problem when adjusting for multi-resolution. Taking.
Assignee: nobody → rexboy
Updated•13 years ago
|
blocking-basecamp: ? → +
tracking-b2g18:
--- → +
| Assignee | ||
Comment 2•13 years ago
|
||
We've changed .thumbnail from using border-right to margin-right as a separator but left its width unchanged on landscape mode. Each .thumbnail is thus widen by 1 pixels according to border-box model, making unnecessary newline. Suggesting just set 1 pixel shorter on width.
Attachment #695447 -
Flags: review?(david)
| Assignee | ||
Comment 3•13 years ago
|
||
Comment on attachment 695447 [details]
Patch
Dale is reviewing this issue, so I set r? to him. Thanks!
Attachment #695447 -
Flags: review?(david) → review?(dale)
Comment 4•13 years ago
|
||
I've noticed the same behavior since about two weeks on Nexus S, both in landscape and portrait orientation.
Comment 5•13 years ago
|
||
Screenshot on Nexus S, exposing the issue. It happens both in portrait (in the screenshot) and landscape orientation. One can notice that the black part on the right, which should be used as a third columns, is roughly the correct width.
Updated•13 years ago
|
OS: Windows 7 → Gonk (Firefox OS)
Hardware: x86_64 → ARM
Comment 6•13 years ago
|
||
After testing, I think that while the proposed patch works, it's just a workaround of the real issue. Each picture is a thumbnail class, contained in the #thumbnail element.
So we have:
#thumbnails {
position: absolute;
left: 0;
width: calc(100% + 1px); /* one extra pixel for the right margin */
/* top and bottom are set depending on view below */
padding: 0;
margin: 0;
overflow-y: scroll;
overflow-x: hidden;
}
And
.thumbnail {
margin-right: 1px;
margin-bottom: 1px;
padding: 0;
/* default to left-to-right, but overridden for rtl languages below */
float: left;
/* no list item bullets */
list-style-type: none;
/* don't let the user select the items */
-moz-user-select: none;
/* thumbnail images will be displayed with background-image */
/* these properties scale and position the images correctly */
background-size: cover; /* allow some cropping */
background-position: center; /* keep the cropping at the edges */
background-repeat: no-repeat;
/*
* When we have a background image it will cover the whole thumbnail
* but when we're swapping that image in it might be visible before
* the image. So we want a color that contrasts with the border so we
* at least get the effect of a grid rather than a black screen
*/
background-color: #444;
}
Pay attention to the "margin-right: 1px;" statement in .thumbnail, and remember the width declared in #thumbnails:
#thumbnails {
[...]
width: calc(100% + 1px); /* one extra pixel for the right margin */
[...]
}
And
.thumbnail {
margin-right: 1px;
[...]
}
So, each picture will participate with a 1px extra width, while the container has only 1px extra width. With three columns, we have 3px extra width provided by pictures, which makes it impossible to fit in the width: calc(100% + 1px);.
Changing to "width: calc(100% + 3px);" fixes the issue in portrait mode, but not in landscape. Changing to "width: calc(100% + 5px);" fixes the issue in portrait mode and in landscape. This confirms the explained behavior.
Comment 7•13 years ago
|
||
Changing to "width: 101%;" gives correct view in both portrait and landscape orientation, on Nexus S at least.
Comment 8•13 years ago
|
||
Comment on attachment 695447 [details]
Patch
Merged in: https://github.com/mozilla-b2g/gaia/commit/4a05c09cb5dfb7227d2e909f55b8dfc68d282f5d
Attachment #695447 -
Flags: review?(dale) → review+
Comment 9•13 years ago
|
||
Just to clarify for Alexandre, 120 and 160 divides into 800 / 480 well, the images were originally those width but with the change from border to margin they got an extra 1px which is what caused this
The +1px is for images that are 107px into 320px width (this is actually the only 'correct' version as it perfectly aligns 3 * 107 with the right 1px border being hidden, the rest will show a 1px border to the right, but sufficient.
Updated•13 years ago
|
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Comment 10•13 years ago
|
||
Verified as fixed in build 20130103070201 on Unagi.
Updated•13 years ago
|
status-b2g18:
--- → fixed
You need to log in
before you can comment on or make changes to this bug.
Description
•