GraphiteEditor / Graphite

2D vector & raster editor that melds traditional layers & tools with a modern node-based, non-destructive, procedural workflow.
https://graphite.rs
Apache License 2.0
7.83k stars 413 forks source link

Add a View > Rulers toggle to disable rulers #1416

Closed Keavon closed 10 months ago

Keavon commented 1 year ago

You will store the rulers enabled/disabled status next to pub view_mode: ViewMode, in document_message_handler.rs, as a boolean called rulers_visible: bool,.

Then you need to add a DocumentMessage message and its handler which enables/disables that, you can call it SetRulersVisible { visible: bool }.

Then add an entry in the view section of menu_bar_message_handler.rs for View > Rulers. It should display a checkbox to the left so take a look at how the other menu bar entries which do have a checkbox are implemented and use that approach to replicate how they tie the value to the rulers_visible: bool, field of the DocumentMessageHandler. Clicking that entry should call your new SetRulersVisible message.

You also need to add a FrontendMessage called UpdateRulersVisibility { visible: bool } and add a handler in the frontend for it in the correct place to hide the rulers from being rendered by the Document.rs svelte component.

gautamprikshit1 commented 1 year ago

I would love to work on this

0HyperCube commented 10 months ago

Closed by #1479

Keavon commented 10 months ago

@zeroishero could you please comment in this issue? (You can just say "Ok" or something.)

zeroishero commented 10 months ago

Ok