Skip to content

Commit

Permalink
Update icons
Browse files Browse the repository at this point in the history
* Fix and re-add monochrome icon
* Update splashscreen icon
* Fix clipping of app icon on certain devices
  • Loading branch information
SuperDragonXD committed Sep 11, 2024
1 parent 89a5c3e commit ae64961
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 79 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ package app.lawnchair.lawnicons.util
import android.content.Context
import android.graphics.Bitmap
import androidx.core.graphics.drawable.toBitmap
import app.lawnchair.lawnicons.R

fun Context.appIcon(): Bitmap = packageManager
.getApplicationIcon(packageName)
fun Context.appIcon(): Bitmap = (this.resources.getDrawable(R.mipmap.ic_launcher, this.theme)
?: packageManager.getApplicationIcon(packageName))
.toBitmap()
14 changes: 10 additions & 4 deletions app/src/main/res/drawable/ic_launcher_monochrome.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,14 @@
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<path
android:pathData="M25.52,25.53a15.28,15.28 0,0 1,21.72 0c6,6.04 6,15.83 0,21.87a15.28,15.28 0,0 1,-21.72 0c-6,-6.04 -6,-15.83 0,-21.87ZM42.35,30.46a8.4,8.4 0,0 0,-11.93 0c-3.3,3.32 -3.3,8.7 0,12.01a8.4,8.4 0,0 0,11.93 0c3.3,-3.32 3.3,-8.7 0,-12.01ZM65.8,28.84c-0.96,0 -1.73,0.78 -1.73,1.74v11.76c0,0.96 0.77,1.74 1.73,1.74h11.68c0.95,0 1.73,-0.78 1.73,-1.74L79.21,30.58c0,-0.96 -0.77,-1.74 -1.73,-1.74L65.8,28.84ZM57.15,30.58c0,-4.81 3.87,-8.71 8.65,-8.71h11.68c4.78,0 8.65,3.9 8.65,8.71v11.76c0,4.81 -3.87,8.71 -8.65,8.71L65.8,51.06c-4.78,0 -8.65,-3.9 -8.65,-8.71L57.15,30.58ZM37.89,64.13a0.86,0.86 0,0 0,-1.5 0l-8.34,14.54a0.87,0.87 0,0 0,0.75 1.31h16.67a0.87,0.87 0,0 0,0.75 -1.31l-8.34,-14.54ZM30.39,60.64c3,-5.23 10.49,-5.23 13.49,0l8.34,14.54c3,5.23 -0.75,11.76 -6.74,11.76L28.8,86.94c-5.99,0 -9.74,-6.53 -6.74,-11.76l8.34,-14.54ZM63.57,60.67c1.64,-2.75 4.64,-4.6 8.07,-4.6 3.43,0 6.43,1.85 8.07,4.6 0.62,1.04 1.68,2.11 2.72,2.74A9.48,9.48 0,0 1,87 71.54a9.48,9.48 0,0 1,-4.57 8.13c-1.03,0.63 -2.1,1.7 -2.72,2.74 -1.64,2.75 -4.64,4.6 -8.07,4.6 -3.43,0 -6.43,-1.85 -8.07,-4.6 -0.62,-1.04 -1.68,-2.11 -2.72,-2.74a9.49,9.49 0,0 1,-4.57 -8.13,9.48 9.48,0 0,1 4.57,-8.13c1.03,-0.63 2.1,-1.7 2.72,-2.74ZM69.5,64.26c-1.21,2.02 -3.08,3.91 -5.09,5.12a2.51,2.51 0,0 0,-1.21 2.15c0,0.91 0.48,1.71 1.21,2.15 2.01,1.21 3.88,3.1 5.09,5.12a2.48,2.48 0,0 0,4.27 0c1.21,-2.02 3.08,-3.91 5.09,-5.12a2.51,2.51 0,0 0,1.21 -2.15c0,-0.91 -0.48,-1.71 -1.21,-2.15 -2.01,-1.21 -3.88,-3.1 -5.09,-5.13a2.48,2.48 0,0 0,-4.27 0Z"
android:fillColor="#000"
android:fillType="evenOdd"/>
<group
android:scaleX="0.65"
android:scaleY="0.65"
android:translateX="18.9"
android:translateY="18.9">
<path
android:pathData="M25.52,25.53a15.28,15.28 0,0 1,21.72 0c6,6.04 6,15.83 0,21.87a15.28,15.28 0,0 1,-21.72 0c-6,-6.04 -6,-15.83 0,-21.87ZM42.35,30.46a8.4,8.4 0,0 0,-11.93 0c-3.3,3.32 -3.3,8.7 0,12.01a8.4,8.4 0,0 0,11.93 0c3.3,-3.32 3.3,-8.7 0,-12.01ZM65.8,28.84c-0.96,0 -1.73,0.78 -1.73,1.74v11.76c0,0.96 0.77,1.74 1.73,1.74h11.68c0.95,0 1.73,-0.78 1.73,-1.74L79.21,30.58c0,-0.96 -0.77,-1.74 -1.73,-1.74L65.8,28.84ZM57.15,30.58c0,-4.81 3.87,-8.71 8.65,-8.71h11.68c4.78,0 8.65,3.9 8.65,8.71v11.76c0,4.81 -3.87,8.71 -8.65,8.71L65.8,51.06c-4.78,0 -8.65,-3.9 -8.65,-8.71L57.15,30.58ZM37.89,64.13a0.86,0.86 0,0 0,-1.5 0l-8.34,14.54a0.87,0.87 0,0 0,0.75 1.31h16.67a0.87,0.87 0,0 0,0.75 -1.31l-8.34,-14.54ZM30.39,60.64c3,-5.23 10.49,-5.23 13.49,0l8.34,14.54c3,5.23 -0.75,11.76 -6.74,11.76L28.8,86.94c-5.99,0 -9.74,-6.53 -6.74,-11.76l8.34,-14.54ZM63.57,60.67c1.64,-2.75 4.64,-4.6 8.07,-4.6 3.43,0 6.43,1.85 8.07,4.6 0.62,1.04 1.68,2.11 2.72,2.74A9.48,9.48 0,0 1,87 71.54a9.48,9.48 0,0 1,-4.57 8.13c-1.03,0.63 -2.1,1.7 -2.72,2.74 -1.64,2.75 -4.64,4.6 -8.07,4.6 -3.43,0 -6.43,-1.85 -8.07,-4.6 -0.62,-1.04 -1.68,-2.11 -2.72,-2.74a9.49,9.49 0,0 1,-4.57 -8.13,9.48 9.48,0 0,1 4.57,-8.13c1.03,-0.63 2.1,-1.7 2.72,-2.74ZM69.5,64.26c-1.21,2.02 -3.08,3.91 -5.09,5.12a2.51,2.51 0,0 0,-1.21 2.15c0,0.91 0.48,1.71 1.21,2.15 2.01,1.21 3.88,3.1 5.09,5.12a2.48,2.48 0,0 0,4.27 0c1.21,-2.02 3.08,-3.91 5.09,-5.12a2.51,2.51 0,0 0,1.21 -2.15c0,-0.91 -0.48,-1.71 -1.21,-2.15 -2.01,-1.21 -3.88,-3.1 -5.09,-5.13a2.48,2.48 0,0 0,-4.27 0Z"
android:fillColor="#fff"
android:fillType="evenOdd" />
</group>
</vector>
112 changes: 41 additions & 71 deletions app/src/main/res/drawable/splashscreen.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,75 +4,45 @@
android:height="240dp"
android:viewportWidth="240"
android:viewportHeight="240">
<path
android:pathData="M200,120c0,11.17 -2.29,21.81 -6.44,31.47 -1.48,3.47 -3.21,6.82 -5.15,10.02H51.59c-1.94,-3.2 -3.67,-6.55 -5.15,-10.02 -4.15,-9.66 -6.44,-20.3 -6.44,-31.47 0,-44.18 35.82,-80 80,-80s80,35.82 80,80Z">
<aapt:attr name="android:fillColor">
<gradient
android:startX="120"
android:startY="40"
android:endX="120"
android:endY="161.49"
android:type="linear">
<item android:offset="0" android:color="#FF3C9EFF"/>
<item android:offset="1" android:color="#FF357BFF"/>
</gradient>
</aapt:attr>
</path>
<path
android:pathData="M193.56,151.47c-1.48,3.47 -3.21,6.82 -5.15,10.02 -14.03,23.09 -39.42,38.51 -68.41,38.51s-54.38,-15.42 -68.41,-38.51c-1.94,-3.2 -3.67,-6.55 -5.15,-10.02 1.6,-0.85 3.22,-1.67 4.86,-2.46 9.87,-4.76 20.32,-8.51 31.2,-11.16v-5.77h25.36v1.76c4.01,-0.3 8.06,-0.47 12.14,-0.47s8.02,0.16 11.97,0.46v-1.75h25.36v5.73c10.95,2.65 21.45,6.42 31.37,11.2 1.64,0.79 3.26,1.61 4.86,2.46Z">
<aapt:attr name="android:fillColor">
<gradient
android:startX="55.63"
android:startY="134.5"
android:endX="176.9"
android:endY="185.54"
android:type="linear">
<item android:offset="0" android:color="#FF1FEC9B"/>
<item android:offset="1" android:color="#FF22DE7B"/>
</gradient>
</aapt:attr>
</path>
<path
android:pathData="M84.3,129.99L106.06,129.99A4.67,4.67 0,0 1,110.73 134.66L110.73,156.42A4.67,4.67 0,0 1,106.06 161.09L84.3,161.09A4.67,4.67 0,0 1,79.63 156.42L79.63,134.66A4.67,4.67 0,0 1,84.3 129.99z"
android:strokeLineJoin="round"
android:strokeWidth="8"
android:fillColor="#00000000"
android:strokeColor="#1fc67b"/>
<path
android:pathData="M84.3,129.2L106.06,129.2A4.67,4.67 0,0 1,110.73 133.87L110.73,155.63A4.67,4.67 0,0 1,106.06 160.3L84.3,160.3A4.67,4.67 0,0 1,79.63 155.63L79.63,133.87A4.67,4.67 0,0 1,84.3 129.2z"
android:strokeLineJoin="round"
android:strokeWidth="8"
android:fillColor="#00000000"
android:strokeColor="#fff"/>
<path
android:pathData="M95.18,96.89m-16.68,0a16.68,16.68 0,1 1,33.36 0a16.68,16.68 0,1 1,-33.36 0"
android:strokeWidth="8"
android:fillColor="#00000000"
android:strokeColor="#2b71e1"/>
<path
android:pathData="M95.18,95.34m-16.68,0a16.68,16.68 0,1 1,33.36 0a16.68,16.68 0,1 1,-33.36 0"
android:strokeWidth="8"
android:fillColor="#00000000"
android:strokeColor="#fff"/>
<path
android:pathData="M144.65,145.54m-16.68,0a16.68,16.68 0,1 1,33.36 0a16.68,16.68 0,1 1,-33.36 0"
android:strokeWidth="8"
android:fillColor="#00000000"
android:strokeColor="#1fc67b"/>
<path
android:pathData="M144.65,144.81m-16.68,0a16.68,16.68 0,1 1,33.36 0a16.68,16.68 0,1 1,-33.36 0"
android:strokeWidth="8"
android:fillColor="#00000000"
android:strokeColor="#fff"/>
<path
android:pathData="M140.01,83.68l-12.08,21.09c-2.04,3.57 0.53,8.01 4.64,8.01h24.16c4.11,0 6.68,-4.44 4.64,-8.01l-12.08,-21.09c-2.05,-3.59 -7.23,-3.59 -9.28,0Z"
android:strokeWidth="8"
android:fillColor="#00000000"
android:strokeColor="#2b71e1"/>
<path
android:pathData="M140.01,81.89l-12.08,21.09c-2.04,3.57 0.53,8.01 4.64,8.01h24.16c4.11,0 6.68,-4.44 4.64,-8.01l-12.08,-21.09c-2.05,-3.59 -7.23,-3.59 -9.28,0Z"
android:strokeLineJoin="round"
android:strokeWidth="8"
android:fillColor="#00000000"
android:strokeColor="#fff"/>
<group>
<clip-path android:pathData="M120,40L120,40A80,80 0,0 1,200 120L200,120A80,80 0,0 1,120 200L120,200A80,80 0,0 1,40 120L40,120A80,80 0,0 1,120 40z" />
<path android:pathData="M120,40L120,40A80,80 0,0 1,200 120L200,120A80,80 0,0 1,120 200L120,200A80,80 0,0 1,40 120L40,120A80,80 0,0 1,120 40z">
<aapt:attr name="android:fillColor">
<gradient
android:startX="120"
android:startY="40"
android:endX="120"
android:endY="180.16"
android:type="linear">
<item
android:offset="0"
android:color="#FF3E9EFF" />
<item
android:offset="1"
android:color="#FF3975FF" />
</gradient>
</aapt:attr>
</path>
<path android:pathData="M247.41,254.82c0,70.36 -57.04,127.41 -127.41,127.41S-7.41,325.18 -7.41,254.82 49.63,127.41 120,127.41s127.41,57.04 127.41,127.41Z">
<aapt:attr name="android:fillColor">
<gradient
android:startX="120"
android:startY="131.32"
android:endX="120"
android:endY="211.62"
android:type="linear">
<item
android:offset="0"
android:color="#FF1EF0A2" />
<item
android:offset="1"
android:color="#FF0ADA65" />
</gradient>
</aapt:attr>
</path>
<path
android:pathData="M78.57,78.59c8.73,-8.78 22.87,-8.78 31.59,0 8.73,8.78 8.73,23.03 0,31.81 -8.73,8.78 -22.87,8.78 -31.59,0 -8.72,-8.78 -8.72,-23.03 0,-31.81ZM103.05,85.76a12.21,12.21 0,0 0,-17.35 0c-4.79,4.82 -4.79,12.65 0,17.47a12.21,12.21 0,0 0,17.35 0c4.79,-4.82 4.79,-12.65 0,-17.47ZM137.16,83.41a2.53,2.53 0,0 0,-2.52 2.54v17.11a2.53,2.53 0,0 0,2.52 2.53h16.99a2.53,2.53 0,0 0,2.52 -2.53L156.67,85.94c0,-1.4 -1.13,-2.53 -2.52,-2.53h-16.99ZM124.58,85.94c0,-7 5.64,-12.67 12.59,-12.67h16.99c6.95,0 12.59,5.67 12.59,12.67v17.11c0,7 -5.64,12.67 -12.59,12.67h-16.99c-6.95,0 -12.59,-5.67 -12.59,-12.67L124.58,85.94ZM96.56,134.73a1.25,1.25 0,0 0,-2.18 0l-12.13,21.15c-0.49,0.85 0.12,1.9 1.09,1.9h24.25c0.97,0 1.58,-1.06 1.09,-1.9l-12.13,-21.15ZM85.66,129.66c4.36,-7.6 15.26,-7.6 19.62,0l12.13,21.15c4.36,7.6 -1.09,17.11 -9.81,17.11L83.35,167.92c-8.72,0 -14.17,-9.51 -9.81,-17.11l12.13,-21.15ZM133.92,129.7c2.38,-4 6.75,-6.69 11.74,-6.69 4.99,0 9.35,2.69 11.74,6.69 0.9,1.51 2.45,3.07 3.96,3.98a13.8,13.8 0,0 1,6.65 11.82c0,5.03 -2.67,9.42 -6.65,11.82 -1.5,0.91 -3.05,2.47 -3.96,3.98 -2.38,4 -6.75,6.69 -11.74,6.69 -4.99,0 -9.35,-2.69 -11.74,-6.69 -0.9,-1.51 -2.45,-3.07 -3.95,-3.98a13.8,13.8 0,0 1,-6.65 -11.82,13.8 13.8,0 0,1 6.65,-11.82c1.51,-0.91 3.05,-2.47 3.96,-3.98ZM142.55,134.92c-1.75,2.94 -4.48,5.69 -7.4,7.45a3.64,3.64 0,0 0,-1.76 3.13c0,1.32 0.69,2.48 1.76,3.13 2.92,1.76 5.65,4.51 7.4,7.45a3.61,3.61 0,0 0,6.22 0c1.75,-2.94 4.48,-5.69 7.4,-7.45a3.64,3.64 0,0 0,1.76 -3.13,3.64 3.64,0 0,0 -1.76,-3.13c-2.92,-1.76 -5.65,-4.51 -7.4,-7.45a3.61,3.61 0,0 0,-6.21 0Z"
android:fillColor="#fff"
android:fillType="evenOdd" />
</group>
</vector>
3 changes: 2 additions & 1 deletion app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background"/>
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
</adaptive-icon>
<monochrome android:drawable="@drawable/ic_launcher_monochrome" />
</adaptive-icon>
3 changes: 2 additions & 1 deletion app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background"/>
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
</adaptive-icon>
<monochrome android:drawable="@drawable/ic_launcher_monochrome" />
</adaptive-icon>

0 comments on commit ae64961

Please sign in to comment.