@@ -9,7 +9,7 @@ use crate::{
99 widgets:: {
1010 key_value_list_widget:: KeyValueListWidget ,
1111 slice_widget:: { SliceParams , XyzWidget } ,
12- title_bar:: TitleBarWidget ,
12+ title_bar:: TitleBarWidget , color_bar :: ColorBarWidget ,
1313 } ,
1414} ;
1515
@@ -19,7 +19,7 @@ static MODE_TITLES: [&str; 2] = ["Voxel", "Metadata"];
1919pub fn render < B : Backend > ( app : & mut App , frame : & mut Frame < ' _ , B > ) {
2020 let layout = Layout :: default ( )
2121 . direction ( Direction :: Vertical )
22- . constraints ( [ Constraint :: Length ( 1 ) , Constraint :: Min ( 0 ) ] . as_ref ( ) )
22+ . constraints ( [ Constraint :: Length ( 1 ) , Constraint :: Min ( 0 ) , Constraint :: Length ( 1 ) ] . as_ref ( ) )
2323 . split ( frame. size ( ) ) ;
2424
2525 // write out filename
@@ -31,6 +31,8 @@ pub fn render<B: Backend>(app: &mut App, frame: &mut Frame<'_, B>) {
3131
3232 frame. render_widget ( TitleBarWidget :: new ( & app. file_path , & MODE_TITLES , mode_index) , layout[ 0 ] ) ;
3333
34+ frame. render_widget ( ColorBarWidget :: new ( "Inferno" , app. color_map , app. intensity_range . 0 , app. intensity_range . 1 ) , layout[ 2 ] ) ;
35+
3436 match app. mode {
3537 crate :: app:: AppMode :: Xyz => {
3638 let slice = SliceParams {
0 commit comments