mbrlabs / Lorien

Infinite canvas drawing/whiteboarding app for Windows, Linux and macOS. Made with Godot.
MIT License
5.55k stars 241 forks source link

Add disabled undo & redo buttons for when there is nothing to undo/redo #256

Closed SamTheBlow closed 3 months ago

SamTheBlow commented 11 months ago

When there is nothing to undo, the undo button grays out. When there is nothing to redo, the redo button grays out. The buttons are updated correctly when creating a new file or when going to a different tab.

This is only a visual change. Hovering over the buttons still shows a hint, and clicking on them still makes them do their thing.

Note: this does not behave as expected when the user zooms in/out. For some reason, zooming in/out marks a project as "dirty", which enables the undo button as a result. I've decided to ignore this because zooming in/out shouldn't mark a project as "dirty" in the first place (please correct me if I'm wrong)

Also, I know this project is currently being updated to Godot 4: I don't mind waiting and rewriting the PR after that's done. (This is kinda my first PR, sorry if I screwed something up)

mbrlabs commented 3 months ago

Hello, sorry for the late reply. I finally ported Lorien to Godot 4. I'd like to merge your change, so if you're still interested feel free to update the PR :)

SamTheBlow commented 3 months ago

Nice! Working on it asap.