Skip to content

Commit 7c4b62a

Browse files
committed
C++ std dropdown: fix size in Box layout
1 parent 6ebb32d commit 7c4b62a

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

mode/CppMode.jar

75 Bytes
Binary file not shown.

src/java/CppEditor.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,10 @@ public java.awt.Component getListCellRendererComponent(
102102
stdCombo.setFont(versionLabel.getFont());
103103
stdCombo.setFocusable(false);
104104
stdCombo.setToolTipText("C++ standard — grayed out = not supported by your g++");
105+
// Prevent Box layout from stretching the combo horizontally
106+
Dimension comboSize = stdCombo.getPreferredSize();
107+
stdCombo.setMaximumSize(comboSize);
108+
stdCombo.setMinimumSize(comboSize);
105109

106110
stdCombo.addActionListener(e -> {
107111
int sel = stdCombo.getSelectedIndex();

0 commit comments

Comments
 (0)