Skip to content

Commit

Permalink
Empty DiagramImageFigure should have white background
Browse files Browse the repository at this point in the history
- If DiagramImageFigure has no image paint an opaque white background in case we are using a dark theme
  • Loading branch information
Phillipus committed Aug 10, 2023
1 parent 8a9012a commit 624cb9f
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
*/
package com.archimatetool.editor.diagram.figures.diagram;

import org.eclipse.draw2d.ColorConstants;
import org.eclipse.draw2d.Graphics;
import org.eclipse.draw2d.GridLayout;
import org.eclipse.draw2d.IFigure;
Expand Down Expand Up @@ -120,7 +121,8 @@ protected void paintFigure(Graphics graphics) {
}
}
else {
super.paintFigure(graphics);
graphics.setBackgroundColor(ColorConstants.white);
graphics.fillRectangle(bounds);
Image image = IArchiImages.ImageFactory.getImage(IArchiImages.ICON_LANDSCAPE);
graphics.drawImage(image, bounds.x + (bounds.width / 2) - 7, bounds.y + (bounds.height / 2) - 7);
}
Expand Down

0 comments on commit 624cb9f

Please sign in to comment.