[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    Re: [kde-workspace] kwin/effects/highlightwindow: Highlight window:
From:       Thomas =?UTF-8?B?TMO8Ymtpbmc=?= <thomas.luebking () gmail ! com>
Date:       2011-12-18 21:48:33
Message-ID: 20111218224833.6b3987df () gmail ! com
[Download RAW message or body]

Am Sun, 18 Dec 2011 22:31:04 +0100
schrieb "Aaron J. Seigo" <aseigo@kde.org>:

> On Sunday, December 18, 2011 19:52:35 Thomas
> =?ISO-8859-1?Q?L=FCbking?= wrote:
> > - weaken some value checks ("== 1.0f")
> ...
> > -        if (m_windowOpacity[w] != 1.0)
> > +        if (*opacity < 0.98f)
> 
> i don't know if it's appropriate here (i'm not overly familiar with
> this precise bit of code), but there is qFuzzyCompare which is
> generally useful in these sorts of cases. hth :)

Yes, no - i actually wanted an easy out (otherwise i'd probably have
tried "> .99999f && < 1.000001f" or so, but am aware of qFuzzyCompare :)

Reason is that depending on FPS and duration you can easily run into an
extra frame at the end and i thought "ok, but maybe not for the last,
say, 2% opacity change" (what nobody could ever spot anyway, even if
you let it run 1000ms that's only 20ms, ie. about 1frame @ 60Hz and the
default animation time is 150ms =)

Cheers,
Thomas

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic