Closed Bug 629898 Opened 15 years ago Closed 15 years ago

Set min-width on statuspanel for less jitter

Categories

(Firefox :: General, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 4.0b12

People

(Reporter: jag+mozilla, Assigned: dao)

References

Details

(Keywords: polish)

Attachments

(1 file)

From bug 628654 comment 58: Eddward 2011-01-29 07:26:23 PST Is it possible to set minimal width like it is in Chrome (~340px)? Dynamic width is very annoying... Looks like something like this does the trick (should be merged, replace left:auto, etc.): statuspanel, statuspanel:-moz-locale-dir(ltr)[mirror], statuspanel:-moz-locale-dir(rtl):not([mirror]) { min-width: 400px; // More? Less? } .statuspanel-inner { width: 100%; }
Yes, this is exactly what I want to see. It's much better now :)
Blocks: 628654
Keywords: polish
Attached patch patchSplinter Review
This starts with a 25% min-width and lets the statuspanel grow but not shrink for value changes, until the value gets reset.
Assignee: nobody → dao
Status: NEW → ASSIGNED
Attachment #508134 - Flags: review?(gavin.sharp)
Comment on attachment 508134 [details] [diff] [review] patch > left: 0; >+ min-width: 25%; >+ max-width: 50%; > } > > statuspanel:-moz-locale-dir(ltr)[mirror], > statuspanel:-moz-locale-dir(rtl):not([mirror]) { > left: auto; When I was playing with this in userChrome.css I needed to specify min-width for these two selectors explicitly, apparently to override the "left: auto". I wonder if you need that here too. > <implementation> > <property name="label"> > <setter> >- if (!this.label) >+ if (!this.label) { > this.removeAttribute("mirror"); >+ this.style.minWidth = ""; Not "25%"?
(In reply to comment #3) > > left: 0; > >+ min-width: 25%; > >+ max-width: 50%; > > } > > > > statuspanel:-moz-locale-dir(ltr)[mirror], > > statuspanel:-moz-locale-dir(rtl):not([mirror]) { > > left: auto; > > When I was playing with this in userChrome.css I needed to specify min-width > for these two selectors explicitly, apparently to override the "left: auto". I > wonder if you need that here too. I don't think so, this seemed to work just fine. > > <implementation> > > <property name="label"> > > <setter> > >- if (!this.label) > >+ if (!this.label) { > > this.removeAttribute("mirror"); > >+ this.style.minWidth = ""; > > Not "25%"? "" resets the style attribute, causing the min-width as specified in the stylesheet to be used.
> I don't think so, this seemed to work just fine. Awesome. I'll try this patch and see what happens here. > "" resets the style attribute, causing the min-width as specified in > the stylesheet to be used. Right, duh.
Comment on attachment 508134 [details] [diff] [review] patch Yep, works. I forgot to test removing the additional min-width after I added the width: 100% to .statuspanel-inner. r=jag if you want it.
Attachment #508134 - Flags: review+
Attachment #508134 - Flags: approval2.0?
So, can someone approve it please?
This might not show up in the "approval?" queries due to an open "review?". Gavin, wanna have a quick look?
Attachment #508134 - Flags: review?(gavin.sharp)
Attachment #508134 - Flags: review+
Attachment #508134 - Flags: approval2.0?
Attachment #508134 - Flags: approval2.0+
Keywords: checkin-needed
I need to update this for bug 541656.
Keywords: checkin-needed
http://hg.mozilla.org/mozilla-central/rev/2f353922a56c Bug 541656 added statuspanel { -moz-transition: opacity 100ms ease-out }, so other than merging, I added statuspanel[label=""] { -moz-transition: none } so that the statuspanel fades in when it gets a label but not out when it loses the label. Without the min-width it didn't fade out either, as it would immediately shrink to width 0 without a label.
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 4.0b12
Depends on: 631298
Depends on: 631194
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: