mirror of
https://github.com/bancika/diy-layout-creator
synced 2026-11-10 17:22:09 +10:00
Remove toggle interaction with pot back
This commit is contained in:
+11
-4
@@ -308,14 +308,21 @@ public class MiniToggleSwitch extends AbstractTransparentComponent<ToggleSwitchT
|
||||
}
|
||||
|
||||
for (Point2D p : controlPoints) {
|
||||
if (outlineMode) {
|
||||
if (outlineMode) {
|
||||
g2d.setColor(Constants.TRANSPARENT_COLOR);
|
||||
drawingObserver.startTrackingContinuityArea(true);
|
||||
g2d.fillRect((int)(p.getX() - lugWidth / 2), (int)(p.getY() - lugHeight / 2), lugWidth, lugHeight);
|
||||
drawingObserver.stopTrackingContinuityArea();
|
||||
|
||||
g2d.setColor(theme.getOutlineColor());
|
||||
g2d.drawRect((int)(p.getX() - lugWidth / 2), (int)(p.getY() - lugHeight / 2), lugWidth, lugHeight);
|
||||
g2d.drawRect((int)(p.getX() - lugWidth / 2), (int)(p.getY() - lugHeight / 2), lugWidth, lugHeight);
|
||||
} else {
|
||||
g2d.setColor(CIRCLE_COLOR);
|
||||
g2d.fillOval((int)(p.getX() - circleDiameter / 2), (int)(p.getY() - circleDiameter / 2), circleDiameter, circleDiameter);
|
||||
g2d.setColor(METAL_COLOR);
|
||||
g2d.fillRect((int)(p.getX() - lugWidth / 2), (int)(p.getY() - lugHeight / 2), lugWidth, lugHeight);
|
||||
g2d.setColor(METAL_COLOR);
|
||||
drawingObserver.startTrackingContinuityArea(true);
|
||||
g2d.fillRect((int)(p.getX() - lugWidth / 2), (int)(p.getY() - lugHeight / 2), lugWidth, lugHeight);
|
||||
drawingObserver.stopTrackingContinuityArea();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -279,10 +279,10 @@ public class PotentiometerPanel extends AbstractPotentiometer {
|
||||
g2d.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 1f * alpha / MAX_ALPHA));
|
||||
}
|
||||
if (!outlineMode) {
|
||||
if (i == 3)
|
||||
if (i >= 3 && i <= 6)
|
||||
drawingObserver.startTrackingContinuityArea(true);
|
||||
g2d.fill(shape);
|
||||
if (i == 3)
|
||||
if (i >= 3 && i <= 6)
|
||||
drawingObserver.stopTrackingContinuityArea();
|
||||
}
|
||||
g2d.setComposite(oldComposite);
|
||||
|
||||
Reference in New Issue
Block a user