Skip to content

Commit

Permalink
fix: lyric window toolbar hover problem after disable hardware accele…
Browse files Browse the repository at this point in the history
…ration
  • Loading branch information
listen1 authored Apr 24, 2021
1 parent 5d8bad8 commit 15c98a3
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion js/controller/play.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,18 @@
/* global angular notyf i18next MediaService l1Player hotkeys GithubClient isElectron require getLocalStorageValue getPlayer getPlayerAsync addPlayerListener smoothScrollTo lastfm */

function getCSSStringFromSetting(setting) {
let { backgroundAlpha } = setting;
if (backgroundAlpha === 0){
// NOTE: background alpha 0 results total transparent
// which will cause mouse leave event not trigger
// correct in windows platform for lyic window if disable
// hardware accelerate
backgroundAlpha = 0.01;
}
return `div.content.lyric-content{
font-size: ${setting.fontSize}px;
color: ${setting.color};
background: rgba(36, 36, 36, ${setting.backgroundAlpha});
background: rgba(36, 36, 36, ${backgroundAlpha});
}
div.content.lyric-content span.contentTrans {
font-size: ${setting.fontSize - 4}px;
Expand Down

0 comments on commit 15c98a3

Please sign in to comment.