add background opacity (fix #58)

This commit is contained in:
Simon Vieille 2021-07-03 20:23:39 +02:00
commit d2a8b05772
4 changed files with 64 additions and 0 deletions

View file

@ -99,6 +99,8 @@ class CssController extends Controller
$iconInvertFilter = abs($this->config->getAppValueInt('dark-mode-icon-invert-filter', '0')).'%';
$iconOpacity = abs($this->config->getAppValueInt('dark-mode-icon-opacity', '100') / 100);
$opener = $this->config->getAppValue('dark-mode-opener', 'side-menu-opener');
$backgroundOpacity = dechex($this->config->getAppValueInt('dark-mode-background-color-opacity', '100') * 255 / 100);
} else {
$backgroundColor = $this->config->getAppValue('background-color', '#333333');
$backgroundColorTo = $this->config->getAppValue('background-color-to', $backgroundColor);
@ -108,8 +110,13 @@ class CssController extends Controller
$iconInvertFilter = abs($this->config->getAppValueInt('icon-invert-filter', '0')).'%';
$iconOpacity = abs($this->config->getAppValueInt('icon-opacity', '100') / 100);
$opener = $this->config->getAppValue('opener', 'side-menu-opener');
$backgroundOpacity = dechex($this->config->getAppValueInt('background-color-opacity', '100') * 255 / 100);
}
$backgroundColor .= $backgroundOpacity;
$backgroundColorTo .= $backgroundOpacity;
return [
'vars' => [
'background-color' => $backgroundColor,