diff options
author | Slávek Banko <[email protected]> | 2016-04-10 10:42:00 +0200 |
---|---|---|
committer | Slávek Banko <[email protected]> | 2016-04-10 10:42:00 +0200 |
commit | 7fdc8b30e85418cca031b45ad02f723373b73433 (patch) | |
tree | 491150f68ddc476645599a00d04e27b194e9648c /src/misc.cpp | |
parent | 3566ebfc3015ab32c4e0531defb41377c171fadb (diff) | |
download | tastymenu-7fdc8b30e85418cca031b45ad02f723373b73433.tar.gz tastymenu-7fdc8b30e85418cca031b45ad02f723373b73433.zip |
Initial TQt conversion
Signed-off-by: Slávek Banko <[email protected]>
Diffstat (limited to 'src/misc.cpp')
-rw-r--r-- | src/misc.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/misc.cpp b/src/misc.cpp index 2f1d30c..15fe755 100644 --- a/src/misc.cpp +++ b/src/misc.cpp @@ -16,23 +16,23 @@ * Boston, MA 02111-1307, USA. */ -#include <qcolor.h> +#include <tqcolor.h> #include "misc.h" -QColor alphaBlendColors(const QColor &bgColor, const QColor &fgColor, const int a) +TQColor alphaBlendColors(const TQColor &bgColor, const TQColor &fgColor, const int a) { // normal button... - QRgb rgb = bgColor.rgb(); - QRgb rgb_b = fgColor.rgb(); + TQRgb rgb = bgColor.rgb(); + TQRgb rgb_b = fgColor.rgb(); int alpha = a; if(alpha>255) alpha = 255; if(alpha<0) alpha = 0; int inv_alpha = 255 - alpha; - QColor result = QColor( qRgb(qRed(rgb_b)*inv_alpha/255 + qRed(rgb)*alpha/255, - qGreen(rgb_b)*inv_alpha/255 + qGreen(rgb)*alpha/255, - qBlue(rgb_b)*inv_alpha/255 + qBlue(rgb)*alpha/255) ); + TQColor result = TQColor( tqRgb(tqRed(rgb_b)*inv_alpha/255 + tqRed(rgb)*alpha/255, + tqGreen(rgb_b)*inv_alpha/255 + tqGreen(rgb)*alpha/255, + tqBlue(rgb_b)*inv_alpha/255 + tqBlue(rgb)*alpha/255) ); return result; } |