1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-08-06 22:30:57 +00:00

4.0.0-rc16

* Added: Closed Captioning settings to override the font family and font size.
* Added: Closed Captioning settings to override the position of captions.
* Changed: Player settings are no longer located under `Channel` in the settings menu.
* Fixed: Portrait Mode not working correctly when collapsing chat when Portrait Mode is active.
* Fixed: The button to collapse chat not appearing in the correct position when Portrait Mode and Swapped Sidebars are both active.
* Fixed: The button to collapse chat not appearing in Firefox when Swapped Sidebars is active.
This commit is contained in:
SirStendec 2019-04-05 18:04:14 -04:00
parent 53de0dff18
commit c43e572eec
6 changed files with 192 additions and 18 deletions

View file

@ -61,11 +61,26 @@ export default class Layout extends Module {
return ratio <= ctx.get('layout.portrait-threshold');
},
changed: val => {
this.css_tweaks.toggle('portrait', val);
this.updatePortraitMode();
}
});
this.settings.add('layout.inject-portrait', {
requires: ['layout.use-portrait', 'context.ui.rightColumnExpanded'],
process(ctx) {
return ctx.get('layout.use-portrait') && ctx.get('context.ui.rightColumnExpanded');
},
changed: val => this.css_tweaks.toggle('portrait', val)
});
this.settings.add('layout.use-portrait-swapped', {
requires: ['layout.inject-portrait', 'layout.swap-sidebars'],
process(ctx) {
return ctx.get('layout.inject-portrait') && ctx.get('layout.swap-sidebars')
},
changed: val => this.css_tweaks.toggle('portrait-swapped', val)
});
this.settings.add('layout.show-portrait-chat', {
requires: ['layout.use-portrait', 'layout.portrait-extra-height', 'layout.portrait-extra-width'],
process() {
@ -117,7 +132,8 @@ export default class Layout extends Module {
}
onEnable() {
this.css_tweaks.toggle('portrait', this.settings.get('layout.use-portrait'));
this.css_tweaks.toggle('portrait', this.settings.get('layout.inject-portrait'));
this.css_tweaks.toggle('portrait-swapped', this.settings.get('layout.use-portrait-swapped'));
this.css_tweaks.setVariable('portrait-extra-width', `${this.settings.get('layout.portrait-extra-width')}rem`);
this.css_tweaks.setVariable('portrait-extra-height', `${this.settings.get('layout.portrait-extra-height')}rem`);