diff --git a/src/textual_paint/paint.css b/src/textual_paint/paint.css index d3c3420..f1f035e 100644 --- a/src/textual_paint/paint.css +++ b/src/textual_paint/paint.css @@ -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; } diff --git a/src/textual_paint/paint.py b/src/textual_paint/paint.py index 2ac1415..e7abc6d 100755 --- a/src/textual_paint/paint.py +++ b/src/textual_paint/paint.py @@ -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