1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-06 09:07:25 +08:00
osu-lazer/osu.Game/Overlays
Bartłomiej Dach 8f744c99ee
Fix settings toolbox toggle button starting in incorrect state
While displaying replays, the colour of the toolbox toggle button would
not match the actual state of the rest of the toolbox, i.e. both buttons
would be white, even though the "playback settings" section was expanded
and as such should have a yellow toggle button.

In the case of the replay player, the failure scenario was as follows:

1. `SettingsToolboxGroup` calls `updateExpanded()` in its BDL to update
   the initial state of the toolbox, including the toggle button
   colour, by adding a colour fade transform.

2. An ancestor of both the toolbox groups - `PlayerSettingsOverlay`,
   which is a `VisibilityContainer` - calls `FinishTransforms(true)` in
   its `LoadCompleteAsync()`, therefore instantly applying the colour
   from point (1) to the toggle button instantly.

3. However, `IconButton` inherits from `OsuAnimatedButton`. And
   `OsuAnimatedButton` changes its colour in `LoadComplete()`, therefore
   undoing the instant application from point (2).

This conjunction of circumstances is instrumental to reproducing the
bug, because if the `FinishTransforms(true)` call wasn't there, point
(3) wouldn't matter - the transform would get applied at some
indeterminate point in the future, ignoring the write from
`OsuAnimatedButton`.

