mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2025-12-06 22:10:54 +03:00
FileChooser: scale file chooser size (issue #5)
This commit is contained in:
@@ -16,10 +16,12 @@
|
|||||||
|
|
||||||
package com.formdev.flatlaf.ui;
|
package com.formdev.flatlaf.ui;
|
||||||
|
|
||||||
|
import java.awt.Dimension;
|
||||||
import javax.swing.JComponent;
|
import javax.swing.JComponent;
|
||||||
import javax.swing.JFileChooser;
|
import javax.swing.JFileChooser;
|
||||||
import javax.swing.plaf.ComponentUI;
|
import javax.swing.plaf.ComponentUI;
|
||||||
import javax.swing.plaf.metal.MetalFileChooserUI;
|
import javax.swing.plaf.metal.MetalFileChooserUI;
|
||||||
|
import com.formdev.flatlaf.util.UIScale;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Provides the Flat LaF UI delegate for {@link javax.swing.JFileChooser}.
|
* Provides the Flat LaF UI delegate for {@link javax.swing.JFileChooser}.
|
||||||
@@ -38,4 +40,14 @@ public class FlatFileChooserUI
|
|||||||
public FlatFileChooserUI( JFileChooser filechooser ) {
|
public FlatFileChooserUI( JFileChooser filechooser ) {
|
||||||
super( filechooser );
|
super( filechooser );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Dimension getPreferredSize( JComponent c ) {
|
||||||
|
return UIScale.scale( super.getPreferredSize( c ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Dimension getMinimumSize( JComponent c ) {
|
||||||
|
return UIScale.scale( super.getMinimumSize( c ) );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user