clamped element scale to 1.5x

This commit is contained in:
booploops 2022-07-07 16:11:08 -07:00
parent b10279f192
commit 951538e6e7
3 changed files with 6 additions and 7 deletions

View file

@ -1,5 +1,9 @@
var notyf = new Notyf();
function clamp(num, min, max) {
return Math.min(Math.max(num, min), max);
}
const MusicKitObjects = {
LibraryPlaylist: function () {
this.id = "";

View file

@ -1097,7 +1097,7 @@ const app = new Vue({
},
setWindowScaleFactor() {
let scale = window.devicePixelRatio * window.innerWidth / 1280 * window.innerHeight / 720
let desiredScale = parseFloat(app.cfg.visual.maxElementScale == -1 ? 1.6 : app.cfg.visual.maxElementScale)
let desiredScale = clamp(parseFloat(app.cfg.visual.maxElementScale == -1 ? 1.5 : app.cfg.visual.maxElementScale), 1, 1.5)
app.$store.state.windowRelativeScale = scale
if(scale <= 1) {
scale = 1

View file

@ -562,18 +562,13 @@
<div class="md-option-segment md-option-segment_auto">
<label>
<select @change="$root.setWindowScaleFactor()" class="md-select" v-model="app.cfg.visual.maxElementScale" >
<option value="-1">Default (1.6x)</option>
<option value="-1">Default (1.5x)</option>
<option value="1">1.0x</option>
<option value="1.1">1.1x</option>
<option value="1.2">1.2x</option>
<option value="1.3">1.3x</option>
<option value="1.4">1.4x</option>
<option value="1.5">1.5x</option>
<option value="1.6">1.6x</option>
<option value="1.7">1.7x</option>
<option value="1.8">1.8x</option>
<option value="1.9">1.9x</option>
<option value="2.0">2.0x</option>
</select>
</label>
</div>