Commit Graph

18 Commits

Author SHA1 Message Date
Isaiah Odhner
5ed2180d7e Fix releasing window drag 2023-04-20 21:39:38 -04:00
Isaiah Odhner
15af8f6403 Fix warning icon visibility after the first display
It gets set to `display = False` when unmounting, I think.
2023-04-20 21:01:33 -04:00
Isaiah Odhner
48f0303a54 Refactor create_warning_message_box into MessageBox 2023-04-20 21:01:14 -04:00
Isaiah Odhner
093a314d60 Move bits of warning_message_box that need App back into App 2023-04-20 18:09:49 -04:00
Isaiah Odhner
37ff810616 Move warning_message_box implementation to windows.py 2023-04-20 18:02:07 -04:00
Isaiah Odhner
9ab748f255 Use Python class names for window CSS 2023-04-20 17:47:20 -04:00
Isaiah Odhner
5e72708fd8 Rename Python class for character selector dialog for consistency
If I want it to be less verbose, I should rename the super-class
from "DialogWindow" to just "Dialog".
2023-04-20 17:42:17 -04:00
Isaiah Odhner
e39fd52381 Rename CSS class for character selector dialog for consistency 2023-04-20 17:40:15 -04:00
Isaiah Odhner
4bca563358 Remove timer for setting focus
Interestingly, this moves the filename input's cursor to the start,
whereas it was positioned at the end when using the timer.
Unfortunately the Input control doesn't support selection,
which is what I would really want as the behavior.
2023-04-20 12:43:14 -04:00
Isaiah Odhner
8a51bd325c Focus default control within window after opening 2023-04-20 12:31:23 -04:00
Isaiah Odhner
b955aaf361 Input or pick character to draw with 2023-04-20 01:21:06 -04:00
Isaiah Odhner
8ec24a8fdc Prompt to save changes when unloading a document
- Confirm discarding changes for Open, New, or Exit, including for
  exit via Ctrl+C which was previously handled by a built-in binding.
- Await Save As dialog closing, including when Save triggers Save As.
  This is my first time using asynchronous features in Python,
  (as far as I remember,) so it's a bit messy.
- Make DialogWindow callback also for Cancel, which means all
  DialogWindow usage sites care what button is selected.
- Send RequestClose event for Esc key.
2023-04-17 23:09:13 -04:00
Isaiah Odhner
eeaee41747 Submit dialogs with enter, unless a button has focus 2023-04-16 02:03:28 -04:00
Isaiah Odhner
35e93210c8 Close dialogs with Escape key 2023-04-16 00:16:15 -04:00
Isaiah Odhner
d4becd2da0 Refactor dumb button handling using new class DialogWindow 2023-04-16 00:11:59 -04:00
Isaiah Odhner
73d8f04329 Enable dragging windows by their title bars 2023-04-15 22:18:45 -04:00
Isaiah Odhner
e988bf787f Move window layout fix to Window 2023-04-15 22:04:15 -04:00
Isaiah Odhner
c2e86d5eae Implement Save As dialog 2023-04-15 00:57:43 -04:00