Commit d7304c3b authored by Mattias Ulbrich's avatar Mattias Ulbrich
Browse files

Fixing some smaller GUI glitches in settings dialog

parent 0358d1c7
......@@ -181,7 +181,8 @@ public abstract class SettingsPanel extends SimpleSettingsPanel {
* @param <T>
* @return
*/
protected <T> JComboBox<T> addComboBox(String info, int selectionIndex,
protected <T> JComboBox<T> addComboBox(String title,
String info, int selectionIndex,
@Nullable Validator<T> validator, T... items) {
JComboBox<T> comboBox = new JComboBox<>(items);
comboBox.setSelectedIndex(selectionIndex);
......@@ -196,7 +197,7 @@ public abstract class SettingsPanel extends SimpleSettingsPanel {
}
});
if (info != null && !info.isEmpty()) {
pCenter.add(new JLabel(info));
pCenter.add(new JLabel(title));
pCenter.add(comboBox);
JLabel infoButton = createHelpLabel(info);
pCenter.add(infoButton, new CC().wrap());
......
......@@ -75,10 +75,14 @@ public class SimpleSettingsPanel extends JPanel {
}
protected void demarkComponentAsErrornous(JComponent component) {
component.setBackground(Color.white);//find color
Object col = component.getClientProperty("saved_background_color");
if (col instanceof Color) {
component.setBackground((Color) col);
}
}
protected void markComponentAsErrornous(JComponent component, String error) {
component.putClientProperty("saved_background_color", component.getBackground());
component.setBackground(COLOR_ERROR.get());
component.setToolTipText(error);
}
......
......@@ -127,7 +127,7 @@ public class SMTSettingsProvider extends SettingsPanel implements SettingsProvid
}
private JComboBox<String> getProgressModeBox() {
return addComboBox(BUNDLE.getString(INFO_PROGRESS_MODE_BOX), 0,
return addComboBox("", BUNDLE.getString(INFO_PROGRESS_MODE_BOX), 0,
e -> settings.modeOfProgressDialog = progressModeBox.getSelectedIndex(),
getProgressMode(ProofIndependentSMTSettings.PROGRESS_MODE_USER),
getProgressMode(ProofIndependentSMTSettings.PROGRESS_MODE_CLOSE));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment