Merge pull request #438 from jamal2362/main
Scale Themed icons to original app icon size
This commit is contained in:
commit
29620e69cd
@ -69,7 +69,7 @@ data class LauncherApp(
|
|||||||
return StaticLauncherIcon(
|
return StaticLauncherIcon(
|
||||||
foregroundLayer = TintedIconLayer(
|
foregroundLayer = TintedIconLayer(
|
||||||
icon = ContextCompat.getDrawable(context, R.drawable.ic_file_android)!!,
|
icon = ContextCompat.getDrawable(context, R.drawable.ic_file_android)!!,
|
||||||
scale = 0.5f,
|
scale = 0.65f,
|
||||||
color = 0xff3dda84.toInt(),
|
color = 0xff3dda84.toInt(),
|
||||||
),
|
),
|
||||||
backgroundLayer = ColorLayer(0xff3dda84.toInt())
|
backgroundLayer = ColorLayer(0xff3dda84.toInt())
|
||||||
@ -91,7 +91,7 @@ data class LauncherApp(
|
|||||||
if (themed && isAtLeastApiLevel(33) && icon.monochrome != null) {
|
if (themed && isAtLeastApiLevel(33) && icon.monochrome != null) {
|
||||||
return StaticLauncherIcon(
|
return StaticLauncherIcon(
|
||||||
foregroundLayer = TintedIconLayer(
|
foregroundLayer = TintedIconLayer(
|
||||||
scale = 1f,
|
scale = 1.5f,
|
||||||
icon = icon.monochrome!!,
|
icon = icon.monochrome!!,
|
||||||
),
|
),
|
||||||
backgroundLayer = ColorLayer()
|
backgroundLayer = ColorLayer()
|
||||||
|
|||||||
@ -21,7 +21,7 @@ interface AppShortcut: SavableSearchable {
|
|||||||
foregroundLayer = TintedIconLayer(
|
foregroundLayer = TintedIconLayer(
|
||||||
color = 0xFF3DDA84.toInt(),
|
color = 0xFF3DDA84.toInt(),
|
||||||
icon = ContextCompat.getDrawable(context, R.drawable.ic_file_android)!!,
|
icon = ContextCompat.getDrawable(context, R.drawable.ic_file_android)!!,
|
||||||
scale = 0.5f,
|
scale = 0.65f,
|
||||||
),
|
),
|
||||||
backgroundLayer = ColorLayer(0xFF3DDA84.toInt()),
|
backgroundLayer = ColorLayer(0xFF3DDA84.toInt()),
|
||||||
)
|
)
|
||||||
|
|||||||
@ -80,7 +80,7 @@ data class LauncherShortcut(
|
|||||||
foregroundLayer = TintedIconLayer(
|
foregroundLayer = TintedIconLayer(
|
||||||
color = 0xFF3DDA84.toInt(),
|
color = 0xFF3DDA84.toInt(),
|
||||||
icon = ContextCompat.getDrawable(context, R.drawable.ic_file_android)!!,
|
icon = ContextCompat.getDrawable(context, R.drawable.ic_file_android)!!,
|
||||||
scale = 0.5f,
|
scale = 0.65f,
|
||||||
),
|
),
|
||||||
backgroundLayer = ColorLayer(0xFF3DDA84.toInt()),
|
backgroundLayer = ColorLayer(0xFF3DDA84.toInt()),
|
||||||
)
|
)
|
||||||
|
|||||||
@ -278,7 +278,7 @@ class IconPackManager(
|
|||||||
return StaticLauncherIcon(
|
return StaticLauncherIcon(
|
||||||
foregroundLayer = TintedIconLayer(
|
foregroundLayer = TintedIconLayer(
|
||||||
icon = drawable,
|
icon = drawable,
|
||||||
scale = 0.5f,
|
scale = 0.65f,
|
||||||
),
|
),
|
||||||
backgroundLayer = ColorLayer(),
|
backgroundLayer = ColorLayer(),
|
||||||
)
|
)
|
||||||
|
|||||||
@ -185,7 +185,7 @@ fun AdaptiveIconDrawableCompat.toLauncherIcon(
|
|||||||
if (themed && this.monochrome != null) {
|
if (themed && this.monochrome != null) {
|
||||||
return StaticLauncherIcon(
|
return StaticLauncherIcon(
|
||||||
foregroundLayer = TintedIconLayer(
|
foregroundLayer = TintedIconLayer(
|
||||||
scale = 1f,
|
scale = 1.5f,
|
||||||
icon = this.monochrome,
|
icon = this.monochrome,
|
||||||
),
|
),
|
||||||
backgroundLayer = ColorLayer()
|
backgroundLayer = ColorLayer()
|
||||||
|
|||||||
@ -23,7 +23,7 @@ internal class ForceThemedIconTransformation : LauncherIconTransformation {
|
|||||||
is StaticIconLayer -> TintedIconLayer(
|
is StaticIconLayer -> TintedIconLayer(
|
||||||
color = 0,
|
color = 0,
|
||||||
icon = layer.icon,
|
icon = layer.icon,
|
||||||
scale = layer.scale / 1.5f,
|
scale = layer.scale / 1.2f,
|
||||||
)
|
)
|
||||||
is TextLayer -> layer.copy(
|
is TextLayer -> layer.copy(
|
||||||
color = 0
|
color = 0
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user