Add per-app resolution scale config

This commit is contained in:
Yukino Song
2024-08-21 00:47:55 +08:00
parent f2401c08f7
commit 2fb4ec1931
5 changed files with 41 additions and 13 deletions

View File

@@ -242,6 +242,12 @@
true-value="true" false-value="false" />
<div class="form-text">{{ $t('apps.virtual_display_primary_desc') }}</div>
</div>
<!-- resolution scale factor -->
<div class="mb-3" v-if="platform === 'windows'">
<label for="resolutionScaleFactor" class="form-label">{{ $t('apps.resolution_scale_factor') }}: {{editForm['scale-factor']}}%</label>
<input type="range" step="1" min="20" max="200" class="form-range" id="resolutionScaleFactor" v-model="editForm['scale-factor']"/>
<div class="form-text">{{ $t('apps.resolution_scale_factor_desc') }}</div>
</div>
<!-- exit timeout -->
<div class="mb-3">
<label for="exitTimeout" class="form-label">{{ $t('apps.exit_timeout') }}</label>
@@ -427,7 +433,8 @@
"prep-cmd": [],
detached: [],
"image-path": "",
"virtual-display-primary": true
"virtual-display-primary": true,
"scale-factor": "100"
};
this.editForm.index = -1;
this.showEditForm = true;
@@ -456,6 +463,9 @@
if (typeof this.editForm["virtual-display-primary"] === "undefined") {
this.editForm["virtual-display-primary"] = true;
}
if (typeof this.editForm["scale-factor"] === "undefined") {
this.editForm["scale-factor"] = "100"
}
this.showEditForm = true;
},
showDeleteForm(id) {