File tree Expand file tree Collapse file tree 1 file changed +23
-15
lines changed
Expand file tree Collapse file tree 1 file changed +23
-15
lines changed Original file line number Diff line number Diff line change @@ -65,12 +65,14 @@ impl CommandBar {
6565 // 1px larger than default
6666 let font_size =
6767 config. font . size . map_or ( theme:: TEXT_SIZE , f32:: from) + 1.0 ;
68+ let line_height = theme:: line_height ( & config. font ) ;
6869
6970 let combo_box =
7071 combo_box ( & self . state , "Type a command..." , None , Message :: Command )
7172 . on_close ( Message :: Unfocused )
7273 . on_option_hovered ( Message :: Hovered )
7374 . size ( font_size)
75+ . line_height ( line_height)
7476 . padding ( [ 8 , 8 ] ) ;
7577
7678 // Capture ESC so we can close the combobox manually from application
@@ -85,22 +87,28 @@ impl CommandBar {
8587 double_pass (
8688 // Layout should be based on the Shrink text size width of largest option
8789 column (
88- std:: iter:: once ( text ( "Type a command..." ) . size ( font_size) )
89- . chain (
90- Command :: list (
91- buffers,
92- config,
93- focus,
94- resize_buffer,
95- version,
96- main_window,
97- )
98- . iter ( )
99- . map ( |command| {
100- text ( command. to_string ( ) ) . size ( font_size)
101- } ) ,
90+ std:: iter:: once (
91+ text ( "Type a command..." )
92+ . size ( font_size)
93+ . line_height ( line_height) ,
94+ )
95+ . chain (
96+ Command :: list (
97+ buffers,
98+ config,
99+ focus,
100+ resize_buffer,
101+ version,
102+ main_window,
102103 )
103- . map ( Element :: from) ,
104+ . iter ( )
105+ . map ( |command| {
106+ text ( command. to_string ( ) )
107+ . size ( font_size)
108+ . line_height ( line_height)
109+ } ) ,
110+ )
111+ . map ( Element :: from) ,
104112 )
105113 // Give it some extra width
106114 . padding ( [ 0 , 20 ] ) ,
You can’t perform that action at this time.
0 commit comments