Set and bind font-family if unset

Default for desktop is monospace and default for mobile
is sans-serif
This commit is contained in:
David Cormier 2014-07-24 21:41:33 -04:00
parent 7c5a396171
commit 9b55244f13

View file

@ -872,6 +872,14 @@ weechat.controller('WeechatCtrl', ['$rootScope', '$scope', '$store', '$timeout',
// Save setting for readline keybindings // Save setting for readline keybindings
$store.bind($scope, "readlineBindings", false); $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 // Save setting for displaying embeds in rootScope so it can be used from service
$rootScope.visible = $scope.noembed === false; $rootScope.visible = $scope.noembed === false;