diff --git a/src/dlangui/widgets/grid.d b/src/dlangui/widgets/grid.d index 255b2e07..af18742b 100644 --- a/src/dlangui/widgets/grid.d +++ b/src/dlangui/widgets/grid.d @@ -1435,8 +1435,10 @@ class StringGridWidget : StringGridWidgetBase { cl = _cellHeaderSelectedBackgroundColor; } buf.fillRect(rc, cl); - buf.drawLine(Point(rc.right, rc.bottom), Point(rc.right, rc.top), _cellHeaderBorderColor); // vertical - buf.drawLine(Point(rc.left, rc.bottom), Point(rc.right - 1, rc.bottom), _cellHeaderBorderColor); // horizontal + static if (BACKEND_GUI) { + buf.drawLine(Point(rc.right, rc.bottom), Point(rc.right, rc.top), _cellHeaderBorderColor); // vertical + buf.drawLine(Point(rc.left, rc.bottom), Point(rc.right - 1, rc.bottom), _cellHeaderBorderColor); // horizontal + } } /// draw cell background @@ -1451,13 +1453,22 @@ class StringGridWidget : StringGridWidgetBase { // fixed cell background buf.fillRect(rc, _fixedCellBackgroundColor); } - buf.drawLine(Point(rc.left, rc.bottom + 1), Point(rc.left, rc.top), _cellBorderColor); // vertical - buf.drawLine(Point(rc.left, rc.bottom), Point(rc.right - 1, rc.bottom), _cellBorderColor); // horizontal + static if (BACKEND_GUI) { + buf.drawLine(Point(rc.left, rc.bottom + 1), Point(rc.left, rc.top), _cellBorderColor); // vertical + buf.drawLine(Point(rc.left, rc.bottom), Point(rc.right - 1, rc.bottom), _cellBorderColor); // horizontal + } if (selectedCell) { - if (_rowSelect) - buf.drawFrame(rc, _selectionColorRowSelect, Rect(0,1,0,1), _cellBorderColor); - else - buf.drawFrame(rc, _selectionColor, Rect(1,1,1,1), _cellBorderColor); + static if (BACKEND_GUI) { + if (_rowSelect) + buf.drawFrame(rc, _selectionColorRowSelect, Rect(0,1,0,1), _cellBorderColor); + else + buf.drawFrame(rc, _selectionColor, Rect(1,1,1,1), _cellBorderColor); + } else { + if (_rowSelect) + buf.fillRect(rc, _selectionColorRowSelect); + else + buf.fillRect(rc, _selectionColor); + } } } diff --git a/views/res/console_theme_default.xml b/views/res/console_theme_default.xml index 2ed2a628..ea276c78 100644 --- a/views/res/console_theme_default.xml +++ b/views/res/console_theme_default.xml @@ -22,13 +22,13 @@ - - - + + + - - + +