Mercurial > cgi-bin > hgweb.cgi > ImagePrep
comparison src/name/blackcap/imageprep/Menus.kt @ 22:d3979a2155a8
Fix out qual and max dim controls.
author | David Barts <n5jrn@me.com> |
---|---|
date | Mon, 23 Nov 2020 15:45:04 -0800 |
parents | 71029c9bf7cd |
children | 92afaa27f40a |
comparison
equal
deleted
inserted
replaced
21:0f3634a0816d | 22:d3979a2155a8 |
---|---|
81 } | 81 } |
82 return null | 82 return null |
83 } | 83 } |
84 | 84 |
85 private fun doOpen() { | 85 private fun doOpen() { |
86 val maxDim = MaxDimSpinner(Application.settingsDialog.maxDimension) | 86 val maxDim = MaxDimSpinner(Application.settingsDialog.maxDimension).apply { |
87 alignmentX = LEFT_ALIGNMENT | |
88 } | |
87 val acc = JPanel().apply { | 89 val acc = JPanel().apply { |
88 layout = BoxLayout(this, BoxLayout.Y_AXIS) | 90 layout = BoxLayout(this, BoxLayout.Y_AXIS) |
89 add(JLabel("Max. dimension:")) | 91 add(Box.createGlue()) |
92 add(JLabel("Max. dimension:").apply { alignmentX = LEFT_ALIGNMENT }) | |
90 add(maxDim) | 93 add(maxDim) |
91 } | 94 } |
92 val chooser = JFileChooser().apply { | 95 val chooser = JFileChooser().apply { |
93 accessory = acc | 96 accessory = acc |
94 currentDirectory = currentInputDirectory | 97 currentDirectory = currentInputDirectory |
119 if (w == null) { | 122 if (w == null) { |
120 LOGGER.log(Level.INFO, "beep!") | 123 LOGGER.log(Level.INFO, "beep!") |
121 Toolkit.getDefaultToolkit().beep() | 124 Toolkit.getDefaultToolkit().beep() |
122 return | 125 return |
123 } | 126 } |
124 val outQual = OutQualSpinner(Application.settingsDialog.outputQuality) | 127 val outQual = OutQualSpinner(Application.settingsDialog.outputQuality).apply { |
128 alignmentX = LEFT_ALIGNMENT | |
129 } | |
125 val acc = JPanel().apply { | 130 val acc = JPanel().apply { |
126 layout = BoxLayout(this, BoxLayout.Y_AXIS) | 131 layout = BoxLayout(this, BoxLayout.Y_AXIS) |
127 add(JLabel("Quality:")) | 132 add(Box.createGlue()) |
133 add(JLabel("Quality:").apply { alignmentX = LEFT_ALIGNMENT }) | |
128 add(outQual) | 134 add(outQual) |
129 } | 135 } |
130 val outName = splitext(w.file.name).first + Application.settingsDialog.outputSuffix + ".jpg" | 136 val outName = splitext(w.file.name).first + Application.settingsDialog.outputSuffix + ".jpg" |
131 val chooser = JFileChooser().apply { | 137 val chooser = JFileChooser().apply { |
132 accessory = acc | 138 accessory = acc |