Sfoglia il codice sorgente

Increase status bar height (it was a related padding too short).

Change-Id: Ibdb5030ac3905918fcf314c004c980f2956edb09
Reviewed-on: http://gerrit.dmdirc.com/2357
Automatic-Compile: DMDirc Build Manager
Reviewed-by: Chris Smith <chris@dmdirc.com>
tags/0.7rc1
Greg Holmes 12 anni fa
parent
commit
26392a885a

+ 1
- 6
src/com/dmdirc/addons/ui_swing/MainFrame.java Vedi File

@@ -62,10 +62,8 @@ import javax.swing.JPanel;
62 62
 import javax.swing.JSplitPane;
63 63
 import javax.swing.MenuSelectionManager;
64 64
 import javax.swing.SwingUtilities;
65
-import javax.swing.UIManager;
66 65
 import javax.swing.WindowConstants;
67 66
 
68
-import net.miginfocom.layout.PlatformDefaults;
69 67
 import lombok.Getter;
70 68
 import net.miginfocom.swing.MigLayout;
71 69
 
@@ -404,11 +402,8 @@ public final class MainFrame extends JFrame implements WindowListener,
404 402
      * Lays out the this component.
405 403
      */
406 404
     private void layoutComponents() {
407
-        final int height = getFontMetrics(UIManager.getFont("Table.font"))
408
-                .getHeight() + (int) PlatformDefaults.getUnitValueX("related")
409
-                .getValue();
410 405
         getContentPane().add(mainSplitPane, "grow, push");
411
-        getContentPane().add(statusBar, "hmax "+height+", wmax 100%-2*rel, "
406
+        getContentPane().add(statusBar, "wmax 100%-2*rel, "
412 407
                 + "wmin 100%-2*rel, south, gap rel rel 0 rel");
413 408
     }
414 409
 

+ 2
- 2
src/com/dmdirc/addons/ui_swing/components/statusbar/MessageLabel.java Vedi File

@@ -89,8 +89,8 @@ public class MessageLabel extends JPanel implements StatusBarComponent,
89 89
         label.setBorder(new SidelessEtchedBorder(
90 90
                 SidelessEtchedBorder.Side.RIGHT));
91 91
         label.addMouseListener(this);
92
-        add(label, "growx, pushx");
93
-        add(historyLabel, "gapleft 0");
92
+        add(label, "grow, push");
93
+        add(historyLabel, "grow, gapleft 0");
94 94
     }
95 95
 
96 96
     /**

+ 3
- 2
src/com/dmdirc/addons/ui_swing/components/statusbar/SwingStatusBar.java Vedi File

@@ -73,6 +73,7 @@ public final class SwingStatusBar extends JPanel implements StatusBar {
73 73
         super();
74 74
 
75 75
         height = getFontMetrics(UIManager.getFont("Table.font")).getHeight()
76
+                + (int) PlatformDefaults.getUnitValueX("related").getValue()
76 77
                 + (int) PlatformDefaults.getUnitValueX("related").getValue();
77 78
         componentConstraints = "sgy components, hmax "+height+", hmin "+height
78 79
                 +", wmin 20, shrink 0";
@@ -84,8 +85,8 @@ public final class SwingStatusBar extends JPanel implements StatusBar {
84 85
 
85 86
         setLayout(new MigLayout("fill, ins 0, hidemode 3"));
86 87
 
87
-        add(messageLabel, "growx, pushx, sgy components, hmax "+height
88
-                +", hmin "+height);
88
+        add(messageLabel, "grow, push, sgy components, hmax " + height
89
+                + ", hmin " + height);
89 90
         add(updateLabel, componentConstraints);
90 91
         add(errorPanel, componentConstraints);
91 92
         add(inviteLabel, componentConstraints);

Loading…
Annulla
Salva