mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-24 21:42:51 -05:00
feat(bar): enlarge bar icons if widget background is off (#1425)
* use iconSizeLarge if noBackground is on * widgets: pass noBackground to barIconSize in param
This commit is contained in:
@@ -752,9 +752,11 @@ Singleton {
|
||||
return (0.299 * c.r + 0.587 * c.g + 0.114 * c.b) < 0.5;
|
||||
}
|
||||
|
||||
function barIconSize(barThickness, offset) {
|
||||
function barIconSize(barThickness, offset, noBackground) {
|
||||
const defaultOffset = offset !== undefined ? offset : -6;
|
||||
return Math.round((barThickness / 48) * (iconSize + defaultOffset));
|
||||
const size = (noBackground ?? false) ? iconSizeLarge : iconSize;
|
||||
|
||||
return Math.round((barThickness / 48) * (size + defaultOffset));
|
||||
}
|
||||
|
||||
function barTextSize(barThickness, fontScale) {
|
||||
|
||||
Reference in New Issue
Block a user