mirror of
https://github.com/dmolony/DiskBrowser.git
synced 2025-02-08 17:30:40 +00:00
removed block grid lines
This commit is contained in:
parent
67d3cb87bf
commit
4c003274d6
@ -44,7 +44,7 @@ class DiskLayoutImage extends JPanel implements Scrollable, RedoListener
|
||||
{
|
||||
setPreferredSize (new Dimension (240 + 1, 525 + 1));
|
||||
addMouseListener (new MyMouseListener ());
|
||||
setBackground (Color.WHITE);
|
||||
setBackground (new Color (0xE0, 0xE0, 0xE0));
|
||||
setOpaque (true);
|
||||
|
||||
addKeyListener (new MyKeyListener ());
|
||||
@ -145,24 +145,21 @@ class DiskLayoutImage extends JPanel implements Scrollable, RedoListener
|
||||
|
||||
Rectangle rect = new Rectangle (x, y, bw, bh);
|
||||
|
||||
int width = rect.width - (isRetina ? 2 : 3);
|
||||
int height = rect.height - (isRetina ? 2 : 3);
|
||||
int width = rect.width - (isRetina ? 2 : 3) + 1;
|
||||
int height = rect.height - (isRetina ? 2 : 3) + 1;
|
||||
int offset2 = isRetina ? 1 : 2;
|
||||
|
||||
// draw frame
|
||||
if (true)
|
||||
{
|
||||
g.setColor (Color.GRAY);
|
||||
// g.drawRect (rect.x, rect.y, rect.width, rect.height);
|
||||
g.draw (rect);
|
||||
}
|
||||
// if (false)
|
||||
// {
|
||||
// g.setColor (Color.GRAY);
|
||||
// // g.drawRect (rect.x, rect.y, rect.width, rect.height);
|
||||
// g.draw (rect);
|
||||
// }
|
||||
|
||||
// draw coloured block
|
||||
if (type.colour != Color.WHITE)
|
||||
{
|
||||
g.setColor (type.colour);
|
||||
g.fillRect (rect.x + offset2, rect.y + offset2, width, height);
|
||||
}
|
||||
// draw blocks
|
||||
g.setColor (type.colour);
|
||||
g.fillRect (rect.x + offset2, rect.y + offset2, width, height);
|
||||
|
||||
// draw an indicator in free blocks
|
||||
if (flagFree)
|
||||
|
@ -82,8 +82,9 @@ class DiskLayoutPanel extends JPanel
|
||||
verticalRuler.setLayout (layout);
|
||||
horizontalRuler.setLayout (layout);
|
||||
legendPanel.setDisk (disk, layout);
|
||||
sp.setViewportView (diskLayoutImage); // this is the only way I know of to
|
||||
// force a refresh
|
||||
|
||||
// this is the only way I know of to force a refresh
|
||||
sp.setViewportView (diskLayoutImage);
|
||||
|
||||
setLayout (new BorderLayout ());
|
||||
if (disk.getGridLayout ().height == 35)
|
||||
|
Loading…
x
Reference in New Issue
Block a user