fix: Dynamically get app widget popup icon
This commit is contained in:
@@ -20,6 +20,7 @@ This is a developer-focused change log:
|
||||
* Better At-a-Glance perceptive wallpaper colour luminance detection
|
||||
* Big word that means Lawnchair will take system default hint bright/dark theme and fallback to luminosity detection for bright/dark mode detection in At a Glance.
|
||||
* Variable font for Launcher3 (????????)
|
||||
* Dynamically get app widget popup icon
|
||||
|
||||
### 🥞 Snapshot 9 (Development 4 Release 1)
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ import com.android.launcher3.Launcher
|
||||
import com.android.launcher3.R
|
||||
import com.android.launcher3.Utilities
|
||||
import com.android.launcher3.logging.StatsLogManager.LauncherEvent
|
||||
import com.android.launcher3.popup.SystemShortcut
|
||||
import com.android.launcher3.views.OptionsPopupView.OptionItem
|
||||
import com.patrykmichalik.opto.core.firstBlocking
|
||||
import com.patrykmichalik.opto.core.setBlocking
|
||||
@@ -104,7 +105,7 @@ object LauncherOptionsPopup {
|
||||
"widgets" to OptionItem(
|
||||
launcher,
|
||||
R.string.widget_button_text,
|
||||
R.drawable.ic_widget,
|
||||
SystemShortcut.Widgets.getDrawableId(),
|
||||
LauncherEvent.LAUNCHER_WIDGETSTRAY_BUTTON_TAP_OR_LONGPRESS,
|
||||
onStartWidgetsMenu,
|
||||
),
|
||||
@@ -172,7 +173,7 @@ object LauncherOptionsPopup {
|
||||
|
||||
"widgets" -> LauncherOptionMetadata(
|
||||
label = R.string.widget_button_text,
|
||||
icon = R.drawable.ic_widget,
|
||||
icon = SystemShortcut.Widgets.getDrawableId(),
|
||||
)
|
||||
|
||||
"all_apps" -> LauncherOptionMetadata(
|
||||
|
||||
Reference in New Issue
Block a user