mirror of
https://github.com/robertvokac/time-calc.git
synced 2025-03-25 07:27:49 +01:00
Added some improvements
This commit is contained in:
parent
7b649b37a7
commit
4ae7e1e962
@ -29,7 +29,7 @@ import java.awt.event.MouseMotionListener;
|
|||||||
public class Widget extends JPanel implements
|
public class Widget extends JPanel implements
|
||||||
GetProperty {
|
GetProperty {
|
||||||
|
|
||||||
public static final int CLOSE_BUTTON_SIDE = 20;
|
private static final int CLOSE_BUTTON_SIDE = 25;
|
||||||
protected static final Color FOREGROUND_COLOR = new Color(220, 220, 220);
|
protected static final Color FOREGROUND_COLOR = new Color(220, 220, 220);
|
||||||
protected static final Color FOREGROUND_COLOR2 = new Color(210, 210, 210);
|
protected static final Color FOREGROUND_COLOR2 = new Color(210, 210, 210);
|
||||||
protected static final Color BACKGROUND_COLOR = new Color(238, 238, 238);
|
protected static final Color BACKGROUND_COLOR = new Color(238, 238, 238);
|
||||||
@ -209,7 +209,7 @@ public class Widget extends JPanel implements
|
|||||||
brush.setColor(CLOSE_BUTTON_FOREGROUND_COLOR);
|
brush.setColor(CLOSE_BUTTON_FOREGROUND_COLOR);
|
||||||
Graphics2D brush2d = (Graphics2D) brush;
|
Graphics2D brush2d = (Graphics2D) brush;
|
||||||
brush2d.setStroke(new BasicStroke(2f));
|
brush2d.setStroke(new BasicStroke(2f));
|
||||||
int offset = 4;
|
int offset = 6;
|
||||||
brush.drawLine(width - CLOSE_BUTTON_SIDE - 1 + offset, 0 + 1 + offset,
|
brush.drawLine(width - CLOSE_BUTTON_SIDE - 1 + offset, 0 + 1 + offset,
|
||||||
width - 0 * CLOSE_BUTTON_SIDE - 1 - offset,
|
width - 0 * CLOSE_BUTTON_SIDE - 1 - offset,
|
||||||
0 + CLOSE_BUTTON_SIDE + 1 - offset);
|
0 + CLOSE_BUTTON_SIDE + 1 - offset);
|
||||||
|
@ -78,9 +78,9 @@ public class WalkingHumanProgress extends Widget implements
|
|||||||
brush.setColor(visibility.isStronglyColored() ? Color.BLUE :
|
brush.setColor(visibility.isStronglyColored() ? Color.BLUE :
|
||||||
visibility.isWeaklyColored() ? Color.GRAY :
|
visibility.isWeaklyColored() ? Color.GRAY :
|
||||||
Color.LIGHT_GRAY);
|
Color.LIGHT_GRAY);
|
||||||
if(mouseOver) {
|
// if(mouseOver) {
|
||||||
brush.drawRect(1,1,getWidth() - 2, getHeight() - 2);
|
// brush.drawRect(1,1,getWidth() - 2, getHeight() - 2);
|
||||||
}
|
// }
|
||||||
brush.setFont(SwingUtils.MEDIUM_MONOSPACE_FONT);
|
brush.setFont(SwingUtils.MEDIUM_MONOSPACE_FONT);
|
||||||
int y = SwingUtils.MARGIN;
|
int y = SwingUtils.MARGIN;
|
||||||
for (String line : lines) {
|
for (String line : lines) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user