From 6a3b4a15062d91ed3e21fdcbd7e8c633d7df53db Mon Sep 17 00:00:00 2001 From: Tor Hveem Date: Mon, 7 Jul 2014 16:09:25 +0200 Subject: [PATCH] new option for overriding font size --- index.html | 7 ++++++- js/glowingbear.js | 6 ++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/index.html b/index.html index 1469329..c26a3be 100644 --- a/index.html +++ b/index.html @@ -368,10 +368,15 @@ $ openssl req -nodes -newkey rsa:4096 -keyout relay.pem -x509 -days 365 -out rel
  • - Override font + Override font family
  • +
  • + Override font size (E.g. 16px) +
    + +
  • diff --git a/js/glowingbear.js b/js/glowingbear.js index 42aa45d..e81fa40 100644 --- a/js/glowingbear.js +++ b/js/glowingbear.js @@ -844,6 +844,8 @@ weechat.controller('WeechatCtrl', ['$rootScope', '$scope', '$store', '$timeout', $store.bind($scope, "soundnotification", false); // Save setting for font family $store.bind($scope, "fontfamily", angular.element('.monospace').css('font-family')); + // Save setting for font size + $store.bind($scope, "fontsize", angular.element('.monospace').css('font-size')); // Save setting for displaying embeds in rootScope so it can be used from service $rootScope.visible = $scope.noembed === false; @@ -896,6 +898,10 @@ weechat.controller('WeechatCtrl', ['$rootScope', '$scope', '$store', '$timeout', $scope.$watch('fontfamily', function() { angular.element('.monospace').css('font-family', $scope.fontfamily); }); + // Update font size when changed + $scope.$watch('fontsize', function() { + angular.element('.monospace').css('font-size', $scope.fontsize); + }); $scope.setActiveBuffer = function(bufferId, key) { // If we are on mobile we need to collapse the menu on sidebar clicks