diff --git a/tunable/CommonDimensions.java b/tunable/CommonDimensions.java index 4953592..6290941 100644 --- a/tunable/CommonDimensions.java +++ b/tunable/CommonDimensions.java @@ -4,7 +4,6 @@ public enum CommonDimensions { WINDOW (1370, 962), - WINDOW_MINIMUM_SIZE (1350, 460), UPPER_PANEL (1370, 181), LOWER_PANEL (1370, 91), PLUS_MINUS_SELECTOR (55, 55), diff --git a/ui/components/clickable/RoundedComboBox.java b/ui/components/clickable/RoundedComboBox.java index a12f4ff..a2be636 100644 --- a/ui/components/clickable/RoundedComboBox.java +++ b/ui/components/clickable/RoundedComboBox.java @@ -75,7 +75,9 @@ public void setArrowDirection(int arrowDirection) { setUI( new BasicComboBoxUI() { @Override protected JButton createArrowButton() { - return new ArrowButton(SwingConstants.SOUTH); + final var button = new ArrowButton(SwingConstants.SOUTH); + button.setOpaque(false); + return button; } } ); diff --git a/ui/components/containers/BasePanel.java b/ui/components/containers/BasePanel.java index 811a780..c411363 100644 --- a/ui/components/containers/BasePanel.java +++ b/ui/components/containers/BasePanel.java @@ -17,10 +17,6 @@ public BasePanel() { } @Override public void composeView() { - setPreferredSize( - CommonDimensions.WINDOW.getDimension() - ); - setLayout( new BorderLayout() ); diff --git a/ui/components/containers/Window.java b/ui/components/containers/Window.java index 77381d6..78b1cca 100644 --- a/ui/components/containers/Window.java +++ b/ui/components/containers/Window.java @@ -18,6 +18,7 @@ import javax.swing.*; import javax.swing.table.TableModel; +import java.awt.Dimension; import java.awt.print.*; import org.jopendocument.dom.spreadsheet.SpreadSheet; @@ -40,6 +41,7 @@ public class Window extends JFrame implements IComponent { private final SaveFileDialog saveOdsDialog; private final LoadFileDialog loadFileDialog; private IRecordFormatter recordFormatter; + private BasePanel basePanel; public Window(String name) { super(name); @@ -53,7 +55,6 @@ public Window(String name) { CommonFonts.TEXT_NORMAL.getFont().deriveFont(DEFAULT_FONT_SIZE) ); - setMinimumSize(CommonDimensions.WINDOW_MINIMUM_SIZE.getDimension()); setLocationRelativeTo(null); saveItem = new MenuItem("Save"); @@ -62,6 +63,7 @@ public Window(String name) { csvItem = new MenuItem("CSV"); openDocumentItem = new MenuItem("OpenDocument"); printerItem = new MenuItem("Printer"); + basePanel = new BasePanel(); loadFileDialog = new LoadFileDialog( this, @@ -116,9 +118,7 @@ public Window(String name) { } @Override public void composeView() { - add( - new BasePanel() - ); + add(basePanel); setJMenuBar( new MenuBar( @@ -154,6 +154,10 @@ public Window(String name) { ); pack(); + setMinimumSize(new Dimension(getWidth(), getHeight())); + + basePanel.setPreferredSize(CommonDimensions.WINDOW.getDimension()); + pack(); } @Override public void registerCallbacks() {