mirror of
https://github.com/1j01/textual-paint.git
synced 2024-11-20 18:32:04 +03:00
Update screenshot, and screenshot methodology, and remove table wrapper
The old screenshot was generated by Select All and Copy As HTML in Ubuntu's Terminal app (using a keyboard shortcut that had to be set up first), and post-processed using code included in screenshot.svg, which I'm now deleting. The new screenshot is generated using Textual's built-in SVG export. It displays nicer, with less artifacts (seams between cells). It doesn't need such silly explanation of the nature of the screenshot, and was also sizing to the width of the text, so I removed the wrapper table which was imitating (standing in for) figure/figcaption elements. The new screenshot also includes a window border, macOS-styled, which is a little weird since it's a remake of MS Paint (Windows software) developed entirely on Ubuntu (Linux distro).
This commit is contained in:
parent
8f40c77d6f
commit
6946669a41
@ -6,14 +6,7 @@ MS Paint in your terminal.
|
||||
|
||||
This is a TUI (Text User Interface) image editor, inspired by MS Paint, built with [Textual](https://textual.textualize.io/).
|
||||
|
||||
<!-- GitHub doesn't support line-height style in markdown, so I can't use inline HTML for the screenshot without seams between rows of text. But I can include the HTML inside <foreignObject> in an SVG file and include that as an <img> element. -->
|
||||
<!-- GitHub doesn't support figure/figcaption in markdown, so I have to use a table. -->
|
||||
<table>
|
||||
<tr><td align="center">
|
||||
<img src="screenshot.svg" alt="MS Paint like interface" />
|
||||
</td></tr>
|
||||
<tr><td align="center">This screenshot of Textual Paint is the terminal's screen buffer copied as HTML, wrapped in SVG, placed in HTML inside Markdown.<br>This might not render correctly in your browser.</tr></td>
|
||||
</table>
|
||||
|
||||
## Features
|
||||
|
||||
|
333
screenshot.svg
333
screenshot.svg
File diff suppressed because one or more lines are too long
Before Width: | Height: | Size: 46 KiB After Width: | Height: | Size: 267 KiB |
@ -2169,6 +2169,8 @@ class PaintApp(App[None]):
|
||||
Binding("f3", "custom_zoom", _("Custom Zoom")),
|
||||
# Dev tool to inspect the widget tree.
|
||||
Binding("f12", "toggle_inspector", _("Toggle Inspector")),
|
||||
# Update screenshot on readme.
|
||||
Binding("ctrl+j", "update_screenshot", _("Update Screenshot")),
|
||||
]
|
||||
|
||||
show_tools_box = var(True)
|
||||
@ -2845,6 +2847,11 @@ class PaintApp(App[None]):
|
||||
else:
|
||||
restart_program()
|
||||
|
||||
def action_update_screenshot(self) -> None:
|
||||
"""Update the screenshot on the readme."""
|
||||
folder = os.path.join(os.path.dirname(__file__), "..", "..")
|
||||
self.save_screenshot(filename="screenshot.svg", path=folder)
|
||||
|
||||
def message_box(self,
|
||||
title: str,
|
||||
message: Widget|str,
|
||||
|
Loading…
Reference in New Issue
Block a user