mirror of
https://github.com/1j01/textual-paint.git
synced 2024-12-22 22:31:43 +03:00
Show tiny Paint icon ASCII art in Header (regardless of --ascii-only)
This commit is contained in:
parent
79b9c37c09
commit
fea5cf8894
@ -3,6 +3,17 @@ Screen {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* Show brush handles (middle row of 3x3 icon) when header is collapsed */
|
||||
/* :not() support would make this easier */
|
||||
Header HeaderIcon {
|
||||
/* offset: 0 -1; causes it to be invisible (bug?) */
|
||||
margin-top: -1;
|
||||
}
|
||||
Header.-tall HeaderIcon {
|
||||
/* offset: 0 0; */
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
#paint {
|
||||
layout: vertical;
|
||||
}
|
||||
|
@ -32,6 +32,7 @@ from textual.strip import Strip
|
||||
from textual.dom import DOMNode
|
||||
from textual.widget import Widget
|
||||
from textual.widgets import Button, Static, Input, Header, RadioSet, RadioButton
|
||||
from textual.widgets._header import HeaderIcon
|
||||
from textual.binding import Binding
|
||||
from textual.color import Color, ColorParseError
|
||||
from PIL import Image, UnidentifiedImageError
|
||||
@ -5246,6 +5247,11 @@ if args.ascii_only:
|
||||
|
||||
RadioButton.BUTTON_INNER = "*" # "*", "o", "O", "@"
|
||||
|
||||
# HeaderIcon.icon = "[on white][blue]\\\\[/][red]|[/][yellow]/[/][/]"
|
||||
HeaderIcon.icon = "[black]..,[/]\n[blue]\\\\[/][on white][red]|[/][yellow]/[/][/]\n[black on rgb(192,192,192)]\\[_][/]"
|
||||
# HeaderIcon.icon = "[black]..,[/]\n[blue]\\\\[/][on white][red]|[/][yellow]/[/][/]\n[black on rgb(192,192,192)]\\[][on white] [/][/]"
|
||||
# HeaderIcon.icon = "[black]...[/]\n[on white][blue]\\\\[/][red]|[/][yellow]/[/][/]\n[black on rgb(192,192,192)]\\[][on white] [/][/]"
|
||||
|
||||
|
||||
# `textual run --dev src.textual_paint.paint` will search for a
|
||||
# global variable named `app`, and fallback to
|
||||
|
Loading…
Reference in New Issue
Block a user