]> source.dussan.org Git - nextcloud-server.git/commitdiff
Theming: Fix preview and center alignment of logo 525/head
authorJulius Haertl <jus@bitgrid.net>
Mon, 25 Jul 2016 16:54:13 +0000 (18:54 +0200)
committerJulius Haertl <jus@bitgrid.net>
Mon, 25 Jul 2016 16:54:13 +0000 (18:54 +0200)
apps/theming/js/settings-admin.js
core/css/header.css

index 85e781411ed3fecdc9d6dbce1493dc1fc05201f3..941ec5c711bddc4ce25fc9b711986ce5637cd9bf 100644 (file)
@@ -75,11 +75,11 @@ function preview(setting, value) {
                var logos = document.getElementsByClassName('logo-icon');
                var timestamp = new Date().getTime();
                if (value !== '') {
-                       logos[0].style.background = "url('" + OC.generateUrl('/apps/theming/logo') + "?v" + timestamp + "')";
-                       logos[0].style.backgroundSize = "62px 34px";
+                       logos[0].style.backgroundImage = "url('" + OC.generateUrl('/apps/theming/logo') + "?v" + timestamp + "')";
+                       logos[0].style.backgroundSize = "contain";
                } else {
-                       logos[0].style.background = "url('" + OC.getRootPath() + '/core/img/logo-icon.svg?v' + timestamp +"')";
-                       logos[0].style.backgroundSize = "62px 34px";
+                       logos[0].style.backgroundImage = "url('" + OC.getRootPath() + '/core/img/logo-icon.svg?v' + timestamp +"')";
+                       logos[0].style.backgroundSize = "contain";
                }
        }
 }
index cf7c981955eadf91fc5cdf547323eeddce972963..6078008f91f814ce52c1091c5f4b5e5499fe06a7 100644 (file)
@@ -82,6 +82,7 @@
        display: inline-block;
        background-image: url('../img/logo-icon.svg');
        background-repeat: no-repeat;
+       background-position: center center;
        width: 62px;
        height: 34px;
 }