Project

General

Profile

CaptionButton_diff.txt

Sergey Ivanovskiy, 08/31/2015 01:08 PM

Download (1.25 KB)

 
1
=== modified file 'src/com/goldencode/p2j/ui/client/gui/CaptionButton.java'
2
--- src/com/goldencode/p2j/ui/client/gui/CaptionButton.java	2015-08-26 22:14:27 +0000
3
+++ src/com/goldencode/p2j/ui/client/gui/CaptionButton.java	2015-08-31 16:55:14 +0000
4
@@ -141,11 +141,14 @@
5
                   gd.drawLine(scaleX(4), scaleY(3), width - scaleX(4), height - scaleY(3));
6
                   
7
                   // SW-NE line
8
+                  gd.setLineStroke(LineStroke.SPECIFIED_WIDTH, scaleX(1));
9
                   gd.drawLine(scaleX(4), height - scaleY(3), width - scaleX(4), scaleY(3));
10
-                  
11
-                  // TODO: the SW-NE line is painted with 1/2 thickness of the NW-SE line,
12
-                  //       this unfortunately limits the scaling capabilities
13
-                  gd.drawLine(scaleX(5), height - scaleY(3), width - scaleX(3), scaleY(3));
14
+                  int extent = scaleX(2);
15
+                  int shift  = extent >> 1;
16
+                  for (int x = scaleX(5), y = height - scaleY(3); x <= width - scaleX(4); x++, y--)
17
+                  {
18
+                     gd.fillRect(x - shift, y - shift, extent, extent);
19
+                  }
20
 
21
                   // these rects make the proper line ends
22
                   gd.setColor(faceColor);
23