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
Add vertical ruler for writer #9030
Add vertical ruler for writer #9030
Conversation
409ade8
to
29eaab2
Compare
CORE Patch: https://gerrit.libreoffice.org/c/core/+/167481 |
1eac0ff
to
7a37843
Compare
5d37294
to
402f5ac
Compare
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.
Okay, for vertical ruler: We only have header and footer margins that are draggable as far as i can see.
So i guess we shouldn't have code for break points inside VRuler file?
And also it seems to me that vertical ruler goes off screen as i play with the header footer settings :) It feels like something related to left / right margins are forgotten. This is a guess. Can you check that vertical ruler doesn't go off screen and is readable.
I'd check the code from scratch and make some polishing (if required).
Thanks @Darshan-upadhyay1110 :) We are so close.
Yes we do not need break point for vertical ruler
Can you please give me hint, how did you change the header footer settings ? What action you performed that made ruler goes out of screen ? |
9a03648
to
c132659
Compare
Of course, i used page settings and set the header & footer margins. |
c99a8cd
to
f70d8be
Compare
27ceaa5
to
ffcb1e6
Compare
662baf6
to
3507764
Compare
3507764
to
6980a8c
Compare
- add new LOK callback for vertical & horizontal ruler update Signed-off-by: Darshan-upadhyay1110 <[email protected]> Change-Id: I3c0e26f22072de4612e128d58ac41b629be82807 Add vertical ruler and implement margin calculation - Added new vertical ruler file to separate it from horizontal ruler calculation - For vertical ruler we do not need tab stops so removed it. - next stpe will be to implement add top and bottom margin by drag Signed-off-by: Darshan-upadhyay1110 <[email protected]> Change-Id: I8186c874ff59571db7a75ec4c31f81fc655ef301
- Before this commit vertical ruler stays only in first page - if we jum to page 2,3 so and so ruler won't change it's possition - but i have added some calculation based data we recevice from CORE - calculation: - we need to consider pageoffset for vertical ruler - check if cursor moves to other page - then add total Height of previous pages. - for Ex: if we are at page 3 then ruler.marginInlineStart should additionally have total height ( page1Height + page2Height) - this will place ruler to exact possition where we want - next : add Top and Bottom margin drag Signed-off-by: Darshan-upadhyay1110 <[email protected]> Change-Id: Ie2a2d4e5f0cfd627bcafd81230ad33b7aec280a2 Signed-off-by: Darshan-upadhyay1110 <[email protected]>
- As we do for horizontal ruler we need marker that will change margin of Header and Footer of the document - current patch will have design where user can see markers in vertical ruler - you can drag and change potition of marker. Improvments that still need to do: - user can drag but it will not change size/margin of header/Footer - next we will pass info to CORE according to corrdinates we got from drag - it will update text potition on document Signed-off-by: Darshan-upadhyay1110 <[email protected]> Change-Id: I9663a75d5c84eace784266c76be12abd762434bb Signed-off-by: Darshan-upadhyay1110 <[email protected]>
- Send Upeer and Lower space value for header and footer according to drag - we need to send both values in core. - even if we drag either upper or lower we will send values accordingly but both values should be updated Signed-off-by: Darshan-upadhyay1110 <[email protected]> Change-Id: I4ef3287c5afe6e1eef5aac225d3c06ca9d1fd9e5
- we are string previous response values of top/bottom margin - resone is because we need that values to pass after dragEnd. - but if we change section foucs from Header to Footer or Text area to Shape then we need to reset that old values with the incoming response - this patch will do that. - for `table` we will hide the marker as we do not need that. table already have there marker to resize. - added some edge cases like if start marker goes beyond end marker - start and end marker should not cross limit beyond page top/bottom Signed-off-by: Darshan-upadhyay1110 <[email protected]> Change-Id: Iffd3cbf08806666b858d9c3da7ca6362085223dd Signed-off-by: Darshan-upadhyay1110 <[email protected]>
- remove use of Leaflet's - change working js code to ts - please check above commit messages for understanding of implementation. Signed-off-by: Darshan-upadhyay1110 <[email protected]> Change-Id: Iee222bbdb343730014260c1785a90e68c6dedfd1
6980a8c
to
6cf5bdf
Compare
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.
Looks good, lets get this in and then do a followup :)
One UX comment:
I would expect to have both of them draggable and working. |
@gokaysatir you requested changes, please re-check |
Change-Id: I3c0e26f22072de4612e128d58ac41b629be82807
Summary
TODO
Checklist
make check
make run
and manually verified that everything looks okay