mirror of
https://github.com/1j01/textual-paint.git
synced 2024-12-21 13:51:45 +03:00
Add ASCII art warning icon to confirmation dialog
This commit is contained in:
parent
b5e0ec8438
commit
e814dd6637
15
paint.css
15
paint.css
@ -199,12 +199,21 @@ Button {
|
||||
}
|
||||
|
||||
#overwrite_dialog .window_content {
|
||||
padding: 2 4;
|
||||
width: 40;
|
||||
width: 50;
|
||||
height: 15;
|
||||
}
|
||||
#overwrite_dialog .window_content Button {
|
||||
width: auto;
|
||||
height: auto;
|
||||
margin-right: 1;
|
||||
margin-top: 1;
|
||||
}
|
||||
#overwrite_dialog .warning_icon {
|
||||
width: auto;
|
||||
height: auto;
|
||||
padding-left: 2;
|
||||
}
|
||||
#overwrite_dialog .main_content {
|
||||
padding: 2 2;
|
||||
width: 1fr;
|
||||
}
|
||||
|
||||
|
20
paint.py
20
paint.py
@ -728,11 +728,23 @@ class PaintApp(App):
|
||||
title="Save As",
|
||||
)
|
||||
window.content.mount(
|
||||
Static(filename + " already exists.", markup=False),
|
||||
Static("Do you want to replace it?"),
|
||||
Horizontal(
|
||||
Button("Yes", id="overwrite_yes_button"),
|
||||
Button("No", id="overwrite_no_button"),
|
||||
Static("""[#ffff00]
|
||||
_
|
||||
/ \\
|
||||
/ | \\
|
||||
/ . \\
|
||||
/_______\\
|
||||
[/]""", classes="warning_icon"),
|
||||
Vertical(
|
||||
Static(filename + " already exists.", markup=False),
|
||||
Static("Do you want to replace it?"),
|
||||
Horizontal(
|
||||
Button("Yes", id="overwrite_yes_button"),
|
||||
Button("No", id="overwrite_no_button"),
|
||||
),
|
||||
classes="main_content"
|
||||
)
|
||||
)
|
||||
)
|
||||
self.mount(window)
|
||||
|
Loading…
Reference in New Issue
Block a user