refactor: zoom a livello di dispositivo e rimozione zoom da playlist
This commit is contained in:
@@ -313,13 +313,9 @@ export class PlayerPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
if (playlistSongSetting) {
|
||||
this.transposeAmount.set(playlistSongSetting.tonalita !== undefined ? playlistSongSetting.tonalita : 0);
|
||||
this.autoscrollSpeed.set(playlistSongSetting.speed !== undefined ? playlistSongSetting.speed : 2);
|
||||
if (playlistSongSetting.zoom !== undefined) {
|
||||
this.fontSize.set(playlistSongSetting.zoom);
|
||||
this.portraitFontSize = playlistSongSetting.zoom;
|
||||
} else {
|
||||
this.fontSize.set(1.0);
|
||||
this.portraitFontSize = 1.0;
|
||||
}
|
||||
const gZoom = this.settingsService.globalZoom();
|
||||
this.fontSize.set(gZoom);
|
||||
this.portraitFontSize = gZoom;
|
||||
} else if (this.comunitaService.comunitaCode() && this.comunitaService.isFilterActive()) {
|
||||
const settings = this.comunitaService.comunitaCantiSettings();
|
||||
const songSetting = settings.find(s => s.id_canti === c.id_canti || s.id_canti === Number(c.id));
|
||||
@@ -339,13 +335,15 @@ export class PlayerPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
this.transposeAmount.set(0);
|
||||
this.autoscrollSpeed.set(2);
|
||||
}
|
||||
this.fontSize.set(1.0);
|
||||
this.portraitFontSize = 1.0;
|
||||
const gZoom = this.settingsService.globalZoom();
|
||||
this.fontSize.set(gZoom);
|
||||
this.portraitFontSize = gZoom;
|
||||
} else {
|
||||
this.transposeAmount.set(0);
|
||||
this.autoscrollSpeed.set(2);
|
||||
this.fontSize.set(1.0);
|
||||
this.portraitFontSize = 1.0;
|
||||
const gZoom = this.settingsService.globalZoom();
|
||||
this.fontSize.set(gZoom);
|
||||
this.portraitFontSize = gZoom;
|
||||
}
|
||||
}, { allowSignalWrites: true });
|
||||
|
||||
@@ -577,6 +575,7 @@ export class PlayerPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
this.fontSize.set(limited);
|
||||
if (!this.isLandscape()) {
|
||||
this.portraitFontSize = limited;
|
||||
this.settingsService.globalZoom.set(limited);
|
||||
}
|
||||
this.channel.postMessage({ type: 'SYNC_FONT', fontSize: this.fontSize() });
|
||||
}
|
||||
@@ -615,8 +614,7 @@ export class PlayerPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
activePlaylistId,
|
||||
c.id,
|
||||
this.transposeAmount(),
|
||||
this.autoscrollSpeed(),
|
||||
this.fontSize()
|
||||
this.autoscrollSpeed()
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -644,6 +642,7 @@ export class PlayerPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
this.fontSize.set(limited);
|
||||
if (!this.isLandscape()) {
|
||||
this.portraitFontSize = limited;
|
||||
this.settingsService.globalZoom.set(limited);
|
||||
}
|
||||
this.channel.postMessage({ type: 'SYNC_FONT', fontSize: this.fontSize() });
|
||||
this.updatePlaylistSettings();
|
||||
@@ -658,6 +657,7 @@ export class PlayerPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
this.fontSize.set(target);
|
||||
if (!this.isLandscape()) {
|
||||
this.portraitFontSize = target;
|
||||
this.settingsService.globalZoom.set(target);
|
||||
}
|
||||
this.channel.postMessage({ type: 'SYNC_FONT', fontSize: this.fontSize() });
|
||||
this.updatePlaylistSettings();
|
||||
|
||||
Reference in New Issue
Block a user