Skip to content

Commit e4606b0

Browse files
authoredand pushed
Merge pull request #677 from jamesmontemagno/fix/studio-window-check-choice-tiles
Normalize Studio choice tile focus in desktop check
2 parents cf8e296 + 78bac02 commit e4606b0

2 files changed

Lines changed: 12 additions & 5 deletions

File tree

‎windows/tools/StudioWindowCheck/Checks/InspectorPanels.cs‎

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -369,10 +369,10 @@ private static string PanelWords((string Title, string[] Selected) shown) =>
369369
/// focus is put back afterwards. UI thread.
370370
/// </summary>
371371
/// <remarks>
372-
/// A stop is listed by its automation id. A group of radio buttons is listed by the group's
373-
/// id, the rail by its own and not by the item the focus is on, and the header of a crop
374-
/// group by the group's: the header is a part of the framework's template, with the same id
375-
/// in every group.
372+
/// A stop is listed by its automation id. A group of radio buttons or choice tiles is listed
373+
/// by the group's id, the rail by its own and not by the item the focus is on, and the header
374+
/// of a crop group by the group's: the header is a part of the framework's template, with the
375+
/// same id in every group.
376376
/// </remarks>
377377
private static List<string> StopsAsItIs(FrameworkElement content, XamlRoot root, bool putBack = true)
378378
{
@@ -410,12 +410,15 @@ private static string StopOf(DependencyObject focused)
410410
{
411411
var named = focused;
412412
var isCropHeader = focused is ToggleButton { Name: "ExpanderHeader" };
413-
if (focused is ListViewItem || isCropHeader)
413+
var isChoiceTile = focused is GridViewItem;
414+
if (focused is ListViewItem || isChoiceTile || isCropHeader)
414415
{
415416
for (var parent = VisualTreeHelper.GetParent(focused); parent is not null; parent = VisualTreeHelper.GetParent(parent))
416417
{
417418
if ((focused is SegmentedItem && parent is Segmented)
418419
|| (focused is ListViewItem && parent is ListView && AutomationProperties.GetAutomationId(parent) == InspectorRailId)
420+
|| (isChoiceTile && parent is GridView
421+
&& (AutomationProperties.GetAutomationId(parent) is "StudioLayoutChoice" or "StudioCameraShapeComboBox"))
419422
|| (isCropHeader && parent is Expander))
420423
{
421424
named = parent;

‎windows/tools/StudioWindowCheck/Host/StandIns.cs‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,8 @@ internal sealed class NoRecorder : IVideoRecordingService
162162

163163
public bool CanMuteMicrophone => false;
164164

165+
public bool IsMicrophoneCapturing => false;
166+
165167
public bool IsSystemAudioMuted => false;
166168

167169
public bool IsMicrophoneMuted => false;
@@ -318,6 +320,8 @@ public StudioProject Save(StudioProject project)
318320
return _inner.Save(project);
319321
}
320322

323+
public IDisposable AcquireProjectUse(string projectId) => _inner.AcquireProjectUse(projectId);
324+
321325
public void Delete(string projectId)
322326
{
323327
Interlocked.Increment(ref _deletes);

0 commit comments

Comments
 (0)