mirror of
https://github.com/1j01/textual-paint.git
synced 2024-12-22 14:21:33 +03:00
Try to center image (not working)
This commit is contained in:
parent
9140d14405
commit
32a10ab1d1
@ -2,4 +2,16 @@ GalleryItem {
|
||||
layout: vertical;
|
||||
width: 100%;
|
||||
content-align: center middle;
|
||||
align: center middle;
|
||||
}
|
||||
|
||||
.image {
|
||||
height: 1fr;
|
||||
width: auto;
|
||||
align: center middle;
|
||||
}
|
||||
.caption {
|
||||
text-align: center;
|
||||
background: blue;
|
||||
color: yellow;
|
||||
}
|
||||
|
@ -38,8 +38,8 @@ class GalleryItem(Vertical):
|
||||
"""Add widgets to the layout."""
|
||||
text = self.image.get_renderable()
|
||||
text.no_wrap = True
|
||||
yield Static(text)
|
||||
yield Static(self.caption)
|
||||
yield Static(text, classes="image")
|
||||
yield Static(self.caption, classes="caption")
|
||||
|
||||
class GalleryApp(App[None]):
|
||||
"""ANSI art gallery TUI"""
|
||||
|
Loading…
Reference in New Issue
Block a user