diff --git a/apps/app-frontend/src/App.vue b/apps/app-frontend/src/App.vue index bc43254..3c07d15 100644 --- a/apps/app-frontend/src/App.vue +++ b/apps/app-frontend/src/App.vue @@ -141,6 +141,7 @@ import { isNetworkMetered, setRestartAfterPendingUpdate, } from '@/helpers/utils.js' +import { installUiScale } from '@/helpers/ui-scale' import { start_join_server, start_join_singleplayer_world } from '@/helpers/worlds.ts' import i18n, { resolveInitialLocale } from '@/i18n.config' import { @@ -1273,6 +1274,8 @@ provide('previewMinecraftCrashModal', () => minecraftCrashModal.value?.showPrevi provide('showLauncherPopup', (_request: unknown) => {}) provide('showStartupAnnouncement', () => startupAnnouncementModal.value?.show()) +installUiScale() + const stateFailed = ref(false) stateInitialization .then(() => { diff --git a/apps/app-frontend/src/components/ui/settings/AppearanceSettings.vue b/apps/app-frontend/src/components/ui/settings/AppearanceSettings.vue index c6ff9f8..506a848 100644 --- a/apps/app-frontend/src/components/ui/settings/AppearanceSettings.vue +++ b/apps/app-frontend/src/components/ui/settings/AppearanceSettings.vue @@ -26,6 +26,7 @@ import { computed, ref, watch } from 'vue' import { get, set } from '@/helpers/settings.ts' import { getOS } from '@/helpers/utils' +import { setUiScale, uiScale } from '@/helpers/ui-scale' import { useTheming } from '@/store/state' import { type AccentColor, @@ -209,6 +210,23 @@ const messages = defineMessages({ defaultMessage: 'Enables advanced rendering such as blur effects that may cause performance issues without hardware-accelerated rendering.', }, + uiScaleTitle: { + id: 'app.appearance-settings.ui-scale.title', + defaultMessage: 'Launcher scale', + }, + uiScaleDescription: { + id: 'app.appearance-settings.ui-scale.description', + defaultMessage: + 'Scale the whole launcher interface. A smaller scale fits more content, which helps when embedded pages are cut off.', + }, + uiScaleCustom: { + id: 'app.appearance-settings.ui-scale.custom', + defaultMessage: 'Custom', + }, + uiScalePercent: { + id: 'app.appearance-settings.ui-scale.percent', + defaultMessage: '{value}%', + }, pageTransitionsTitle: { id: 'app.appearance-settings.page-transitions.title', defaultMessage: 'Page transition animations', @@ -1020,6 +1038,43 @@ watch( /> + + + + +