Font size unit should default to pixels

See #882
This commit is contained in:
Lorenz Hübschle-Schneider 2017-01-02 13:24:23 +01:00
parent cd44173957
commit f998a003c0

View file

@ -445,6 +445,10 @@ weechat.controller('WeechatCtrl', ['$rootScope', '$scope', '$store', '$timeout',
});
// Update font size when changed
settings.addCallback('fontsize', function(fontsize) {
// If no unit is specified, it should be pixels
if (fontsize.match(/^[0-9]+$/)) {
fontsize += 'px';
}
utils.changeClassStyle('favorite-font', 'fontSize', fontsize);
});