This is an automated email from the ASF dual-hosted git repository.

skygo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/netbeans.git


The following commit(s) were added to refs/heads/master by this push:
     new 057cd8e  [NETBEANS-3729] FlatLaf: fix cut off label in progress dialog 
(if no cancel button is shown)
     new 3b8b1a1  Merge pull request #1896 from 
DevCharly/flatlaf-progress-dialog-fix
057cd8e is described below

commit 057cd8e82e90c0c419cb0122154ae68a74e1991e
Author: Karl Tauber <[email protected]>
AuthorDate: Thu Jan 23 11:31:40 2020 +0100

    [NETBEANS-3729] FlatLaf: fix cut off label in progress dialog (if no cancel 
button is shown)
---
 .../org/netbeans/modules/progress/ui/AbstractWindowRunner.java   | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git 
a/platform/progress.ui/src/org/netbeans/modules/progress/ui/AbstractWindowRunner.java
 
b/platform/progress.ui/src/org/netbeans/modules/progress/ui/AbstractWindowRunner.java
index a33d5c0..e313543 100644
--- 
a/platform/progress.ui/src/org/netbeans/modules/progress/ui/AbstractWindowRunner.java
+++ 
b/platform/progress.ui/src/org/netbeans/modules/progress/ui/AbstractWindowRunner.java
@@ -222,15 +222,18 @@ abstract class AbstractWindowRunner<T> extends 
WindowAdapter implements Runnable
         panel.add(mainLabel);
         JComponent progressBar = 
ProgressHandleFactory.createProgressComponent(handle);
         progressBar.setMinimumSize(new Dimension(400, 32));
-        JPanel progressPanel = new JPanel(new GridBagLayout());
+        GridBagLayout gb = new GridBagLayout();
+        // give first row, which contains the progress bar and the cancel 
button, a minimum height
+        gb.rowHeights = new int[] { 
mainLabel.getFontMetrics(mainLabel.getFont()).getHeight() };
+        JPanel progressPanel = new JPanel(gb);
         GridBagConstraints gbc = new GridBagConstraints();
         gbc.gridx = 0;
         gbc.gridwidth = 1;
         gbc.gridheight = 1;
         gbc.weightx = 1D;
-        gbc.weighty = 1.0D;
+        gbc.weighty = 0D;
         gbc.anchor = GridBagConstraints.WEST;
-        gbc.fill = GridBagConstraints.BOTH;
+        gbc.fill = GridBagConstraints.HORIZONTAL;
         progressPanel.add (progressBar, gbc);
         if (showCancel) {
             final JButton closeButton = new JButton();


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to