New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: added ability to show/hide rulers #2634
Conversation
|
Hey @ice0 , thanks for the review 2- problem is that this features goal I believe was to save space, So one would have to not only hide the ruler but also the corresponding grid row/column. I kept looking for a workaround to not have to remove and reinsert the grids rows/colums something like a hide()/show() for the gtk grid columns/rows but there weren't any. So the only way was to manually remove and reinsert the specified rows/columns. Then just reattach the ruler widgets along with the arrow box which I recreated and caused the memory leakage here I'm assuming as its created each time without being deleted. 3- yes the duplication here is surely not good I will try to make the gtk::event box a class member then so I wouldnt have to recreate it. Although that requires adding the event box header in the workarea header, but yes I guess it would be worth it, to avoid the duplication. Update: removed duplicated code which contained repeated creation of the menu box, I believe now the memory leakage should probably be fixed am I correct ? |
Row/column will hide if you hide all widgets in them. |
Oh that's great actually, then that's what needs to be done. |
|
If you'd like, you can ask the artists on the Synfig forums for help. I also suggest saving the state of the rulers in the settings file. |
All sounds good, will be working on them tonight hopefully. Also yes, thats a great idea I will in the meantime ask in the forums, that way we could also get some opinions about the icons I guess. |
simplified even more and changed name as suggested. will be working in about an hour on saving the ruler status in the settings files, then starting with the gtk::arrow replacement
hey, @ice0 as of right now I believe whats left is:
update: oh yes and also the tool tip |
added and synced with the tool button
Update: now the check button is added and its synced with the tool button. and the meta data is saved correctly so the ruler position is left as is when reloading the saced canvas. |
Icon and tooltip added. However, I think maybe the icon color needs to be greyer. So i'll just wait for you guy's opinionson this and if so I would just place the icon with the new edited verision. update: Woah just realized the .sif file is huge it's around 9000 lines, while for comparison the show grid icon is about 3000. so definitely I need to remove some things to make it simpler. |
Do we need an explicit button to toggle the rulers, or would a menu item suffice? P.S. The original feature request is also for the menu item only. (#1077) |
Hey, @ice0 so should I remove the button, and just leave the menu item ? |
I suggest to remove the button, we can add it later if users need it. |
sounds good will do |
done, I also retested it to make sure the meta data is saved correctly on reopening the file. |
was needed when there was a button along with it now not needed
@ice0, done. Is anything else left here or is it good to go? |
@rodolforg done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Almost there :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ice0 We need to squash before merge
1- removed toggle ruler 2- removed unneeded set_ruler_show_toggle 3- changed `set_ruler_visible` to `set_show_rulers`
Merged. Thank you! |
hopefully many more merges to come :) |
as asked for in #1077
whats left to do:
1- currently there is no icon for the ruler so I will have to make one myself im guessing.
2- probably would be useful to also add this in the menu as is done for the other similar buttons.
this is a how it works as of now
before:
after: