Skip to content

Commit

Permalink
Mac: Fixes for ChooseDeviceForm
Browse files Browse the repository at this point in the history
  • Loading branch information
cyanfish committed Aug 8, 2024
1 parent 417dc74 commit 1e9255c
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions NAPS2.Lib/EtoForms/Ui/ChooseDeviceForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -134,16 +134,16 @@ protected override void BuildLayout()
nameof(UiStrings.SelectDevice));

FormStateController.SaveFormState = FormStateController.RestoreFormState = true;
FormStateController.DefaultExtraLayoutSize = new Size(50, 0);
FormStateController.DefaultExtraLayoutSize = new Size(150, 100);

LayoutController.Content = L.Column(
L.Row(
[
..driverElements,
C.IconButton(_iconProvider.GetIcon("large_tiles_small")!, () => SetListView(false))
.Visible(_textListVis),
.Visible(_textListVis).Width(40),
C.IconButton(_iconProvider.GetIcon("text_align_justify_small")!, () => SetListView(true))
.Visible(!_textListVis)
.Visible(!_textListVis).Width(40)
]
),
_deviceIconList.Control.NaturalSize(150, 100).Scale().Visible(!_textListVis),
Expand Down Expand Up @@ -250,11 +250,6 @@ private void QueryForDevices()
}
DeviceList.Add(device);
UpdateDevices(false);
if (DeviceList.Count == 1)
{
_deviceIconList.Selection = ListSelection.Of(DeviceList[0]);
_deviceTextList.SelectedIndex = 0;
}
}
});
}
Expand Down

0 comments on commit 1e9255c

Please sign in to comment.