User configurable font choice. Fixes #351
This commit is contained in:
parent
77ffbb2f22
commit
cdcdcb096b
2 changed files with 11 additions and 0 deletions
|
@ -367,6 +367,11 @@ $ openssl req -nodes -newkey rsa:4096 -keyout relay.pem -x509 -days 365 -out rel
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
Override font
|
||||||
|
<br>
|
||||||
|
<input type="text" ng-model="fontfamily">
|
||||||
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<form class="form-inline" role="form">
|
<form class="form-inline" role="form">
|
||||||
<div class="checkbox">
|
<div class="checkbox">
|
||||||
|
|
|
@ -842,6 +842,8 @@ weechat.controller('WeechatCtrl', ['$rootScope', '$scope', '$store', '$timeout',
|
||||||
$store.bind($scope, "showtimestampSeconds", false);
|
$store.bind($scope, "showtimestampSeconds", false);
|
||||||
// Save setting for playing sound on notification
|
// Save setting for playing sound on notification
|
||||||
$store.bind($scope, "soundnotification", false);
|
$store.bind($scope, "soundnotification", false);
|
||||||
|
// Save setting for font family
|
||||||
|
$store.bind($scope, "fontfamily", $('.monospace').css('font-family'));
|
||||||
|
|
||||||
// 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;
|
||||||
|
@ -890,6 +892,10 @@ weechat.controller('WeechatCtrl', ['$rootScope', '$scope', '$store', '$timeout',
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Update font family when changed
|
||||||
|
$scope.$watch('fontfamily', function() {
|
||||||
|
$('.monospace').css('font-family', $scope.fontfamily);
|
||||||
|
});
|
||||||
|
|
||||||
$scope.setActiveBuffer = function(bufferId, key) {
|
$scope.setActiveBuffer = function(bufferId, key) {
|
||||||
// If we are on mobile we need to collapse the menu on sidebar clicks
|
// If we are on mobile we need to collapse the menu on sidebar clicks
|
||||||
|
|
Loading…
Reference in a new issue