File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 3030 no_wrap bool
3131 fill bool = gui_theme.select_style.fill
3232 fill_border bool = gui_theme.select_style.fill_border
33+ sizing Sizing
3334}
3435
3536// select creates a select (a.k.a. drop-down) view from the given [SelectCfg](#SelectCfg)
@@ -70,7 +71,11 @@ pub fn (window &Window) select(cfg SelectCfg) View {
7071 text_style: txt_style
7172 mode: wrap_mode
7273 ),
73- row (name: 'select spacer' , sizing: fill_fill, padding: padding_none),
74+ row (
75+ name: 'select spacer'
76+ sizing: if wrap_mode == .single_line { fill_fill } else { fit_fill }
77+ padding: padding_none
78+ ),
7479 text (
7580 text: if is_open { '▲' } else { '▼' }
7681 text_style: cfg.text_style
@@ -131,7 +136,7 @@ pub fn (window &Window) select(cfg SelectCfg) View {
131136 padding: cfg.padding_border
132137 radius: cfg.radius
133138 color: cfg.color_border
134- sizing: fill_fit
139+ sizing: cfg.sizing
135140 amend_layout: cfg.amend_layout
136141 content: content
137142 )
You can’t perform that action at this time.
0 commit comments