[PATCH] divetooltipitem.cpp: prettify the tooltip bounds and padding

Lubomir I. Ivanov neolit123 at gmail.com
Mon Nov 9 06:31:14 PST 2015


On 8 November 2015 at 15:41, Lubomir I. Ivanov <neolit123 at gmail.com> wrote:
> From: "Lubomir I. Ivanov" <neolit123 at gmail.com>
>
> When the tooltip is expanded, not enough padding is present right
> from the text and bottom from it, making the tooltip border
> appear very close to the text.
>
> When the tooltip is collapsed (no time entries) it clips
> the graph/pixmap which makes the graph bottom left corner appear
> to be outside of the tooltip, mainly because of the white border
> of the tooltip background and the background rounding.
>
> To prevent these visual artifacts and to prettify the tooltip
> this patch:
> - makes the rounding 8 instead of 10 of the background rectangle
> - doubles the padding left and right from the pixmap
> (the above two pretty much move the pixmap bottom left corner
> away from the rounded bottom left edge of the tooltip background)
> - add more padding right and bottom from the text
> - never reduce the height of the tooltip to be smaller than
> the graph/pixmap height.
>
> Signed-off-by: Lubomir I. Ivanov <neolit123 at gmail.com>
> ---
>
> let me know if always showing the full graph is an issue...
>
> one alternative is to hard-show/hide the graph when there are
> no entries from get_plot_details_new().

here is a screenshot to visualize what the patch does:
https://dl.dropboxusercontent.com/u/1627980/subsurface/tool_tip_prettify.jpg

lubomir
--


More information about the subsurface mailing list