Commit Graph
105 Commits
Author SHA1 Message Date
Henrik RydgårdandClaude Sonnet 5.5 cbb553ccc7 Build as C++20
Switch CMake (including the Core and GPU compile features and the Android
flag), the Visual Studio projects (stdcpp20), the legacy Android NDK
makefiles, the libretro makefiles and .ycm_extra_conf.py from C++17 to
C++20.

[=] lambdas that use this implicitly become [=, this], to avoid
-Wdeprecated-this-capture.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-28 00:02:06 +01:00
Henrik RydgårdandClaude Opus 5.5 916dfab834 UI: Round the corners of popups
FillRoundRect falls back to a square FillRect for drawables it can't
round, and a ViewGroup with round corners set rounds its background.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 21:47:06 +01:00
Henrik Rydgård 965b07c527 A lot more round corner fixes and layout fixes. 2026-10-25 10:28:40 +01:00
Henrik RydgårdandClaude Opus 5.5 b54056685e UI: Space ChoiceGroups from their container instead of their own margins
ChoiceGroups no longer have hardcoded margins. A new ChoiceGroupList holds them,
with padding and spacing that give the same look as before. Settings tabs, developer
tools, the two-pane settings columns, the pause menu and the rest put their groups in
one, and a few screens adjust its padding and spacing to their layout.

Also add the two groups in the remote disc streaming settings that were created but
never added, and make the settings search look inside groups: it only checked a tab's
direct children, so with ChoiceGroups a filter hid everything.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-24 14:01:58 +02:00
Henrik Rydgård 505ae1c965 Cleanup 2026-10-24 12:54:49 +02:00
Henrik RydgårdandClaude Opus 5.5 8b1ffb9b39 UI: Apply GridLayout children's margins, drop the unused grid orientation
Grid children are given LinearLayoutParams almost everywhere, so their margins are
taken from those as well as from GridLayoutParams, which gains margins.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-24 12:49:45 +02:00
Henrik RydgårdandClaude Opus 5.5 7ddd0ce33b UI: Skip hidden views in AnchorLayout
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-24 12:49:44 +02:00
Henrik RydgårdandClaude Opus 5.5 5c4b1be7f5 UI: Let LinearLayout place its children as a group along its direction
SetContentGravity centers the children, or moves them to the end, when they don't
fill the layout.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-24 12:49:44 +02:00
Henrik RydgårdandClaude Opus 5.5 bff97cbb09 UI: Fix two LinearLayout measuring and layout bugs
Lay out children across the layout direction within the layout's bounds rather than
its measured size, which differ when a parent clamps it. And count weighted
children's margins when growing to fit them.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-24 12:49:32 +02:00
Henrik RydgårdandClaude Opus 5.5 e5b1760bff UI: Add padding to GridLayout
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-24 12:36:17 +02:00
Henrik RydgårdandClaude Opus 5.5 d9126ad685 UI: Remove the unused FrameLayout
Nothing used it, and it didn't work: it never set its own size, centered vertically
using the width, and didn't lay out its children.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-24 12:36:16 +02:00
Henrik RydgårdandClaude Opus 5.5 7fa69ac27f UI: Center views inside their margins
Centering gravity centered in the whole cell, ignoring the margins, so a view with
uneven margins ended up off center.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-24 12:36:07 +02:00
Henrik RydgårdandClaude Opus 5.5 e30c8f7141 UI: Give LinearLayout a working padding setting
LinearLayout had a public padding member that only DisplayLayoutScreen set. Make it
private with a setter, and fix the measuring: the vertical retry used the horizontal
padding, the AT_MOST retries and the weighted children ignored it, and growing to fit
weighted children counted it twice.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-24 12:24:21 +02:00
Henrik Rydgård ad132d8f1b Apply rounded corners to all Choices by default, apply proper group rounding in many places. 2026-10-24 11:21:40 +02:00
Henrik Rydgård 1a2d140652 Fix corner rounding bug when there's only one item 2026-10-24 01:52:34 +02:00
Henrik Rydgård c44a12363f Prototype the new ChoiceGroup component 2026-10-24 01:52:34 +02:00
Henrik RydgårdandClaude Opus 5.5 5d8db2a22d UI: Give views a pointer to their parent group
Set by ViewGroup when a view is added, inserted or swapped in. Lets a view
find the scroll view it's in, for example.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-22 15:34:51 +02:00
Henrik RydgårdandClaude Opus 5.5 31918b8636 UI: Arrow key focus moves by beam and edge distance
Replaces the center-to-center scoring, which skipped a wide view between narrow
ones, since its center is far away even when its edge is right there. Now it
works like Android's FocusFinder: only views in the direction of the move are
candidates, ones in the origin's beam beat ones off to the side (going up or
down, unless those are in a nearer row), and otherwise the nearest wins, with
distance along the move weighted 13 times distance across it. Unlike Android,
the distance across is to the candidate's nearest edge rather than its center.

First/last and page moves keep their scoring.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 02:31:07 +02:00
Henrik RydgårdandClaude Opus 5 ea1ad8ffed UI: Tab and Shift+Tab move focus through the view hierarchy
Unlike the directional moves, this doesn't look at where anything ended up on
screen - it walks the hierarchy in the order views were added, flattening nested
groups in place. That's what makes it predictable in the layouts where "what's
to the right of this" has no good answer.

A view is a stop if it's focusable and enabled, the same test the directional
moves apply, so the two agree on what's reachable. Hidden subtrees are skipped
whole, which is what keeps a TabHolder's inactive tabs - V_GONE rather than
removed - out of the order without any special casing. Containers are gated on
visibility only, not enabled, matching Key/Touch/Axis: disabling a container
doesn't stop its children being interactive anywhere else either.

