From: Patrik Kernstock Date: Sat, 10 Jun 2017 15:33:01 +0000 (+0200) Subject: Decimal percentage, dynamic appIcon width X-Git-Tag: v12.0.1RC1~64^2~1 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=073d5dbc85906da8cf0fc7556ada4fbbe8ce0db0;p=nextcloud-server.git Decimal percentage, dynamic appIcon width Signed-off-by: Patrik Kernstock --- diff --git a/core/js/js.js b/core/js/js.js index b878cd35b77..80b36bad053 100644 --- a/core/js/js.js +++ b/core/js/js.js @@ -1512,9 +1512,9 @@ function initCore() { var resizeMenu = function() { var appList = $('#appmenu li'); - var usePercentualAppMenuLimit = 33; - var availableWidth = (($('#header-left').width() - $('#nextcloud').width()) / 100 * usePercentualAppMenuLimit); - var appCount = Math.floor((availableWidth)/44); + var usePercentualAppMenuLimit = 0.33; + var availableWidth = (($('#header-left').width() - $('#nextcloud').width()) * usePercentualAppMenuLimit); + var appCount = Math.floor((availableWidth / $(appList).width())); // show at least 2 apps in the popover if(appList.length-1-appCount >= 1) { appCount--;