[Okular-devel] [okular] [Bug 186531] Trim Margin doesn't work if paper color was set

Marius Kotsbak marius at kotsbak.com
Mon Mar 11 09:30:05 UTC 2013


https://bugs.kde.org/show_bug.cgi?id=186531

--- Comment #9 from Marius Kotsbak <marius at kotsbak.com> ---
What do you think about this then:

"I confirmed this is the case, so ... there's this function "isWhite" in
utils.cpp which isn't used anywhere else than in Utils::imageBoundingBox.

I modified it from

inline static bool isWhite( QRgb argb ) {
    return ( argb & 0xFFFFFF ) == 0xFFFFFF; // ignore alpha
}

to

inline static bool isPaperColor( QRgb argb ) {
    return (argb & 0xFFFFFF) == (Settings::paperColor().rgb() & 0xFFFFFF);
}

(obviously had to include "settings.h")

and now it works."

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the Okular-devel mailing list