As for the fix, move the `updateExpanded()` call in
`SettingsToolboxGroup` to `LoadComplete()` to avoid the above
unfortunate order. Applying initial visual state in `LoadComplete()` is
the idiomatic style of doing things these days anyhow.
2022-01-06 20:45:56 +01:00
..
AccountCreation Fix most open compound words in identifiers being closed 2021-12-27 20:26:28 -08:00
BeatmapListing Add support card size tab control to beatmap listing 2021-12-23 15:55:37 +01:00
BeatmapSet Use OnlineID instead of legacy IDs for equality and lookups 2021-12-10 16:11:48 +09:00
Changelog Merge branch 'master' into use-class-rename 2021-11-07 15:41:00 +01:00
Chat Fix LinkFlowContainer not creating user links supporting full IUser specification 2021-11-08 14:17:47 +09:00
Comments Fix clear identifier typos 2021-12-27 20:26:28 -08:00
Dashboard Clean up unused resolved properties 2021-12-03 18:49:49 +09:00
Dialog Use LocalisableStrings where possible to leverage localisable text flow 2021-11-02 21:42:02 +01:00
Login Recolour a few other existing dropdowns with same hover & selection colours 2021-10-19 22:47:18 +02:00
MedalSplash
Mods Apply batch fixing of built-in types using var 2021-10-27 13:04:41 +09:00
Music Merge pull request #15772 from peppy/remove-model-list-inits 2021-11-24 16:41:19 +09:00
News Apply batch fixing of built-in types using var 2021-10-27 13:04:41 +09:00
Notifications Fix clear identifier typos 2021-12-27 20:26:28 -08:00
OSD Fix toast popups spamming samples when adjusting osu!mania scroll speed during gameplay 2021-12-15 12:45:23 +09:00
Profile Fix most open compound words in identifiers being closed 2021-12-27 20:26:28 -08:00
Rankings Add padding to bottom of spotlights ranking view to avoid hovered panels exceeding visible bounds 2022-01-03 18:43:20 +01:00
Settings Move enum local to usage 2022-01-06 22:56:56 +09:00
Toolbar Ensure correct disabled ruleset callback scheduling in ruleset selector 2021-11-27 15:28:23 +01:00
Volume Remove usage of key repeat helper method 2021-11-18 13:13:36 +09:00
Wiki Clean up unused resolved properties 2021-12-03 18:49:49 +09:00
AccountCreationOverlay.cs Ensure account creation overlay is shown after logout 2020-12-25 15:40:39 +01:00
BeatmapListingOverlay.cs Merge pull request #16307 from peppy/beatmap-listing-bottom-padding 2022-01-04 14:14:42 +09:00
BeatmapSetOverlay.cs Clean up unused resolved properties 2021-12-03 18:49:49 +09:00
BreadcrumbControlOverlayHeader.cs Allow null for breadcrumb control 2021-07-17 20:33:26 +08:00
ChangelogOverlay.cs Update UI cases where repeat should not be handled 2021-11-18 13:13:36 +09:00
ChatOverlay.cs Fix most open compound words in identifiers being closed 2021-12-27 20:26:28 -08:00
DashboardOverlay.cs Implement TabbableOnlineOverlay component 2021-01-18 21:22:50 +03:00
DialogOverlay.cs Update UI cases where repeat should not be handled 2021-11-18 13:13:36 +09:00
ExpandingButtonContainer.cs Add comment and reduce how often ChildrenOfType is invoked in ExpandingButtonContainer 2022-01-06 23:38:54 +09:00
FullscreenOverlay.cs Add localisation support to overlay header title/description 2021-04-21 14:37:29 +09:00
HoldToConfirmOverlay.cs Apply batch fixing of built-in types using var 2021-10-27 13:04:41 +09:00
INamedOverlayComponent.cs Add localisation support to overlay header title/description 2021-04-21 14:37:29 +09:00
LoginOverlay.cs Move login panel related files to own namespace and tidy up class nesting 2021-09-17 18:34:16 +09:00
MedalOverlay.cs Remove redundant arguments 2021-07-05 23:52:39 +08:00
MusicController.cs Fix incorrect delgate capture leading to slow leak of audio tracks 2021-12-24 18:39:29 +09:00
NewsOverlay.cs Pass fetch more action in via ctor to avoid potential nullref 2021-05-26 22:49:39 +09:00
NotificationOverlay.cs Move sample playback debounce time to central const 2021-09-05 13:25:10 +09:00
NowPlayingOverlay.cs Ensure correct disabled beatmap callback scheduling in now playing overlay 2021-11-27 14:36:34 +01:00
OnlineOverlay.cs Hoist scroll cache declaration to original place of definition 2021-06-07 11:18:18 +02:00
OnScreenDisplay.cs Fix toast popups spamming samples when adjusting osu!mania scroll speed during gameplay 2021-12-15 12:45:23 +09:00
OverlayActivation.cs
OverlayColourProvider.cs Add colour provider for multiplayer usage 2021-08-12 19:47:26 +09:00
OverlayHeader.cs Centralise fetching of overlay component titles and textures 2020-09-03 16:34:58 +09:00
OverlayHeaderBackground.cs
OverlayPanelDisplayStyleControl.cs Update mapper usages with LocalisableDescription 2021-07-31 01:47:14 +03:00
OverlayRulesetSelector.cs Revert initial ruleset value logic 2021-08-23 13:28:21 +03:00
OverlayRulesetTabItem.cs
OverlayScrollContainer.cs Move action to private named method to avoid null inspection 2021-11-05 03:51:08 +03:00
OverlaySidebar.cs create abstract class OverlaySidebar 2021-06-04 00:12:13 +07:00
OverlaySortTabControl.cs fix checkbox sounds not being used for certain checkboxes 2021-06-18 21:00:08 +09:00
OverlayStreamControl.cs
OverlayStreamItem.cs Localise friends online status stream control. 2021-06-30 21:16:21 +02:00
OverlayTabControl.cs add sound to tab controls 2021-06-18 19:16:00 +09:00
OverlayTitle.cs Add localisation support to overlay header title/description 2021-04-21 14:37:29 +09:00
OverlayView.cs Revert "Allow OverlayView fetching with no API requests required" 2020-12-18 01:27:58 +03:00
RankingsOverlay.cs Add missing null checks 2021-10-05 17:59:38 +09:00
RestoreDefaultValueButton.cs Remove doubled-up opacity specification 2021-10-18 19:43:48 +02:00
SettingsOverlay.cs Move ruleset settings to own section 2021-10-12 14:58:43 +09:00
SettingsPanel.cs Split out expanding container logic from settings sidebar 2022-01-06 21:02:29 +09:00
SettingsSubPanel.cs Split out expanding container logic from settings sidebar 2022-01-06 21:02:29 +09:00
SettingsToolboxGroup.cs Fix settings toolbox toggle button starting in incorrect state 2022-01-06 20:45:56 +01:00
SortDirection.cs Remove unused classes and replace overlay in game 2020-04-21 16:38:47 +09:00
TabbableOnlineOverlay.cs Add login placeholder logic to OnlineOverlay 2021-02-18 18:07:24 +09:00
TabControlOverlayHeader.cs Apply batch fixing of built-in types using var 2021-10-27 13:04:41 +09:00
UserProfileOverlay.cs Rename User to APIUser and move to correct namespace 2021-11-07 11:26:01 +09:00
VolumeOverlay.cs Let selection container handle manual selection changes 2021-07-06 13:24:18 +02:00
WaveOverlayContainer.cs Use unique samples for Dialog, NowPlaying, SettingsPanel and WaveOverlay pop-in/pop-out 2021-02-10 16:04:47 +09:00
WikiOverlay.cs Apply batch fixing of built-in types using var 2021-10-27 13:04:41 +09:00