Philip-Scott / Notes-up

Markdown notes editor & manager
GNU General Public License v2.0
621 stars 47 forks source link

Edit and View modes are not at the same position in the note when switching between them #117

Open yerbestpal opened 7 years ago

yerbestpal commented 7 years ago

I don't know if that's intentional or not, but when I am looking down a note in 'view' mode, and see something I want to edit, it would be very handy if 'edit' mode opened at the same area to save scrolling around to find it. Especially in larger notes.

Philip-Scott commented 7 years ago

I think it should be possible by messing around with the scrollbars, I'll give it a try once the semester ends!

adds68 commented 6 years ago

Please lets get this working! As notes grow, it really becomes a pain :(

@Philip-Scott I've never used Vala or C much for app dev, but where would i start to look in the source code to try and hack something together?

Philip-Scott commented 6 years ago

@Wetrain Valadocs is always a great place to start :)

Both the viewer and the editor have a scrollbar, and the scrollbars have something called anm Adjustment. So maybe what we could do is grab the scrollbar's position, and set an approximate on the editor :)

https://valadoc.org/gtk+-3.0/Gtk.Scrollbar.html https://valadoc.org/gtk+-3.0/Gtk.Adjustment.html

The code for the editor and viewer widgets are located here https://github.com/Philip-Scott/Notes-up/tree/master/src/Widgets