pub fn ui(&mut self, ui: &mut Ui) {
        // Get the tab ui
        self.tab_menu_ui(ui);
        if self.show_stylist {
            SidePanel::left("_stylist_panel")
                .width_range(300.0..=900.0)
                .show_inside(ui, |ui| {
                    ScrollArea::vertical().show(ui, |ui| {
                        // Show the content views.
                        match self.current_tab {
                            StylerTab::Colors => colors::colors_view(&mut self.style, ui),
                            StylerTab::Fonts => fonts::fonts_view(
                                &mut self.font_view_state,
                                self.file_dialog_function.as_ref(),
                                &mut self.font_definitions,
                                &mut self.style,
                                ui,
                            ),
                            StylerTab::Spacing => spacing::spacing_view(&mut self.style, ui),
                            StylerTab::Shape => shape::shape_view(&mut self.style, ui),
                        };
                    });
                });
        }
        if self.show_preview {
            CentralPanel::default().show_inside(ui, |ui| {
                ScrollArea::vertical().show(ui, |ui| {
                    self.preview.set_style(self.style.clone());
                    self.preview.show(ui);
                });
            });
        }
    }
/// Creates and displays the Stylist UI.
/// This can be used to embed the Stylist into any application that supports it.
Creates and displays the Stylist UI.
This can be used to embed the Stylist into any application that supports it.
Creates and displays the Stylist UI . This can be used to embed the Stylist into any application that supports it .
pub fn ui(&mut self, ui: &mut Ui) {
        // Get the tab ui
        self.tab_menu_ui(ui);
        if self.show_stylist {
            SidePanel::left("_stylist_panel")
                .width_range(300.0..=900.0)
                .show_inside(ui, |ui| {
                    ScrollArea::vertical().show(ui, |ui| {
                        // Show the content views.
                        match self.current_tab {
                            StylerTab::Colors => colors::colors_view(&mut self.style, ui),
                            StylerTab::Fonts => fonts::fonts_view(
                                &mut self.font_view_state,
                                self.file_dialog_function.as_ref(),
                                &mut self.font_definitions,
                                &mut self.style,
                                ui,
                            ),
                            StylerTab::Spacing => spacing::spacing_view(&mut self.style, ui),
                            StylerTab::Shape => shape::shape_view(&mut self.style, ui),
                        };
                    });
                });
        }
        if self.show_preview {
            CentralPanel::default().show_inside(ui, |ui| {
                ScrollArea::vertical().show(ui, |ui| {
                    self.preview.set_style(self.style.clone());
                    self.preview.show(ui);
                });
            });
        }
    }
pub fn ui ( & mut self , ui : & mut Ui ) { // Get the tab ui self . tab_menu_ui ( ui ) ; if self . show_stylist { SidePanel :: left ( " " ) . width_range ( 300.0 ..= 900.0 ) . show_inside ( ui , | ui | { ScrollArea :: vertical ( ) . show ( ui , | ui | { // Show the content views. match self . current_tab { StylerTab :: Colors => colors :: colors_view ( & mut self . style , ui ) , StylerTab :: Fonts => fonts :: fonts_view ( & mut self . font_view_state , self . file_dialog_function . as_ref ( ) , & mut self . font_definitions , & mut self . style , ui , ) , StylerTab :: Spacing => spacing :: spacing_view ( & mut self . style , ui ) , StylerTab :: Shape => shape :: shape_view ( & mut self . style , ui ) , } ; } ) ; } ) ; } if self . show_preview { CentralPanel :: default ( ) . show_inside ( ui , | ui | { ScrollArea :: vertical ( ) . show ( ui , | ui | { self . preview . set_style ( self . style . clone ( ) ) ; self . preview . show ( ui ) ; } ) ; } ) ; } }
Creates and displays the Stylist UI.
Creates and displays the Stylist UI .
&mut self
ui
&mut Ui