File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -768,6 +768,9 @@ impl Render for AtemUiView {
768768
769769fn main ( ) {
770770 Application :: new ( ) . run ( |cx : & mut App | {
771+ // Required for gpui-component widgets (e.g. Theme global) to be available.
772+ gpui_component:: init ( cx) ;
773+
771774 let bounds = Bounds :: centered ( None , size ( px ( 720. ) , px ( 520. ) ) , cx) ;
772775 cx. open_window (
773776 WindowOptions {
@@ -778,7 +781,7 @@ fn main() {
778781 let ip_input =
779782 cx. new ( |cx| InputState :: new ( window, cx) . default_value ( "192.168.1.50" ) ) ;
780783
781- cx. new ( |_| AtemUiView {
784+ let view = cx. new ( |_| AtemUiView {
782785 ip_input,
783786 status : ConnectionStatus :: Disconnected ,
784787 snapshot : None ,
@@ -790,7 +793,10 @@ fn main() {
790793 selected_aux_bus : 0 ,
791794 selected_dsk_key_index : 0 ,
792795 dsk_rate : 20 ,
793- } )
796+ } ) ;
797+
798+ // gpui-component requires a Root view as the first window layer.
799+ cx. new ( |cx| gpui_component:: Root :: new ( view, window, cx) )
794800 } ,
795801 )
796802 . unwrap ( ) ;
You can’t perform that action at this time.
0 commit comments