This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 195471 - Patch for: [70cat] CVS annotations user names are cut off
Summary: Patch for: [70cat] CVS annotations user names are cut off
Status: RESOLVED FIXED
Alias: None
Product: versioncontrol
Classification: Unclassified
Component: CVS (show other bugs)
Version: 7.0
Hardware: PC Windows XP
: P3 normal (vote)
Assignee: Ondrej Vrabec
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-14 20:31 UTC by matthies
Modified: 2013-03-25 14:01 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Screenshot (2.85 KB, image/png)
2011-02-14 20:32 UTC, matthies
Details
Patch for solving the issue in the annotation bar (2.66 KB, patch)
2012-11-16 00:40 UTC, markiewb
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description matthies 2011-02-14 20:31:47 UTC
See the attached screenshot. What looks like "nr" should actually be "nm". It seems that the width is not correctly calculated.
Comment 1 matthies 2011-02-14 20:32:29 UTC
Created attachment 105997 [details]
Screenshot
Comment 2 Ondrej Vrabec 2012-11-15 10:45:39 UTC
*** Bug 222183 has been marked as a duplicate of this bug. ***
Comment 3 markiewb 2012-11-16 00:40:15 UTC
Created attachment 127902 [details]
Patch for solving the issue in the annotation bar

I like to propose a patch to solve the issue with the annotation bar.

Cause of the issue: "texts with the same number of chars may have different widths in non-monospaced fonts. for example: 'nr' and 'nm' - so we have to calculate the widest one"


@NetBeans-Dev: 
a) Please review, discuss and commit. 
b) Can you also recheck the implementation against the git/svn/hg-impl? 
git - uses monospaced font in annotation bar
svn - ??? not tested
hg  - uses non-monospaced font in annotation bar
cvs - used non-monospaced font in annotation bar
c) Please note that the issue with the truncated username in the tooltip from the closed duplicate http://netbeans.org/bugzilla/show_bug.cgi?id=222183 is not part of this patch and is still unresolved
Comment 4 Ondrej Vrabec 2012-11-16 10:48:41 UTC
b) cvs, svn and hg work the same way. Git is different, it paints the bar in the same font as is set in the editor, however when user sets non-monospaced font for editor git will face the same problem
c) i reopened the bug, let's find solution for the tooltip there
a) your patch works correctly, however i am afraid of performance impacts. For files with a lot lot of lines it could take some time. I saw slownesses in Search History where we're trying to get the width for all items in the summary view. Wouldn't the best solution here be to paint everything in the bar in monospace font? Or e.g. paint in the same font as in editor and in case it's not a monospace font only then use your width computation?
Comment 5 Ondrej Vrabec 2013-03-25 13:51:16 UTC
I will apply your patch but in case of any performance problems be ready to take responsibility and fix it.
Comment 6 Ondrej Vrabec 2013-03-25 14:01:24 UTC
applied: core-main #5a1cea350118