Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,30 @@
</intent-filter>
</activity>

<activity-alias
android:name=".PrideIconAlias"
android:enabled="false"
android:exported="true"
android:icon="@mipmap/ic_pride"
android:targetActivity=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity-alias>

<activity-alias
android:name=".TransIconAlias"
android:enabled="false"
android:exported="true"
android:icon="@mipmap/ic_trans"
android:targetActivity=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity-alias>

<provider
android:name=".UserDirectoryProvider"
android:authorities="com.geode.launcher.user"
Expand Down
Binary file added app/src/main/ic_pride-playstore.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/ic_trans-playstore.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ import android.app.UiModeManager
import android.content.ActivityNotFoundException
import android.content.ClipData
import android.content.ClipboardManager
import android.content.ComponentName
import android.content.Context
import android.content.Intent
import android.content.pm.PackageManager
import android.os.Build
import android.os.Bundle
import android.provider.DocumentsContract
Expand Down Expand Up @@ -321,6 +323,32 @@ fun SettingsScreen(
title = stringResource(R.string.preferences_open_file_manager),
onClick = { onOpenFileManager(context) }
)
SettingsSelectCard(
title = stringResource(R.string.preference_icon_name),
dialogTitle = stringResource(R.string.preference_icon_select),
preferenceKey = PreferenceUtils.Key.ICON,
options = linkedMapOf(
0 to stringResource(R.string.preference_icon_default),
1 to stringResource(R.string.preference_icon_pride),
2 to stringResource(R.string.preference_icon_trans),
),
extraSelectBehavior = {
val pm = context.packageManager
val components = mapOf(
0 to ComponentName(context, "${context.packageName}.MainActivity"),
1 to ComponentName(context, "${context.packageName}.PrideIconAlias"),
2 to ComponentName(context, "${context.packageName}.TransIconAlias")
)

components.forEach { (key, component) ->
pm.setComponentEnabledSetting(
component,
if (it == key) PackageManager.COMPONENT_ENABLED_STATE_ENABLED else PackageManager.COMPONENT_ENABLED_STATE_DISABLED,
PackageManager.DONT_KILL_APP
)
}
}
)
}

