Closed
Bug 161387
Opened 23 years ago
Closed 23 years ago
Patch: Improved label truncating for tabs
Categories
(Camino Graveyard :: Tabbed Browsing, enhancement)
Tracking
(Not tracked)
VERIFIED
FIXED
People
(Reporter: max, Assigned: sfraser_bugs)
Details
Attachments
(4 files, 1 obsolete file)
This patch implemented improved truncating for overlong tab labels in Chimera by taking
into account the real character widths.
Comment 4•23 years ago
|
||
patch available - cc: pinkerton
Status: UNCONFIRMED → NEW
Ever confirmed: true
| Assignee | ||
Comment 6•23 years ago
|
||
Comment on attachment 94265 [details] [diff] [review]
The patch
In discussion with Max, the code needs work.
Attachment #94265 -
Flags: needs-work+
As discussed on IRC, here's a new improved patch. Besides optimizing the
truncate method, it also works around a speed barrier in NSTabViewItem: for
very long labels, it will cause extreme slow down - since we were basically
doing everything label related ourselves anyway, I simply don't pass the label
thru to the super class anymore. Also, the truncated string is cached.
In total, Chimera now is a lot *faster* for pages with very long titles than it
used to be (e.g. loading an otherwise empty page with a 300 char title into a
tab is now instant, whereas it used to take 2-3 secs over here to display).
Attachment #94265 -
Attachment is obsolete: true
Gah, there is a small redrawing problem now. Seems that the tab view system relays on
setLabel being called. There is a simple fix, luckily: in my custom setLabel method, insert
this inside the if:
[super setLabel:@"foo"];
@"foo" is just random, it doesn't matter what text we pass (as long as it is short, long text
will cause slowdowns again). With that, all works perfect, as far as I can tell.
Are there any issues left with this Simon? I only ask because from a
discussion on IRC last week or so I had the impression you were trying
my latest patch, but since then nothing happend. If there are any issues,
please tell me so that I can fix 'em, but if you just had no time so far that's
alright of course :-)
| Assignee | ||
Comment 10•23 years ago
|
||
Sorry, just haven't had the cycles to test it and check in.
Status: NEW → ASSIGNED
| Assignee | ||
Comment 11•23 years ago
|
||
This patch breaks setting the label on tabs, even if I call [super setLabel:@"foo"];
| Assignee | ||
Comment 12•23 years ago
|
||
| Assignee | ||
Comment 13•23 years ago
|
||
The tab updating issue was my own. Ignore me ;)
| Assignee | ||
Comment 14•23 years ago
|
||
Patch has been checked in.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Updated•23 years ago
|
Component: General → Tabbed Browsing
QA Contact: winnie → sairuh
You need to log in
before you can comment on or make changes to this bug.
Description
•