RIDER-4427 Select Solution Path window assistive text is too small on High DPI displays

This commit is contained in:
Konstantin Bulenkov
2017-02-27 12:16:52 +01:00
parent d37c134432
commit 36f87d0438
2 changed files with 11 additions and 6 deletions
@@ -81,8 +81,7 @@ import java.util.Map;
public class FileChooserDialogImpl extends DialogWrapper implements FileChooserDialog, PathChooserDialog, FileLookup {
@NonNls public static final String FILE_CHOOSER_SHOW_PATH_PROPERTY = "FileChooser.ShowPath";
public static final String RECENT_FILES_KEY = "file.chooser.recent.files";
public static final String DRAG_N_DROP_HINT =
"<html><center><small><font color=gray>Drag and drop a file into the space above to quickly locate it in the tree</font></small></center></html>";
public static final String DRAG_N_DROP_HINT = "Drag and drop a file into the space above to quickly locate it in the tree";
private final FileChooserDescriptor myChooserDescriptor;
protected FileSystemTreeImpl myFileSystemTree;
private Project myProject;
@@ -342,9 +341,10 @@ public class FileChooserDialogImpl extends DialogWrapper implements FileChooserD
panel.add(scrollPane, BorderLayout.CENTER);
panel.setPreferredSize(JBUI.size(400));
panel.add(new JLabel(DRAG_N_DROP_HINT, SwingConstants.CENTER), BorderLayout.SOUTH);
JLabel dndLabel = new JLabel(DRAG_N_DROP_HINT, SwingConstants.CENTER);
dndLabel.setFont(JBUI.Fonts.miniFont());
dndLabel.setForeground(UIUtil.getLabelDisabledForeground());
panel.add(dndLabel, BorderLayout.SOUTH);
ApplicationManager.getApplication().getMessageBus().connect(getDisposable())
.subscribe(ApplicationActivationListener.TOPIC, new ApplicationActivationListener.Adapter() {
@@ -40,6 +40,8 @@ import com.intellij.ui.PopupHandler;
import com.intellij.ui.ScrollPaneFactory;
import com.intellij.ui.components.labels.LinkLabel;
import com.intellij.ui.components.labels.LinkListener;
import com.intellij.util.ui.JBUI;
import com.intellij.util.ui.UIUtil;
import com.intellij.util.ui.update.MergingUpdateQueue;
import com.intellij.util.ui.update.UiNotifyConnector;
import com.intellij.util.ui.update.Update;
@@ -143,7 +145,10 @@ public abstract class SelectLocationStep extends WizardStep {
myNorthPanel.add(toolbarPanel, BorderLayout.NORTH);
panel.add(myNorthPanel, BorderLayout.NORTH);
panel.add(ScrollPaneFactory.createScrollPane(myFileSystemTree.getTree()), BorderLayout.CENTER);
panel.add(new JLabel(FileChooserDialogImpl.DRAG_N_DROP_HINT, SwingConstants.CENTER), BorderLayout.SOUTH);
JLabel dndLabel = new JLabel(FileChooserDialogImpl.DRAG_N_DROP_HINT, SwingConstants.CENTER);
dndLabel.setFont(JBUI.Fonts.miniFont());
dndLabel.setForeground(UIUtil.getLabelDisabledForeground());
panel.add(dndLabel, BorderLayout.SOUTH);
myUiUpdater = new MergingUpdateQueue("FileChooserUpdater", 200, false, panel);
Disposer.register(myFileSystemTree, myUiUpdater);
new UiNotifyConnector(panel, myUiUpdater);