Merge pull request #384 from glowing-bear/default-font
Make sure that a favourite font is always set when using Glowing Bear.
This commit is contained in:
commit
dc1ce08800
4 changed files with 18 additions and 18 deletions
|
@ -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;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<form class="form form-horizontal" id="inputform" ng-submit="sendMessage()">
|
||||
<div class="input-group">
|
||||
<textarea id="{{inputId}}" class="form-control monospace" ng-trim="false" rows="1" autocomplete="off" ng-model="command">
|
||||
<textarea id="{{inputId}}" class="form-control favorite-font" ng-trim="false" rows="1" autocomplete="off" ng-model="command">
|
||||
</textarea>
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-default btn-primary">Send</button>
|
||||
|
|
10
index.html
10
index.html
|
@ -60,11 +60,11 @@
|
|||
<div class="form-group">
|
||||
<label class="control-label" for="host">WeeChat relay hostname and port number</label>
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control monospace" id="host" ng-model="host" placeholder="Address">
|
||||
<input type="text" class="form-control monospace" id="port" ng-model="port" placeholder="Port">
|
||||
<input type="text" class="form-control favorite-font" id="host" ng-model="host" placeholder="Address">
|
||||
<input type="text" class="form-control favorite-font" id="port" ng-model="port" placeholder="Port">
|
||||
</div>
|
||||
<label class="control-label" for="password">WeeChat relay password</label>
|
||||
<input type="password" class="form-control monospace" id="password" ng-model="password" placeholder="Password">
|
||||
<input type="password" class="form-control favorite-font" id="password" ng-model="password" placeholder="Password">
|
||||
<div class="alert alert-danger" ng-show="passwordError">
|
||||
Error: wrong password
|
||||
</div>
|
||||
|
@ -217,7 +217,7 @@ $ openssl req -nodes -newkey rsa:4096 -keyout relay.pem -x509 -days 365 -out rel
|
|||
<ul class="nav nav-pills nav-stacked" ng-class="{'indented': (predicate === 'serverSortKey')}">
|
||||
<li class="bufferfilter">
|
||||
<form role="form">
|
||||
<input class="form-control monospace" type="text" id="bufferFilter" ng-model="search" ng-keydown="handleSearchBoxKey($event)" placeholder="Search">
|
||||
<input class="form-control favorite-font" type="text" id="bufferFilter" ng-model="search" ng-keydown="handleSearchBoxKey($event)" placeholder="Search">
|
||||
</form>
|
||||
</li>
|
||||
<li class="buffer" ng-class="{'active': buffer.active, 'indent': buffer.indent }" ng-repeat="(key, buffer) in (filteredBuffers = (getBuffers() | toArray | filter:{fullName:search} | filter:hasUnread | orderBy:predicate))">
|
||||
|
@ -228,7 +228,7 @@ $ openssl req -nodes -newkey rsa:4096 -keyout relay.pem -x509 -days 365 -out rel
|
|||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div bindonce id="bufferlines" class="monospace" ng-swipe-right="showSidebar()" ng-swipe-left="hideSidebar()" ng-class="{'withnicklist': showNicklist}">
|
||||
<div bindonce id="bufferlines" class="favorite-font" ng-swipe-right="showSidebar()" ng-swipe-left="hideSidebar()" ng-class="{'withnicklist': showNicklist}">
|
||||
<div id="nicklist" ng-if="showNicklist" ng-swipe-right="closeNick()" class="vertical-line-left">
|
||||
<ul class="nicklistgroup list-unstyled" ng-repeat="group in nicklist">
|
||||
<li ng-repeat="nick in group.nicks|orderBy:'name'">
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue