diff --git a/css/glowingbear.css b/css/glowingbear.css index 1efbcbc..9ba74c6 100644 --- a/css/glowingbear.css +++ b/css/glowingbear.css @@ -257,10 +257,6 @@ input[type=text], input[type=password], #sendMessage, .badge { min-height: 100%; } -.monospace { - font-family: 'Inconsolata', 'Consolas', 'Monaco', 'Ubuntu Mono', monospace; -} - #bufferlines { position: relative; height: 100%; @@ -478,10 +474,6 @@ h2 span, h2 small { /* Mobile layout */ /* */ @media (max-width: 968px) { - .monospace { - /* readability on mobile +9001% */ - font-family: sans-serif; - } #bufferlines table { border-collapse: separate; diff --git a/directives/input.html b/directives/input.html index 27eb6be..58a72ed 100644 --- a/directives/input.html +++ b/directives/input.html @@ -1,6 +1,6 @@
- diff --git a/index.html b/index.html index db0816b..6178247 100644 --- a/index.html +++ b/index.html @@ -60,11 +60,11 @@
- - + +
- +
Error: wrong password
@@ -217,7 +217,7 @@ $ openssl req -nodes -newkey rsa:4096 -keyout relay.pem -x509 -days 365 -out rel
-
+
  • diff --git a/js/glowingbear.js b/js/glowingbear.js index e386dea..c591bda 100644 --- a/js/glowingbear.js +++ b/js/glowingbear.js @@ -866,12 +866,20 @@ weechat.controller('WeechatCtrl', ['$rootScope', '$scope', '$store', '$timeout', // Save setting for playing sound on notification $store.bind($scope, "soundnotification", false); // Save setting for font family - $store.bind($scope, "fontfamily", getClassStyle('monospace', 'fontFamily')); + $store.bind($scope, "fontfamily", getClassStyle('favorite-font', 'fontFamily')); // Save setting for font size - $store.bind($scope, "fontsize", getClassStyle('monospace', 'fontSize')); + $store.bind($scope, "fontsize", getClassStyle('favorite-font', 'fontSize')); // Save setting for readline keybindings $store.bind($scope, "readlineBindings", false); + if (!$scope.fontfamily) { + if ($rootScope.isMobileUi()) { + $scope.fontfamily = 'sans-serif'; + } else { + $scope.fontfamily = "Inconsolata, Consolas, Monaco, Ubuntu Mono, monospace"; + } + } + // Save setting for displaying embeds in rootScope so it can be used from service $rootScope.visible = $scope.noembed === false; @@ -947,11 +955,11 @@ weechat.controller('WeechatCtrl', ['$rootScope', '$scope', '$store', '$timeout', // Update font family when changed $scope.$watch('fontfamily', function() { - changeClassStyle('monospace', 'fontFamily', $scope.fontfamily); + changeClassStyle('favorite-font', 'fontFamily', $scope.fontfamily); }); // Update font size when changed $scope.$watch('fontsize', function() { - changeClassStyle('monospace', 'fontSize', $scope.fontsize); + changeClassStyle('favorite-font', 'fontSize', $scope.fontsize); }); // Crude scoping hack. The keypress listener does not live in the same scope as // the checkbox, so we need to transfer this between scopes here.