Project

General

Profile

2923_2.txt

Sergey Ivanovskiy, 05/02/2016 09:40 AM

Download (2.47 KB)

 
1
=== modified file 'src/com/goldencode/p2j/ui/client/gui/ComboBoxGuiImpl.java'
2
--- src/com/goldencode/p2j/ui/client/gui/ComboBoxGuiImpl.java	2016-05-02 13:05:43 +0000
3
+++ src/com/goldencode/p2j/ui/client/gui/ComboBoxGuiImpl.java	2016-05-02 13:34:04 +0000
4
@@ -1499,6 +1499,7 @@
5
       int yt = orig.y + 1 + (dim.height + fnt.pointSize)/2;
6
       gd.setFontStyle(fnt.style);
7
       // enabled state controls text drawing
8
+      int boxWidth = dim.width - DROP_DOWN_BUTTON_SIZE;
9
       if (isEnabled())
10
       {
11
          if (focused)
12
@@ -1509,14 +1510,14 @@
13
          {
14
             gd.setColor(gc.fgColor);
15
          }
16
-         gd.drawString(display, dim.width, dim.height, xt, yt, 0, 0);
17
+         gd.drawString(display, boxWidth, dim.height, xt, yt, 0, 0);
18
       }
19
       else
20
       {
21
          gd.setColor(lightShadow);
22
-         gd.drawString(display, dim.width, dim.height, xt + 1, yt + 1, 1, 1);
23
+         gd.drawString(display, boxWidth, dim.height, xt + 1, yt + 1, 1, 1);
24
          gd.setColor(darkShadow);
25
-         gd.drawString(display, dim.width, dim.height, xt, yt, 0, 0);
26
+         gd.drawString(display, boxWidth, dim.height, xt, yt, 0, 0);
27
       }
28
 
29
       // draw dotted rectangle around focused item text
30

    
31
=== modified file 'src/com/goldencode/p2j/ui/client/gui/ScrollableSelectionListGuiImpl.java'
32
--- src/com/goldencode/p2j/ui/client/gui/ScrollableSelectionListGuiImpl.java	2016-05-02 13:05:43 +0000
33
+++ src/com/goldencode/p2j/ui/client/gui/ScrollableSelectionListGuiImpl.java	2016-05-02 13:29:16 +0000
34
@@ -699,7 +699,8 @@
35
       }
36
 
37
       // draw item text
38
-      gd.drawString(getItemText(number), rw, rh,
39
+      gd.drawString(getItemText(number), rw - ((ComboBoxGuiImpl)box).getDropDownScrollBarWidth(),
40
+                    rh,
41
                     box != null && box.config().mode == ComboBoxConfig.Mode.SIMPLE
42
                        ? x + ComboBoxGuiImpl.ENTRY_SHIFT : x + ComboBoxGuiImpl.TEXT_SHIFT,
43
                     y + 1 + (rh + fontSize)/2, 0, 0);
44

    
45
=== modified file 'src/com/goldencode/p2j/ui/client/gui/driver/web/res/p2j.canvas_renderer.js'
46
--- src/com/goldencode/p2j/ui/client/gui/driver/web/res/p2j.canvas_renderer.js	2016-05-02 13:05:43 +0000
47
+++ src/com/goldencode/p2j/ui/client/gui/driver/web/res/p2j.canvas_renderer.js	2016-05-02 13:31:06 +0000
48
@@ -1810,7 +1810,7 @@
49
       textWidth = p2j.fonts.getTextWidth(cfont, text);
50
       if (boxWidth > 0)
51
       {
52
-         x = (boxWidth - textWidth - 16) / 2 + xOffset;
53
+         x = (boxWidth - textWidth) / 2 + xOffset;
54
       }
55
    }
56
 
57