Enlarged Wallet Details header to fit Receive and Send buttons without covering the unlocked balance.

This commit is contained in:
Brendon Duncan 2018-08-13 16:45:46 +12:00
commit 6de4f2ecda

View file

@ -304,6 +304,7 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun
};
function refreshAmountSection(scrollPos) {
var AMOUNT_HEIGHT_BASE = 270;
$scope.showBalanceButton = false;
if ($scope.status) {
$scope.showBalanceButton = ($scope.status.totalBalanceSat != $scope.status.spendableAmount);
@ -315,16 +316,16 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun
}
scrollPos = scrollPos || 0;
var amountHeight = 210 - scrollPos;
var amountHeight = AMOUNT_HEIGHT_BASE - scrollPos;
if (amountHeight < 80) {
amountHeight = 80;
}
var contentMargin = amountHeight;
if (contentMargin > 210) {
contentMargin = 210;
if (contentMargin > AMOUNT_HEIGHT_BASE) {
contentMargin = AMOUNT_HEIGHT_BASE;
}
var amountScale = (amountHeight / 210);
var amountScale = (amountHeight / AMOUNT_HEIGHT_BASE);
if (amountScale < 0.5) {
amountScale = 0.5;
}