From 482a725a8b603d59891c8526841c7203e2477c3f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Julius=20H=C3=A4rtl?= Date: Tue, 2 Aug 2016 19:18:00 +0200 Subject: [PATCH] [stable10] Change app menu to white background with dark icons (#665) * Change app menu to white * adjust opacity of icons in apps and user menu * Move to svg filter on app menu to support IE9+ * fix shading of apps icon in app menu * Fix wrong preserveAspectRatio at app menu icons * Apply inverted app icon style to newly installed icons --- core/css/header.css | 49 ++++++++++++++++++++-------------- core/templates/layout.user.php | 10 +++++-- settings/js/apps.js | 9 +++---- 3 files changed, 40 insertions(+), 28 deletions(-) diff --git a/core/css/header.css b/core/css/header.css index 6078008f91f..5a2b8009b15 100644 --- a/core/css/header.css +++ b/core/css/header.css @@ -151,7 +151,7 @@ max-height: 85%; margin-top: 0; padding-bottom: 10px; - background-color: rgba(0, 0, 0, .97); + background-color: rgba(255, 255, 255, .97); box-shadow: 0 1px 10px rgba(50, 50, 50, .7); border-radius: 3px; border-top-left-radius: 0; @@ -171,7 +171,7 @@ position: absolute; pointer-events: none; border-color: rgba(0, 0, 0, 0); - border-bottom-color: rgba(0, 0, 0, .97); + border-bottom-color: rgba(255, 255, 255, .97); border-width: 10px; margin-left: -10px; } @@ -204,25 +204,31 @@ padding-left: 0; width: 80px; text-align: center; - color: #fff; + color: #000; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; } /* icon opacity and hover effect */ - #navigation a img, + #navigation a svg, #navigation a span { - -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=70)"; - opacity: .7; + -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)"; + opacity: .5; } - #navigation a:hover img, - #navigation a:focus img, + #navigation a:hover svg, + #navigation a:focus svg, #navigation a:hover span, #navigation a:focus span, - #navigation a.active img, - #navigation a.active span { - -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)"; - opacity: 1; + #navigation a.active svg, + #navigation a.active span, + #apps-management a:hover svg, + #apps-management a:focus svg, + #apps-management a.active svg, + #apps-management a:hover span, + #apps-management a:focus span, + #apps-management a.active span { + -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=75)"; + opacity: .75; } #navigation .app-icon { @@ -234,12 +240,15 @@ /* Apps management */ #apps-management { - -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=60)"; - opacity: .6; min-height: initial; height: initial; margin: 0; } +#apps-management a svg, +#apps-management a span { + -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=30)"; + opacity: .3; +} /* loading feedback for apps */ @@ -252,8 +261,8 @@ height: 32px; } #navigation .app-loading .app-icon { - -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=10)"; - opacity: .1; + -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; + opacity: 0; } #apps { @@ -351,8 +360,8 @@ height: 40px; color: #000; padding: 4px 12px 0; - -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=70)"; - opacity: .7; + -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)"; + opacity: .5; box-sizing: border-box; } #expanddiv a img { @@ -363,8 +372,8 @@ #expanddiv a:focus, #expanddiv a:active, #expanddiv a.active { - -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)"; - opacity: 1; + -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=75)"; + opacity: .75; } /* do not show display name when profile picture is present */ diff --git a/core/templates/layout.user.php b/core/templates/layout.user.php index b3b492ecac4..be5c769ab76 100644 --- a/core/templates/layout.user.php +++ b/core/templates/layout.user.php @@ -113,7 +113,10 @@
  • class="active"> - + + + + @@ -128,7 +131,10 @@
  • class="active"> - + + + + t('Apps')); ?> diff --git a/settings/js/apps.js b/settings/js/apps.js index 55847162350..66c097e1257 100644 --- a/settings/js/apps.js +++ b/settings/js/apps.js @@ -396,7 +396,9 @@ OC.Settings.Apps = OC.Settings.Apps || { if(container.children('li[data-id="'+entry.id+'"]').length === 0){ var li=$('
  • '); li.attr('data-id', entry.id); - var img= $('').attr({ src: entry.icon}); + var img = ''; + img += ''; + img += ''; var a=$('').attr('href', entry.href); var filename=$(''); var loading = $('
    ').css('display', 'none'); @@ -425,11 +427,6 @@ OC.Settings.Apps = OC.Settings.Apps || { .animate({opacity: 0.5}) .animate({opacity: 1}) .animate({opacity: 0.75}); - - if (!OC.Util.hasSVGSupport() && entry.icon.match(/\.svg$/i)) { - $(img).addClass('svg'); - OC.Util.replaceSVG(); - } } } -- 2.39.5