Zooming out until the drawing is smaller than the window made the toolbar above the canvas grow taller and squeeze the canvas

This commit is contained in:
Bane Stojkovic
2026-10-19 10:16:06 +02:00
parent b154eb9e96
commit 08a53f20bd
2 changed files with 15 additions and 1 deletions
@@ -669,6 +669,10 @@
<changeType>BUG_FIX</changeType>
<description>Gerber export on computers set to a language that uses a decimal comma (e.g. German, French, Serbian) produced files in which drill holes, pads and traces had the wrong size - a 0.8mm hole came out as 0mm and traces and the board outline had no width, so the files could not be used for fabrication</description>
</org.diylc.appframework.update.Change>
<org.diylc.appframework.update.Change>
<changeType>BUG_FIX</changeType>
<description>Zooming out until the drawing is smaller than the window made the toolbar above the canvas grow taller and squeeze the canvas; the toolbar now keeps its height at every zoom level</description>
</org.diylc.appframework.update.Change>
</changes>
<url>https://github.com/bancika/diy-layout-creator/releases</url>
</org.diylc.appframework.update.Version>
@@ -93,7 +93,17 @@ public class ActionBarPlugin implements IPlugIn {
public JPanel getActionPanel() {
if (actionPanel == null) {
actionPanel = new JPanel();
actionPanel = new JPanel() {
private static final long serialVersionUID = 1L;
// shares a vertical BoxLayout with the canvas on Mac; without a height cap it absorbs
// half of the spare space whenever the zoomed-out canvas is smaller than the viewport
@Override
public Dimension getMaximumSize() {
return new Dimension(Integer.MAX_VALUE, getPreferredSize().height);
}
};
actionPanel.setOpaque(false);
actionPanel.setLayout(new GridBagLayout());