OptionsGroup(stringResource(R.string.preference_category_gameplay)) {
Expand Down
2 changes: 2 additions & 0 deletions app/src/main/java/com/geode/launcher/utils/PreferenceUtils.kt
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ class PreferenceUtils(private val sharedPreferences: SharedPreferences) {
SCREEN_ZOOM_FIT,
LIMIT_FRAME_RATE,
USE_INDEX_API,
ICON,
}

private fun defaultValueForBooleanKey(key: Key): Boolean {
Expand Down Expand Up @@ -198,6 +199,7 @@ class PreferenceUtils(private val sharedPreferences: SharedPreferences) {
Key.SCREEN_ZOOM_FIT -> "PreferenceScreenZoomFit"
Key.LIMIT_FRAME_RATE -> "PreferenceLimitFrameRate"
Key.USE_INDEX_API -> "PreferenceUseIndexApi"
Key.ICON -> "PreferenceIcon"
}
}

Expand Down
38 changes: 38 additions & 0 deletions app/src/main/res/drawable/ic_pride_background.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
android:height="108dp"
android:viewportWidth="1024"
android:viewportHeight="1024">
<group android:scaleX="0.66"
android:scaleY="0.66"
android:translateX="174.08"
android:translateY="174.08">
<group>
<clip-path
android:pathData="M0,0h1024v1024h-1024z"/>
<group>
<clip-path
android:pathData="M0,200C0,89.5 89.5,0 200,0H824C934.5,0 1024,89.5 1024,200V824C1024,934.5 934.5,1024 824,1024H200C89.5,1024 0,934.5 0,824V200Z"/>
<path
android:pathData="M0,200C0,89.5 89.5,0 200,0H824C934.5,0 1024,89.5 1024,200V824C1024,934.5 934.5,1024 824,1024H200C89.5,1024 0,934.5 0,824V200Z"
android:fillColor="#D88484"/>
<path
android:pathData="M719.5,289C618,241.7 526,152.5 320.5,152.5C115,152.5 3.5,248 -8.5,293C-20.5,338 -8.2,391.5 -13.5,390.5L-33,706.5H1145V499C1123,465.8 1043.5,399 1007,391.5C970.5,384 822.5,337 719.5,289Z"
android:fillColor="#D2BD77"/>
<path
android:pathData="M561.5,514.5C488.5,476.5 341,402 214.5,402C88,402 30.3,440.7 -8.5,461.5C-47.3,482.3 -54,485.2 -59,486.5L-68.5,808L563.5,814.5L561.5,514.5Z"
android:fillColor="#5FB886"/>
<path
android:pathData="M1020.5,551C994,521.2 893.7,454.1 662.5,452.5C539.2,451.6 363,505.6 259,577.5C163.9,643.2 -24,717.5 -80,723.5L-132.5,964.5L1195.5,887L1020.5,551Z"
android:fillColor="#6493B4"/>
<path
android:pathData="M819.5,856C638,856 518,772.5 359,772.5C200,772.5 100,860.5 65,869L-94,949.5V1041.5L1177.5,1025.5L1030.5,715.5C1026,735.5 967.4,856 819.5,856Z"
android:fillColor="#765A94"/>
</group>
<path
android:pathData="M824,0C934.5,0 1024,89.5 1024,200V824C1024,934.5 934.5,1024 824,1024H200C89.5,1024 -0,934.5 -0,824V200C-0,89.5 89.5,0 200,0H824Z"
android:fillColor="#000000"
android:fillAlpha="0.05"/>
</group>
</group>
</vector>
34 changes: 34 additions & 0 deletions app/src/main/res/drawable/ic_trans_background.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
android:height="108dp"
android:viewportWidth="1024"
android:viewportHeight="1024">
<group android:scaleX="0.66"
android:scaleY="0.66"
android:translateX="174.08"
android:translateY="174.08">
<group>
<clip-path
android:pathData="M0,0h1024v1024h-1024z"/>
<group>
<clip-path
android:pathData="M0,200C0,89.5 89.5,0 200,0H824C934.5,0 1024,89.5 1024,200V824C1024,934.5 934.5,1024 824,1024H200C89.5,1024 0,934.5 0,824V200Z"/>
<path
android:pathData="M0,200C0,89.5 89.5,0 200,0H824C934.5,0 1024,89.5 1024,200V824C1024,934.5 934.5,1024 824,1024H200C89.5,1024 0,934.5 0,824V200Z"
android:fillColor="#6AC2CC"/>
<path
android:pathData="M719.5,289C618,241.7 526,152.5 320.5,152.5C115,152.5 3.5,248 -8.5,293C-20.5,338 -8.2,391.5 -13.5,390.5L-33,706.5H1145V499C1123,465.8 1043.5,399 1007,391.5C970.5,384 822.5,337 719.5,289Z"
android:fillColor="#EAAED9"/>
<path
android:pathData="M561.5,514.5C488.5,476.5 341,402 214.5,402C88,402 30.3,440.7 -8.5,461.5C-47.3,482.3 -54,485.2 -59,486.5L-68.5,808L712.5,814.5V589L561.5,514.5Z"
android:fillColor="#EBF5F7"/>
<path
android:pathData="M1021,626.8C994.5,601.7 894.2,545.4 663,544C539.7,543.3 363.5,588.6 259.5,649C164.4,704.2 0.5,762.2 -55.5,767.2L-111,904.8L1196,909L1021,626.8Z"
android:fillColor="#CE8CC7"/>
<path
android:pathData="M819.5,856C638,856 518,772.5 359,772.5C200,772.5 100,860.5 65,869L-94,949.5V1041.5L1177.5,1025.5L1030.5,715.5C1026,735.5 967.4,856 819.5,856Z"
android:fillColor="#26A7C1"/>
</group>
</group>
</group>
</vector>
5 changes: 5 additions & 0 deletions app/src/main/res/mipmap-anydpi-v26/ic_pride.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_pride_background"/>
<foreground android:drawable="@mipmap/ic_monochrome_foreground"/>
</adaptive-icon>
5 changes: 5 additions & 0 deletions app/src/main/res/mipmap-anydpi-v26/ic_trans.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_trans_background"/>
<foreground android:drawable="@mipmap/ic_monochrome_foreground"/>
</adaptive-icon>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/mipmap-hdpi/ic_pride.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/mipmap-hdpi/ic_trans.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/mipmap-mdpi/ic_pride.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/mipmap-mdpi/ic_trans.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/mipmap-xhdpi/ic_pride.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/mipmap-xhdpi/ic_trans.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/mipmap-xxhdpi/ic_pride.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/mipmap-xxhdpi/ic_trans.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/mipmap-xxxhdpi/ic_pride.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/mipmap-xxxhdpi/ic_trans.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,11 @@
<string name="preference_black_background_name">Black background in dark theme</string>
<string name="preference_force_hrr">Force maximum refresh rate</string>
<string name="preference_enable_redesign">✨ Enable UI refresh</string>
<string name="preference_icon_name">Icon</string>
<string name="preference_icon_select">Select icon</string>
<string name="preference_icon_default">Default</string>
<string name="preference_icon_pride">Pride</string>
<string name="preference_icon_trans">Trans</string>

<string name="preference_display_mode_name">Display mode</string>
<string name="preference_display_mode_select">Select display mode</string>
Expand Down