File tree Expand file tree Collapse file tree 2 files changed +21
-2
lines changed
Expand file tree Collapse file tree 2 files changed +21
-2
lines changed Original file line number Diff line number Diff line change @@ -315,7 +315,12 @@ impl AppState {
315315 let ( indicator, style) = if is_selected {
316316 ( self . theme . multi_select_icon ( ) , Style :: default ( ) . bold ( ) )
317317 } else {
318- ( "" , Style :: new ( ) )
318+ let ms_style = if self . multi_select && !node. multi_select {
319+ Style :: default ( ) . fg ( self . theme . multi_select_disabled_color ( ) )
320+ } else {
321+ Style :: new ( )
322+ } ;
323+ ( "" , ms_style)
319324 } ;
320325 if * has_children {
321326 Line :: from ( format ! (
@@ -325,6 +330,7 @@ impl AppState {
325330 indicator
326331 ) )
327332 . style ( self . theme . dir_color ( ) )
333+ . patch_style ( style)
328334 } else {
329335 Line :: from ( format ! (
330336 "{} {} {}" ,
@@ -342,13 +348,19 @@ impl AppState {
342348 |ListEntry {
343349 node, has_children, ..
344350 } | {
351+ let ms_style = if self . multi_select && !node. multi_select {
352+ Style :: default ( ) . fg ( self . theme . multi_select_disabled_color ( ) )
353+ } else {
354+ Style :: new ( )
355+ } ;
345356 if * has_children {
346- Line :: from ( " " ) . style ( self . theme . dir_color ( ) )
357+ Line :: from ( " " ) . style ( self . theme . dir_color ( ) ) . patch_style ( ms_style )
347358 } else {
348359 Line :: from ( format ! ( "{} " , node. task_list) )
349360 . alignment ( Alignment :: Right )
350361 . style ( self . theme . cmd_color ( ) )
351362 . bold ( )
363+ . patch_style ( ms_style)
352364 }
353365 } ,
354366 ) ) ;
Original file line number Diff line number Diff line change @@ -28,6 +28,13 @@ impl Theme {
2828 }
2929 }
3030
31+ pub fn multi_select_disabled_color ( & self ) -> Color {
32+ match self {
33+ Theme :: Default => Color :: DarkGray ,
34+ Theme :: Compatible => Color :: DarkGray ,
35+ }
36+ }
37+
3138 pub fn tab_color ( & self ) -> Color {
3239 match self {
3340 Theme :: Default => Color :: Rgb ( 255 , 255 , 85 ) ,
You can’t perform that action at this time.
0 commit comments