1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-08-01 23:48:31 +00:00

Render badges. Fix badges with weird font sizes. Add an option to show metadata in theatre mode. Fixes #364. Fixes #363.

This commit is contained in:
SirStendec 2018-01-16 17:36:56 -05:00
parent 95d0002b56
commit 0754144c36
8 changed files with 170 additions and 52 deletions

View file

@ -130,7 +130,7 @@ export default class ChatHook extends Module {
ui: {
path: 'Chat > Appearance >> General @{"sort": -1}',
title: 'Width',
description: 'How wide chat should be, in pixels.',
description: "How wide chat should be, in pixels. This may be affected by your browser's zoom and font size settings.",
component: 'setting-text-box',
process(val) {
val = parseInt(val, 10);
@ -147,7 +147,7 @@ export default class ChatHook extends Module {
ui: {
path: 'Chat > Appearance >> General',
title: 'Font Size',
description: 'How large should text in chat be, in pixels.',
description: "How large should text in chat be, in pixels. This may be affected by your browser's zoom and font size settings.",
component: 'setting-text-box',
process(val) {
val = parseInt(val, 10);
@ -247,10 +247,10 @@ export default class ChatHook extends Module {
if ( font.indexOf(' ') !== -1 && font.indexOf(',') === -1 && font.indexOf('"') === -1 && font.indexOf("'") === -1 )
font = `"${font}"`;
this.css_tweaks.setVariable('chat-font-size', `${size}px`);
this.css_tweaks.setVariable('chat-line-height', `${lh}px`);
this.css_tweaks.setVariable('chat-font-size', `${size/10}rem`);
this.css_tweaks.setVariable('chat-line-height', `${lh/10}rem`);
this.css_tweaks.setVariable('chat-font-family', font);
this.css_tweaks.setVariable('chat-width', `${width}px`);
this.css_tweaks.setVariable('chat-width', `${width/10}rem`);
this.css_tweaks.toggle('chat-font', size !== 12 || font);
this.css_tweaks.toggle('chat-width', width !== 340);