Delete zoom controller from old webkit greeter

pull/8/head 2.0.3
Warinyourself 3 years ago
parent 3a7f502261
commit 0862e60f2a

@ -36,6 +36,23 @@ export default class SettingsSelectors extends Vue {
} }
} }
get isSupportFullApi() {
return AppModule.isSupportFullApi
}
get zoomSlider() {
return this.buildSlider({
label: this.$t('input.zoom-interface').toString(),
value: AppModule.zoom,
options: {
min: 0.5,
max: 2,
step: 0.1
},
callback: this.updateZoom
})
}
changeLanguage(value: string) { changeLanguage(value: string) {
this.$i18n.locale = value this.$i18n.locale = value
localStorage.setItem('language', value) localStorage.setItem('language', value)
@ -72,19 +89,6 @@ export default class SettingsSelectors extends Vue {
return <AppSlider {...{ props, on: { input: callback } } } /> return <AppSlider {...{ props, on: { input: callback } } } />
} }
get zoomSlider() {
return this.buildSlider({
label: this.$t('input.zoom-interface').toString(),
value: AppModule.zoom,
options: {
min: 0.5,
max: 2,
step: 0.1
},
callback: this.updateZoom
})
}
@Debounce(100) @Debounce(100)
updateZoom(value: AppInputThemeValue) { updateZoom(value: AppInputThemeValue) {
setCSSVariable('--zoom', value + '' || '1') setCSSVariable('--zoom', value + '' || '1')
@ -98,7 +102,7 @@ export default class SettingsSelectors extends Vue {
{ this.buildSelector('login-position.about', this.menuPositionItems, this.menuPositionValue, this.changeLoginPosition) } { this.buildSelector('login-position.about', this.menuPositionItems, this.menuPositionValue, this.changeLoginPosition) }
{ !this.isViewThemeOnly && this.buildSelector('choice-desktop', generateDesktopIcons(), AppModule.currentDesktop?.key, this.changeDesktop) } { !this.isViewThemeOnly && this.buildSelector('choice-desktop', generateDesktopIcons(), AppModule.currentDesktop?.key, this.changeDesktop) }
{ !this.isViewThemeOnly && this.buildSelector('choice-os', osList, AppModule.currentOs, this.changeOs) } { !this.isViewThemeOnly && this.buildSelector('choice-os', osList, AppModule.currentOs, this.changeOs) }
{ !this.isViewThemeOnly && this.zoomSlider } { !this.isViewThemeOnly && this.isSupportFullApi && this.zoomSlider }
</div> </div>
} }
} }

@ -8,11 +8,10 @@
.user-settings-themes .user-settings-themes
display grid display grid
grid-template-columns repeat(3, 1fr) grid-template-columns repeat(3, 1fr)
grid-template-rows repeat(auto-fit, 150px)
gap 8px gap 8px
.user-settings-theme .user-settings-theme
height 150px height calc(80vmin / var(--zoom) / 5)
display block display block
width 100% width 100%
object-fit cover object-fit cover

Loading…
Cancel
Save