D6086: Left-click mini-map to jump to clicked area

Kevin Funk noreply at phabricator.kde.org
Sun Jun 4 10:11:14 UTC 2017


kfunk accepted this revision.
kfunk added a comment.
This revision is now accepted and ready to land.


  +1 on the behavior change, this is a much desired change :)

INLINE COMMENTS

> kateviewhelpers.cpp:204
> +        if (m_leftMouseDown) {
> +            int newVal = ((e->pos().y()-m_mapGroveRect.top()) / (double)m_mapGroveRect.height()) * (double)(maximum()+pageStep()) - pageStep()/2;
> +            if (newVal < 0) newVal = 0;

Style: `((a - b)) / ...`

> kateviewhelpers.cpp:205
> +            int newVal = ((e->pos().y()-m_mapGroveRect.top()) / (double)m_mapGroveRect.height()) * (double)(maximum()+pageStep()) - pageStep()/2;
> +            if (newVal < 0) newVal = 0;
> +            if (newVal > maximum()) newVal = maximum();

Use `qBound(...)`?

REPOSITORY
  R39 KTextEditor

REVISION DETAIL
  https://phabricator.kde.org/D6086

To: sars, #ktexteditor, #kate, dhaumann, kfunk
Cc: kfunk, broulik, kwrite-devel, #frameworks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20170604/b76cd7f0/attachment.html>


More information about the Kde-frameworks-devel mailing list