mirror of
https://github.com/bancika/diy-layout-creator
synced 2026-11-10 17:22:09 +10:00
pot icon improvement
This commit is contained in:
Binary file not shown.
@@ -314,8 +314,13 @@ public class PotentiometerPanel extends AbstractPotentiometer {
|
|||||||
@Override
|
@Override
|
||||||
public void drawIcon(Graphics2D g2d, int width, int height) {
|
public void drawIcon(Graphics2D g2d, int width, int height) {
|
||||||
int margin = 4 * width / 32;
|
int margin = 4 * width / 32;
|
||||||
|
int waferMargin = 5 * width / 32;
|
||||||
int spacing = width / 3 - 1;
|
int spacing = width / 3 - 1;
|
||||||
|
g2d.setStroke(ObjectCache.getInstance().fetchBasicStroke(1 * width / 32));
|
||||||
|
g2d.setColor(WAFER_COLOR);
|
||||||
|
g2d.fillRect(waferMargin, height / 2, width - 2 * waferMargin, height / 3);
|
||||||
g2d.setColor(BORDER_COLOR);
|
g2d.setColor(BORDER_COLOR);
|
||||||
|
g2d.drawRoundRect(waferMargin, height / 2, width - 2 * waferMargin, height / 3, 2 * width / 32, 2 * width / 32);
|
||||||
g2d.setStroke(ObjectCache.getInstance().fetchBasicStroke(2 * width / 32));
|
g2d.setStroke(ObjectCache.getInstance().fetchBasicStroke(2 * width / 32));
|
||||||
g2d.drawLine(width / 2 - spacing, height / 2, width / 2 - spacing, height - margin);
|
g2d.drawLine(width / 2 - spacing, height / 2, width / 2 - spacing, height - margin);
|
||||||
g2d.drawLine(width / 2 + spacing, height / 2, width / 2 + spacing, height - margin);
|
g2d.drawLine(width / 2 + spacing, height / 2, width / 2 + spacing, height - margin);
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user