{ this.handleThemeSelection(); }} >
+ onClick={() => { this.setState({ showWindowScaleDialog: true }); }} >
@@ -953,6 +957,19 @@ const SettingsDialog = withStyles(styles, { withTheme: true })(
open={this.state.showSystemMidiBindingsDialog}
onClose={() => { this.setState({ showSystemMidiBindingsDialog: false }); }}
/>
+ {this.state.showWindowScaleDialog && (
+ this.setState({ showWindowScaleDialog: false }))}
+ title="Window Scale"
+
+ onOk={(item) => {
+ this.setState({ showWindowScaleDialog: false });
+ setWindowScale(item.key as number);
+
+ }}
+ />
+
+ )}
);
diff --git a/react/src/WindowScale.tsx b/react/src/WindowScale.tsx
index fc68daf..aac1d4f 100644
--- a/react/src/WindowScale.tsx
+++ b/react/src/WindowScale.tsx
@@ -4,7 +4,8 @@ import {isAndroidHosted} from './AndroidHost';
var validScales = [1.0,1.10,1.25,1.35,1.50,1.75,2.0,2.5];
export function canScaleWindow(): boolean {
- return getValidWindowScales().length > 1;
+ return false;
+ // return getValidWindowScales().length > 1;
}
export function getValidWindowScales(): number[]
@@ -45,4 +46,19 @@ export function getWindowScaleText(scale?: number)
}
let iValue = Math.round(value*100);
return iValue.toString() + "%";
+}
+
+var gOptions: {key: number, text: string}[] = [];
+export function getWindowScaleOptions() {
+ if (gOptions.length !== 0)
+ {
+ return gOptions;
+ }
+ let result: {key: number, text: string}[] = [];
+ for (let value of getValidWindowScales())
+ {
+ result.push({key: value, text: getWindowScaleText(value)});
+ }
+ gOptions = result;
+ return result
}
\ No newline at end of file