소스 검색

Fixed custom cell color also coloring the separator in FullRowSelect mode

Thomas Nind 4 년 전
부모
커밋
f2c40ac83f
1개의 변경된 파일7개의 추가작업 그리고 2개의 파일을 삭제
  1. 7 2
      Terminal.Gui/Views/TableView.cs

+ 7 - 2
Terminal.Gui/Views/TableView.cs

@@ -415,9 +415,14 @@ namespace Terminal.Gui {
 				Driver.SetAttribute (isSelectedCell ? scheme.HotFocus : scheme.Normal);
 				Driver.SetAttribute (isSelectedCell ? scheme.HotFocus : scheme.Normal);
 				
 				
 				Driver.AddStr (TruncateOrPad(val,representation, current.Width, colStyle));
 				Driver.AddStr (TruncateOrPad(val,representation, current.Width, colStyle));
-				
+
+				// Reset color scheme to normal for drawing separators if we drew text with custom scheme
+				if(scheme != ColorScheme) {
+					Driver.SetAttribute (isSelectedCell ? ColorScheme.HotFocus : ColorScheme.Normal);
+				}
+
 				// If not in full row select mode always, reset color scheme to normal and render the vertical line (or space) at the end of the cell
 				// If not in full row select mode always, reset color scheme to normal and render the vertical line (or space) at the end of the cell
-				if(!FullRowSelect)
+				if (!FullRowSelect)
 					Driver.SetAttribute (ColorScheme.Normal);
 					Driver.SetAttribute (ColorScheme.Normal);
 
 
 				RenderSeparator(current.X-1,row,false);
 				RenderSeparator(current.X-1,row,false);