@@ -409,7 +409,7 @@ public struct WinUIBackend: AppBackend {
409
409
410
410
public func createTextView( ) -> Widget {
411
411
let textBlock = TextBlock ( )
412
- textBlock. textWrapping = __x_ABI_CMicrosoft_CUI_CXaml_CTextWrapping_Wrap
412
+ textBlock. textWrapping = . wrap
413
413
return textBlock
414
414
}
415
415
@@ -452,9 +452,8 @@ public struct WinUIBackend: AppBackend {
452
452
public func createScrollContainer( for child: Widget ) -> Widget {
453
453
let scrollViewer = WinUI . ScrollViewer ( )
454
454
scrollViewer. content = child
455
- child. horizontalAlignment =
456
- __x_ABI_CMicrosoft_CUI_CXaml_CHorizontalAlignment_Left
457
- child. verticalAlignment = __x_ABI_CMicrosoft_CUI_CXaml_CVerticalAlignment_Top
455
+ child. horizontalAlignment = . left
456
+ child. verticalAlignment = . top
458
457
return scrollViewer
459
458
}
460
459
@@ -466,24 +465,12 @@ public struct WinUIBackend: AppBackend {
466
465
let scrollViewer = scrollView as! WinUI . ScrollViewer
467
466
468
467
scrollViewer. isHorizontalRailEnabled = hasHorizontalScrollBar
469
- scrollViewer. horizontalScrollMode =
470
- hasHorizontalScrollBar
471
- ? __x_ABI_CMicrosoft_CUI_CXaml_CControls_CScrollMode_Enabled
472
- : __x_ABI_CMicrosoft_CUI_CXaml_CControls_CScrollMode_Disabled
473
- scrollViewer. horizontalScrollBarVisibility =
474
- hasHorizontalScrollBar
475
- ? __x_ABI_CMicrosoft_CUI_CXaml_CControls_CScrollBarVisibility_Visible
476
- : __x_ABI_CMicrosoft_CUI_CXaml_CControls_CScrollBarVisibility_Hidden
468
+ scrollViewer. horizontalScrollMode = hasHorizontalScrollBar ? . enabled : . disabled
469
+ scrollViewer. horizontalScrollBarVisibility = hasHorizontalScrollBar ? . visible : . hidden
477
470
478
471
scrollViewer. isVerticalRailEnabled = hasVerticalScrollBar
479
- scrollViewer. verticalScrollMode =
480
- hasVerticalScrollBar
481
- ? __x_ABI_CMicrosoft_CUI_CXaml_CControls_CScrollMode_Enabled
482
- : __x_ABI_CMicrosoft_CUI_CXaml_CControls_CScrollMode_Disabled
483
- scrollViewer. verticalScrollBarVisibility =
484
- hasVerticalScrollBar
485
- ? __x_ABI_CMicrosoft_CUI_CXaml_CControls_CScrollBarVisibility_Visible
486
- : __x_ABI_CMicrosoft_CUI_CXaml_CControls_CScrollBarVisibility_Hidden
472
+ scrollViewer. verticalScrollMode = hasVerticalScrollBar ? . enabled : . disabled
473
+ scrollViewer. verticalScrollBarVisibility = hasVerticalScrollBar ? . visible : . hidden
487
474
}
488
475
489
476
public func createSlider( ) -> Widget {
@@ -495,6 +482,7 @@ public struct WinUIBackend: AppBackend {
495
482
internalState. sliderChangeActions [ ObjectIdentifier ( slider) ] ? (
496
483
Double ( event? . newValue ?? 0 ) )
497
484
}
485
+ slider. stepFrequency = 0.01
498
486
return slider
499
487
}
500
488
@@ -610,7 +598,7 @@ public struct WinUIBackend: AppBackend {
610
598
return
611
599
}
612
600
613
- if event? . key == __x_ABI_CWindows_CSystem_CVirtualKey_Enter {
601
+ if event? . key == . enter {
614
602
internalState. textFieldSubmitActions [ ObjectIdentifier ( textField) ] ? ( )
615
603
}
616
604
}
@@ -674,7 +662,7 @@ public struct WinUIBackend: AppBackend {
674
662
splitView. pane = leadingChild
675
663
splitView. content = trailingChild
676
664
splitView. isPaneOpen = true
677
- splitView. displayMode = __x_ABI_CMicrosoft_CUI_CXaml_CControls_CSplitViewDisplayMode_Inline
665
+ splitView. displayMode = . inline
678
666
return splitView
679
667
}
680
668
0 commit comments