Ctrl+Tab stays with ChoiceStrip, which uses it to switch tabs.

focusMoves now holds FocusMove rather than raw keycodes, so the direction is
decided in one place while the modifiers are still around, and a held key
repeats in the direction it was originally pressed with - the synthesized repeat
has no modifiers of its own. That also retires the keycode switch in
UpdateViewHierarchy and IsScrollKey, which had no other callers.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SfY7iFJEjmRXf1XGrTs4MF
2026-08-27 20:52:20 +02:00
Henrik Rydgård 02e9deb232 Fix some input behavior that got lost in the previous commits. 2026-06-24 21:48:44 +02:00
Henrik Rydgård 3a599c4714 Fix audio focus issue by tracking the cause of lost focus.
Fixes #21643
2026-05-06 00:06:32 +02:00
Henrik Rydgård eb476d522e Rename FocusDirection to FocusMove, make into enum class 2026-04-14 18:17:54 -06:00
Henrik Rydgård c3a78724c7 Add an on-screen keyboard in the popup inputbox 2026-02-26 17:17:42 +01:00
Henrik Rydgård 8eeb64c9dc Fix a bug in gridlayout column count computation, fix layout problem on savestate popups. 2026-02-25 14:28:57 +01:00
Henrik Rydgård 990cba8e6c Fix problem with background image when rotating some dialogs 2026-02-09 14:35:32 +01:00
Henrik Rydgård aa17599f66 Make things more consistent in the no-present case 2026-02-08 10:13:34 +01:00
Henrik Rydgård d6d2c24e24 Fix the toggle touch controls input (properly this time) 2026-02-05 09:44:42 +01:00
Henrik Rydgård 481d0fd18c Switch TouchInputFlags to enum class, fix some minor UI issues
Scroll views now only wheel-scroll if the mouse is hovering over them.
2025-12-19 11:38:56 +01:00
Henrik Rydgård 9de8e75709 AnchorLayout: Allow centering separately for horizontal and vertical 2025-11-10 12:10:08 +01:00
Henrik Rydgård bf5e524243 Add multi-font support to the final text-rendering backend (SDL_ttf) 2025-11-09 08:52:21 +01:00
Henrik Rydgård 980ddb152b UI fixes, add SimpleTextView (easier to reason about) 2025-11-09 08:52:20 +01:00
Henrik Rydgård b45d07d6cb Break out TabHolder from Common/UI/ViewGroup.cpp. A few new atlas images 2025-10-23 11:19:20 +02:00
Henrik Rydgård 58456ae950 Remove the UI::EventReturn return values. Makes editing the UI nicer. 2025-09-15 11:09:00 -06:00
Henrik Rydgård e78341b822 Hide theme behind an accessor (so we can expose it only as const) 2025-09-15 09:31:18 -06:00
Henrik Rydgård 91bf4d5b5c Correct some log categories, add UI category, some warning fixes 2025-04-09 13:45:21 +02:00
Henrik Rydgård 4df25788fd UI: Fix focus issue, thanks NABN00B.
Fixes #20217
2025-04-07 13:39:47 +02:00
Henrik Rydgård 116f8cf3af Implement resetting from a popup menu on the pause menu. 2025-03-28 14:31:01 +01:00
Henrik Rydgård ad260fa6a8 Implement lazy loading of tabs 2025-03-23 22:48:57 +01:00
Henrik Rydgård 4b977b43c2 TabHolder: Contents are always ViewGroups, let's enforce that. 2025-03-23 22:48:57 +01:00
Henrik Rydgård 0ba92081ed Add banner support to tab holders 2025-03-23 22:48:51 +01:00
Henrik Rydgård 8674488859 Android: Handle mouse events separately from touch events
Use the new modern events like HOVER.
2025-03-05 23:26:30 +01:00
Henrik Rydgård 863bef5f64 Give all views a bool popupStyle_, so they know the context. 2025-02-17 11:25:23 -06:00
Herman Semenov 45429bcd85 [Common/Data/File/Input/Net/Serialize/System/UI] Using for based loop C++17 and replaced on structured binding map C++17 2024-09-17 17:42:08 +02:00
Henrik Rydgård e01ca5b057 Logging API change (refactor) (#19324)
* Rename LogType to Log

* Explicitly use the Log:: enum when logging. Allows for autocomplete when editing.

* Mac/ARM64 buildfix

* Do the same with the hle result log macros

* Rename the log names to mixed case while at it.

* iOS buildfix

* Qt buildfix attempt, ARM32 buildfix
2024-07-14 14:42:59 +02:00
Henrik Rydgård 3bb74ea9ad Rework the JitCompare window to hold a list of blocks, and allow some filtering and browsing 2024-06-05 18:16:33 +02:00
Henrik Rydgård 455e28da6c Rename Point to Point2D to avoid a cocoa name clash 2024-05-29 18:52:39 +02:00
Henrik Rydgård 1129000d8f Add some asserts, small cleanup 2024-05-21 11:08:09 +02:00
Henrik Rydgård c5791764d8 Make the i18n T function use std::string_view
Buildfixes, crashfixes

One more

Android buildfix

Buildfix Qt
2024-02-12 18:44:39 +01:00
Henrik Rydgård c29f81da36 Fix issue with the collapsible sections in control mapping collapsing on every change. 2024-01-29 17:57:01 +01:00
Henrik Rydgård 7a318b46e8 Draw the line between the tabs and contents as a spacer instead of custom code. 2024-01-19 14:56:29 +01:00