Merge pull request #1424 from SiboVG/issue-1423

[#1423] Make sure zoom combobox can fit 'Fit (100.0%)'
This commit is contained in:
SiboVG 2022-06-11 15:11:18 +02:00 committed by GitHub
commit 702f653864
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -58,6 +58,8 @@ public class ScaleSelector {
// Zoom level selector
scaleSelectorCombo = new JComboBox<>(SCALE_LABELS);
scaleSelectorCombo.setEditable(true);
scaleSelectorCombo.setSelectedItem("Fit (100.0%)"); // Make sure the combobox can fit this text
scaleSelectorCombo.setPreferredSize(scaleSelectorCombo.getPreferredSize());
setZoomText();
scaleSelectorCombo.addActionListener(new ActionListener() {
@Override