Skip to content

Commit 9bfff57

Browse files
committed
Always use the same color as text uses in popups
1 parent 73224b4 commit 9bfff57

File tree

1 file changed

+3
-1
lines changed
  • app/src/main/kotlin/com/simplemobiletools/launcher/extensions

1 file changed

+3
-1
lines changed

app/src/main/kotlin/com/simplemobiletools/launcher/extensions/Activity.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import android.view.Gravity
1212
import android.view.View
1313
import android.widget.PopupMenu
1414
import androidx.core.view.forEach
15+
import com.google.android.material.color.MaterialColors
1516
import com.simplemobiletools.commons.extensions.getPopupMenuTheme
1617
import com.simplemobiletools.commons.extensions.getProperTextColor
1718
import com.simplemobiletools.commons.extensions.showErrorToast
@@ -81,7 +82,8 @@ fun Activity.handleGridItemPopupMenu(anchorView: View, gridItem: HomeScreenGridI
8182

8283
inflate(R.menu.menu_app_icon)
8384
menu.forEach {
84-
it.iconTintList = ColorStateList.valueOf(getProperTextColor())
85+
val color = MaterialColors.getColor(contextTheme, android.R.attr.textColorPrimary, getProperTextColor())
86+
it.iconTintList = ColorStateList.valueOf(color)
8587
}
8688
menu.findItem(R.id.rename).isVisible = (gridItem.type == ITEM_TYPE_ICON || gridItem.type == ITEM_TYPE_FOLDER) && !isOnAllAppsFragment
8789
menu.findItem(R.id.hide_icon).isVisible = gridItem.type == ITEM_TYPE_ICON && isOnAllAppsFragment

0 commit comments

Comments
 (0)