提交 a958b4f1 编写于 作者: J Jan Peter Stotz

chore(gui): make sure the search dialog has the correct size and the options are aligned properly

上级 6d54945c
......@@ -95,7 +95,9 @@ public abstract class CommonSearchDialog extends JDialog {
protected abstract void loadStart();
public void loadWindowPos() {
mainWindow.getSettings().loadWindowPos(this);
if (!mainWindow.getSettings().loadWindowPos(this)) {
setSize(800, 500);
}
}
public void prepare() {
......
......@@ -128,10 +128,10 @@ public class WrapLayout extends FlowLayout {
if (m.isVisible()) {
Dimension d = preferred ? m.getPreferredSize() : m.getMinimumSize();
int width = d.width;
// Can't add the component to current row. Start a new row.
if (rowWidth + d.width > maxWidth) {
if (rowWidth + width >= maxWidth) {
addRow(dim, rowWidth, rowHeight);
rowWidth = 0;
rowHeight = 0;
......@@ -143,7 +143,7 @@ public class WrapLayout extends FlowLayout {
rowWidth += hgap;
}
rowWidth += d.width;
rowWidth += width;
rowHeight = Math.max(rowHeight, d.height);
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册