Skip to content

Commit

Permalink
About box text colour matches that used in splash screen
Browse files Browse the repository at this point in the history
- Because of OCD
  • Loading branch information
Phillipus committed Feb 1, 2025
1 parent b329e5a commit 821f92a
Showing 1 changed file with 13 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,9 @@
import org.eclipse.jface.dialogs.TrayDialog;
import org.eclipse.jface.resource.JFaceResources;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.PaintEvent;
import org.eclipse.swt.events.PaintListener;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.Font;
import org.eclipse.swt.graphics.FontData;
import org.eclipse.swt.graphics.Image;
Expand Down Expand Up @@ -156,19 +155,18 @@ private void createAboutTab() {
smallFont.dispose();
});

imageControl.addPaintListener(new PaintListener() {
@Override
public void paintControl(PaintEvent e) {
int fontHeight = e.gc.getFontMetrics().getHeight() + 2;

e.gc.drawImage(image, 0, 0);
e.gc.drawString(version, 19, 166, true);
e.gc.drawString(build, 19, 166 + fontHeight, true);

e.gc.setFont(smallFont);
fontHeight = e.gc.getFontMetrics().getHeight() + 2;
e.gc.drawString(copyright, 12, imageHeight - fontHeight - 5, true);
}
imageControl.addPaintListener(e -> {
int fontHeight = e.gc.getFontMetrics().getHeight() + 2;

e.gc.setForeground(new Color(35, 35, 140));

e.gc.drawImage(image, 0, 0);
e.gc.drawString(version, 19, 166, true);
e.gc.drawString(build, 19, 166 + fontHeight, true);

e.gc.setFont(smallFont);
fontHeight = e.gc.getFontMetrics().getHeight() + 2;
e.gc.drawString(copyright, 12, imageHeight - fontHeight - 5, true);
});
}

Expand Down

0 comments on commit 821f92a

Please sign in to comment.