Do not rely on error handling popup for sodium info (fixes #392)
Instead we now disable all the Render buttons and give them a tooltip. Much more user-friendly.
This commit is contained in:
@@ -367,19 +367,26 @@ public class GuiRenderSettings extends AbstractGuiPopup<GuiRenderSettings> {
|
||||
videoWidth.setEnabled(!renderMethod.hasFixedAspectRatio());
|
||||
|
||||
// Validate video width and height
|
||||
String error = updateResolution();
|
||||
if (error == null) {
|
||||
renderButton.setEnabled().setTooltip(null);
|
||||
String resolutionError = updateResolution();
|
||||
if (resolutionError == null) {
|
||||
queueButton.setEnabled().setTooltip(null);
|
||||
videoWidth.setTextColor(Colors.WHITE);
|
||||
videoHeight.setTextColor(Colors.WHITE);
|
||||
} else {
|
||||
renderButton.setDisabled().setTooltip(new GuiTooltip().setI18nText(error));
|
||||
queueButton.setDisabled().setTooltip(new GuiTooltip().setI18nText(error));
|
||||
queueButton.setDisabled().setTooltip(new GuiTooltip().setI18nText(resolutionError));
|
||||
videoWidth.setTextColor(Colors.RED);
|
||||
videoHeight.setTextColor(Colors.RED);
|
||||
}
|
||||
|
||||
String[] compatError = VideoRenderer.checkCompat();
|
||||
if (resolutionError != null) {
|
||||
renderButton.setDisabled().setTooltip(new GuiTooltip().setI18nText(resolutionError));
|
||||
} else if (compatError != null) {
|
||||
renderButton.setDisabled().setTooltip(new GuiTooltip().setText(compatError));
|
||||
} else {
|
||||
renderButton.setEnabled().setTooltip(null);
|
||||
}
|
||||
|
||||
// Enable/Disable bitrate input field and dropdown
|
||||
if (encodingPresetDropdown.getSelectedValue().hasBitrateSetting()) {
|
||||
bitRateField.setEnabled();
|
||||
|
||||
Reference in New Issue
Block a user