Customize external subtitles font

This commit is contained in:
Rafostar
2020-11-24 17:54:53 +01:00
parent 3fcd612e6e
commit 9ad1a11452
5 changed files with 32 additions and 12 deletions

View File

@@ -127,6 +127,14 @@ class ClapperPrefsGrid extends Gtk.Grid
return this.addToGrid(widget);
}
addFontButton(text, setting)
{
let label = this.getLabel(text + ':');
let widget = this.getFontButton(setting);
return this.addToGrid(label, widget);
}
getLabel(text, isTitle)
{
let marginLR = 0;
@@ -185,6 +193,17 @@ class ClapperPrefsGrid extends Gtk.Grid
return checkButton;
}
getFontButton(setting)
{
let fontButton = new Gtk.FontButton({
use_font: true,
use_size: true,
});
settings.bind(setting, fontButton, 'font', this.flag);
return fontButton;
}
_onClose(name)
{
if(name)