public WarningDetailView(Composite parent, int style) {
super(parent, style, false);
this.setLayout(new FillLayout());
- canvas = new Canvas(this, SWT.NONE);
+
+ Composite contents = getContentArea();
+ contents.setBackground(ColorResources.VIEW_BG_COLOR);
+ contents.setLayout(new FillLayout());
+ canvas = new Canvas(contents, SWT.TRANSPARENT);
canvas.addPaintListener(detailPaintListener);
- canvas.setBackground(ColorResources.DIALOG_BG_UPPER);
selectionViewId = SummaryPage.warningListViewID;
}
public void paintControl(PaintEvent e) {
Rectangle rect = canvas.getBounds();
int width = rect.width - 20;
- e.gc.setFont(FontResources.TABLE_CELL_FONT);
- e.gc.setForeground(ColorResources.DEFAULT_FONT_COLOR);
+ e.gc.setBackground(ColorResources.VIEW_BG_COLOR);
+ e.gc.fillRectangle(rect.x, rect.y, rect.width, rect.height);
+ e.gc.setForeground(ColorResources.TABLE_CONTENTS_FONT_COLOR);
+ e.gc.setFont(FontResources.DETAIL_INFO_FONT);
+
String text = warningMessage;
Point titleSize = e.gc.textExtent(titleText, SWT.DRAW_MNEMONIC);
int fontHeight = titleSize.y + 5;