mirror of
https://github.com/1j01/textual-paint.git
synced 2025-01-03 12:22:23 +03:00
Make grid more subtle by showing cell background underneath border
This commit is contained in:
parent
6a9e8703a6
commit
507470ad10
@ -2190,11 +2190,13 @@ class Canvas(Widget):
|
|||||||
if self.magnification > 1:
|
if self.magnification > 1:
|
||||||
ch = self.big_ch(ch, x % self.magnification, y % self.magnification)
|
ch = self.big_ch(ch, x % self.magnification, y % self.magnification)
|
||||||
if self.show_grid and self.magnification >= 4:
|
if self.show_grid and self.magnification >= 4:
|
||||||
dark_gray = "#808080"
|
|
||||||
light_gray = "#c0c0c0"
|
|
||||||
if x % self.magnification == 0 or y % self.magnification == 0:
|
if x % self.magnification == 0 or y % self.magnification == 0:
|
||||||
bg = dark_gray
|
# bg = "#808080"...
|
||||||
fg = light_gray
|
# Its actually useful to see the background color of the cell,
|
||||||
|
# as it lets you distinguish between a space " " and a full block "█".
|
||||||
|
# Plus this makes the grid more subtle, although it looks a little weird
|
||||||
|
# how the border line is inset a bit into the cell...
|
||||||
|
fg = "#c0c0c0"
|
||||||
if x % self.magnification == 0 and y % self.magnification == 0:
|
if x % self.magnification == 0 and y % self.magnification == 0:
|
||||||
ch = "┼"
|
ch = "┼"
|
||||||
elif x % self.magnification == 0:
|
elif x % self.magnification == 0:
|
||||||
|
Loading…
Reference in New Issue
Block a user