mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-20 05:16:01 +00:00
feat(stores): bring the launcher's motion to the stores pages (#482)
* refactor(ui): share End session's step-out as StepOut * feat(ui): let PageFlood carry a tile's art * feat(stores): bring the launcher's motion to the stores pages * fix(stores): lay out the pane's rows in a column * fix(stores): a game page no longer leaves the pad's focus on a dead card and crashes the next press * perf(stores): GOG remembers its non-games and the library cache loads off the main thread * fix(ui): a step-out's backdrop never takes the pad's focus * feat(stores): modes step out of the store chip, each store in its own colour, search in the header * feat(stores): sign-in pages in the Steam tab's style and an are-you-sure for sign out * style(stores): drop the sign-in page's store eyebrow, which the title already names * style(stores): the sign-in page is the store's name and Sign in * fix(ui): the focus ring follows a control until it stops and meets one still rising into place * feat(stores): the store a pad's focus is on shows without A, and a press never lands on where it sent focus * perf(stores): keep chip motion responsive while libraries change
This commit is contained in:
1 parent
5af14829b0
commit
c761b83112
22 files changed
+2005
-297
No files matched your search
@@ -916,6 +916,7 @@ class MainActivity : ComponentActivity() {
|
||||
|
||||
/** On the Components page the pad's LB / RB step through GPU drivers, FEX, DXVK and VKD3D-Proton, wrapping around. */
|
||||
override fun dispatchKeyEvent(event: KeyEvent): Boolean {
|
||||
if (event.keyCode == KeyEvent.KEYCODE_BUTTON_A) com.droiddeck.launcher.ui.HeldKeys.confirm = event.action == KeyEvent.ACTION_DOWN
|
||||
if (showComponents && (event.keyCode == KeyEvent.KEYCODE_BUTTON_L1 || event.keyCode == KeyEvent.KEYCODE_BUTTON_R1)) {
|
||||
if (event.action == KeyEvent.ACTION_DOWN && event.repeatCount == 0) {
|
||||
val all = listOf(com.droiddeck.launcher.ui.GPU_TAB) + ComponentsManager.COMPONENTS
|
||||
@@ -924,7 +925,15 @@ class MainActivity : ComponentActivity() {
|
||||
}
|
||||
return true
|
||||
}
|
||||
return super.dispatchKeyEvent(event)
|
||||
// Compose throws when its focus tree has lost the focused node; one key is dropped
|
||||
// instead of the app.
|
||||
return try {
|
||||
super.dispatchKeyEvent(event)
|
||||
} catch (e: IllegalStateException) {
|
||||
if (e.message?.contains("active focus target") != true) throw e
|
||||
android.util.Log.w("MainActivity", "key ${event.keyCode} dropped: ${e.message}")
|
||||
true
|
||||
}
|
||||
}
|
||||
|
||||
override fun onResume() {
|
||||
|
||||
Reference in new issue
Block a user