mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-30 20:35:38 +02:00
Bug 580248: Allow widget baseline to be less than font baseline
The removed assertion was overly harsh and some combinations of fonts
and text meant that the assertion was being hit. This code
was based on LineNumberRulerColumn (platform.text) which has long
since removed the assertion - see
3e70d44d64
for the removed assertion.
Note that this change simply removes the assertion and does not
address all the possibilities of mixed fonts. I suspect that there
may be some (hopefully) small drawing errors if such mixed fonts
are used. This code (unlike platform text) will continue to
assume all lines are the same height.
Change-Id: I3801b05c96e2784aabe53b3a503dbdb86e6e10c0
This commit is contained in:
parent
98d375756a
commit
b1011b0a82
1 changed files with 1 additions and 2 deletions
|
@ -893,9 +893,8 @@ public class DisassemblyRulerColumn extends AbstractContributedRulerColumn imple
|
|||
int widgetBaseline = fCachedTextWidget.getBaseline();
|
||||
FontMetrics fm = gc.getFontMetrics();
|
||||
int fontBaseline = fm.getAscent() + fm.getLeading();
|
||||
Assert.isTrue(widgetBaseline >= fontBaseline);
|
||||
int baselineBias = widgetBaseline - fontBaseline;
|
||||
return baselineBias;
|
||||
return Math.max(0, baselineBias);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Reference in a new issue