From 5e3bdd96f3d6a792d954427463e616ed98c28fa5 Mon Sep 17 00:00:00 2001 From: booploops <49113086+booploops@users.noreply.github.com> Date: Thu, 7 Jul 2022 02:19:00 -0700 Subject: [PATCH] added Maximum Element Scale --- src/i18n/en_US.json | 1 + src/i18n/source/en_US.json | 1 + src/main/base/store.ts | 3 ++- src/renderer/main/vueapp.js | 6 ++--- .../views/components/settings-window.ejs | 23 +++++++++++++++++++ 5 files changed, 30 insertions(+), 4 deletions(-) diff --git a/src/i18n/en_US.json b/src/i18n/en_US.json index 5924e72f..b01419a5 100644 --- a/src/i18n/en_US.json +++ b/src/i18n/en_US.json @@ -554,6 +554,7 @@ "settings.option.experimental.unknownPlugin.description": "Allow installation of plugins from repos other than the Cider Plugin Repository", "settings.option.experimental.compactUI": "Compact UI", "settings.option.window.close_button_hide": "Close Button Should Hide the Application", + "settings.option.window.maxElementScale": "Maximum Element Scale", "settings.option.experimental.inline_playlists": "Inline Playlists and Albums", "settings.option.advanced.playlistTrackMapping": "Playlist Track Mapping", "settings.option.advanced.playlistTrackMapping.description": "Enables deep scanning of playlists to determine which tracks are in which playlists. Playlist cache build times can increase significantly.", diff --git a/src/i18n/source/en_US.json b/src/i18n/source/en_US.json index 5924e72f..b01419a5 100644 --- a/src/i18n/source/en_US.json +++ b/src/i18n/source/en_US.json @@ -554,6 +554,7 @@ "settings.option.experimental.unknownPlugin.description": "Allow installation of plugins from repos other than the Cider Plugin Repository", "settings.option.experimental.compactUI": "Compact UI", "settings.option.window.close_button_hide": "Close Button Should Hide the Application", + "settings.option.window.maxElementScale": "Maximum Element Scale", "settings.option.experimental.inline_playlists": "Inline Playlists and Albums", "settings.option.advanced.playlistTrackMapping": "Playlist Track Mapping", "settings.option.advanced.playlistTrackMapping.description": "Enables deep scanning of playlists to determine which tracks are in which playlists. Playlist cache build times can increase significantly.", diff --git a/src/main/base/store.ts b/src/main/base/store.ts index b7786b98..b57a0cfa 100644 --- a/src/main/base/store.ts +++ b/src/main/base/store.ts @@ -239,7 +239,8 @@ export class Store { "windowColor": "#000000", "customAccentColor": false, "accentColor": "#fc3c44", - "purplePodcastPlaybackBar": false + "purplePodcastPlaybackBar": false, + "maxContentScale": -1 // -1 default, anything else is a custom scale }, "lyrics": { "enable_mxm": false, diff --git a/src/renderer/main/vueapp.js b/src/renderer/main/vueapp.js index 1edc9418..a5c0890e 100644 --- a/src/renderer/main/vueapp.js +++ b/src/renderer/main/vueapp.js @@ -1097,11 +1097,11 @@ 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) if(scale <= 1) { scale = 1 - }else if(scale >= 1.4) { - scale = 1.4 + }else if(scale >= desiredScale) { + scale = desiredScale } document.documentElement.style .setProperty('--windowRelativeScale', scale); diff --git a/src/renderer/views/components/settings-window.ejs b/src/renderer/views/components/settings-window.ejs index ac9ece72..9b8a0f1e 100644 --- a/src/renderer/views/components/settings-window.ejs +++ b/src/renderer/views/components/settings-window.ejs @@ -555,6 +555,29 @@ {{$root.getLz('settings.header.window')}}