Merge "[SettingsProvider] fix font size scale validator" into qt-dev
This commit is contained in:
@@ -3400,16 +3400,8 @@ public final class Settings {
|
|||||||
*/
|
*/
|
||||||
public static final String FONT_SCALE = "font_scale";
|
public static final String FONT_SCALE = "font_scale";
|
||||||
|
|
||||||
private static final Validator FONT_SCALE_VALIDATOR = new Validator() {
|
private static final Validator FONT_SCALE_VALIDATOR =
|
||||||
@Override
|
new SettingsValidators.InclusiveFloatRangeValidator(0.85f, 1.3f);
|
||||||
public boolean validate(@Nullable String value) {
|
|
||||||
try {
|
|
||||||
return Float.parseFloat(value) >= 0;
|
|
||||||
} catch (NumberFormatException | NullPointerException e) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The serialized system locale value.
|
* The serialized system locale value.
|
||||||
|
|||||||
Reference in New Issue
Block a user