Skip to content

Commit

Permalink
fix italic and small font for "alt hint" in chart tooltip
Browse files Browse the repository at this point in the history
Fix #4318
  • Loading branch information
mierin12 authored and buchen committed Nov 29, 2024
1 parent 1a23f59 commit 12fb0e8
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -228,15 +228,15 @@ protected void createComposite(Composite parent)

Label hint = new Label(data, SWT.WRAP);
hint.setText(Messages.TooltipHintPressAlt);
hint.setFont(this.resourceManager
.create(FontDescriptor.createFrom(data.getFont()).increaseHeight(-3).withStyle(SWT.ITALIC)));
// first set a small width and then update later
GridData hintData = GridDataFactory.fillDefaults().span(2, 1).hint(10, SWT.DEFAULT).span(2, 1).create();
hint.setLayoutData(hintData);

hint.getParent().pack();
hintData.widthHint = hint.getBounds().width;
hint.getParent().pack();
hint.setFont(this.resourceManager
.create(FontDescriptor.createFrom(data.getFont()).increaseHeight(-3).withStyle(SWT.ITALIC)));
}

private List<Pair<ISeries<?>, Double>> computeValues(ISeries<?>[] allSeries)
Expand Down

0 comments on commit 12fb0e8

Please sign in to comment.