mirror of
https://github.com/1j01/textual-paint.git
synced 2024-12-02 23:28:52 +03:00
Use bucket emoji for fill tool icon, outside of VS Code
Other terminals may fail, so perhaps I should just stick to the more reliable emoji, but the bucket is much better as an icon...
This commit is contained in:
parent
edd1c755e1
commit
c86d8c01ae
@ -267,17 +267,25 @@ class Tool(Enum):
|
||||
Tool.text: "A", # "Abc"
|
||||
Tool.line: "\\",
|
||||
Tool.curve: "~", # "~" "S" "s"
|
||||
Tool.rectangle: "[_]", # "[]"
|
||||
Tool.rectangle: "[_]", # "[]" "[_]" ("[\x1B[53m_\x1B[55m]" doesn't work right, is there no overline tag?)
|
||||
Tool.polygon: "[b]L[/b]", # "L"
|
||||
Tool.ellipse: "O", # "()"
|
||||
Tool.rounded_rectangle: "(_)",
|
||||
Tool.rounded_rectangle: "(_)", # "(_)" ("(\x1B[53m_\x1B[55m)" doesn't work right, is there no overline tag?)
|
||||
}
|
||||
return enum_to_icon[self]
|
||||
# "🫗" causes jutting out in Ubuntu terminal, "🪣" causes the opposite in VS Code terminal
|
||||
# VS Code sets TERM_PROGRAM to "vscode", so we can use that to detect it
|
||||
if os.environ.get("TERM_PROGRAM") == "vscode":
|
||||
# fill_icon = "🫗" # is also hard to see in the light theme
|
||||
fill_icon = "🌊" # is a safe alternative
|
||||
# fill_icon = "[on black]🫗 [/]" # no way to make this not look like a selection highlight
|
||||
else:
|
||||
fill_icon = "🪣"
|
||||
return {
|
||||
Tool.free_form_select: "⚝",
|
||||
Tool.select: "⬚",
|
||||
Tool.eraser: "🧼",
|
||||
Tool.fill: "🌊", # "🫗" causes jutting out in Ubuntu terminal, "🪣" causes the opposite in VS Code terminal
|
||||
Tool.fill: fill_icon,
|
||||
Tool.pick_color: "💉",
|
||||
Tool.magnifier: "🔍",
|
||||
Tool.pencil: "✏️",
|
||||
|
Loading…
Reference in New Issue
Block a user