Ruler and toolbar for the profile

Lubomir I. Ivanov neolit123 at
Fri Sep 27 08:58:45 UTC 2013

On 27 September 2013 17:04, Maximilian Güntner
<maximilian.guentner at> wrote:
> Thanks for your input, Lubomir.
> 2013/9/27 Lubomir I. Ivanov <neolit123 at>:
>> cont'd.
>> - also, it may be best to move the ruler graphics (lines + text) on
>> top of all other elements (z order).
> Please have a look at the attached patch. The ruler is now the last
> element added to the scene() (-> on top).

just tried the patch. yes, it is now.

>>> here are some observations and suggestions:
>>> - if the ruler is enabled then perhaps the toolTip (info panel) should
>>> not be. the problem here is that the first control point of the ruler
>>> lies under the tooltip and cannot be accessed. i think the ruler
>>> toggle should switch the toolTip on/off.
> This can be easily done with one LOC but I am not sure whether this is
> really beneficial.
> I think that the toolTip is still useful together with the ruler.

the main problem is that the tooltip is still above the ruler at all
times and the left-hand control point is not accessible, ever. it also
covers the actual ruler text partially.

quite frankly, i never liked the static tooltip, because on smaller
profiles it covers a good portion of the graph while moving around.
perhaps a tooltip that follows the mouse is a good solution here and
it also solves the problem of not being able to click at a portion of
the profile because the tooltip is there. however, i do think that if
the ruler text and the tooltip are both active the information may be
a bit too much.

others should give an opinion as well, i would think.

>>> - the ruler text perhaps should scale proportionally instead of
>>> attempting to fit the text into the provided rectangle (using
>>> drawText()). then if an area is way too small the user can use the
>>> scroll wheel to zoom in and read the ruler text. the alternative to
>>> that is to not put text inside the ruler, but outside of it, for
>>> example at the bottom of the profile left from the toolbar. i was
>>> going to suggest to place the ruler text in the toolTip, but there is
>>> a problem with this solution (1.). without text readability the ruler
>>> is not useful for small distances.
> I initially wanted to add the text to the toolTip but with all options
> enabled and the ruler
> added to the profile, the toolTip would become a massive block of
> random information.
> Also it may confuse the user when the text is not directly associated
> with ruler (i.e. displayed on top/bottom of the ruler).
> I don't like the idea of scaling the text to a fixed Rect size since
> this adds another accessibility barrier for
> first time or inexperienced users who don't know that there is a zoom
> function (or don't have a scroll wheel).
> Maybe we can come up with an alternative - like scaling the text when
> the distance between the two points
> is smaller than X.
> Let me know what you think.

just tried a certain peace of software that has rulers and i've
noticed that it never squashes the text in a rectangle; the same can
be done here.
it would be nicer if the text still rotates, but this could be a
problem when measuring say in the bottom-left corner, so i would leave
it always horizontal starting from left center of the ruler line and
the text should never go out of the screen.

if i was about to rethink how the profile data is shown, i would have
done the following:
- reserve an area *outside* of the profile (a generic info area)
- when ruler is active, ruler data is shown there
- if ruler is not active, mouse over data is shown there (current tooltip).
- when other tools are added to subsurface use the same area for their
specific properties...

>>> - there is a printMode flag which should be respected, as it controls
>>> the visibility of some profile elements when printing. the toolbar and
>>> ruler should not be visible for printMode == true.
> The toolBar is already not being added to the profile when in
> printMode. I fixed the behavior of the ruler
> in the attached patch.

ok, confirmed.


More information about the subsurface mailing list