diff options
author | Patrik Kernstock <info@pkern.at> | 2017-06-10 17:33:01 +0200 |
---|---|---|
committer | Patrik Kernstock <info@pkern.at> | 2017-06-10 17:33:01 +0200 |
commit | c0c5df31c08d6a4927a3d0128007a51d73a744b4 (patch) | |
tree | 08c1b149f7f29c03c944e5e7f83cd85ad42de760 /core | |
parent | c88e4e2feb0387c98be0dbd845c25e3bcec2ea4a (diff) | |
download | nextcloud-server-c0c5df31c08d6a4927a3d0128007a51d73a744b4.tar.gz nextcloud-server-c0c5df31c08d6a4927a3d0128007a51d73a744b4.zip |
Decimal percentage, dynamic appIcon width
Signed-off-by: Patrik Kernstock <info@pkern.at>
Diffstat (limited to 'core')
-rw-r--r-- | core/js/js.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/core/js/js.js b/core/js/js.js index 2cb94c9cf2b..7264198dc8c 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--; |