diff options
Diffstat (limited to 'amarok/src/prettypopupmenu.cpp')
-rw-r--r-- | amarok/src/prettypopupmenu.cpp | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/amarok/src/prettypopupmenu.cpp b/amarok/src/prettypopupmenu.cpp index 7cb3b745..6962cfbb 100644 --- a/amarok/src/prettypopupmenu.cpp +++ b/amarok/src/prettypopupmenu.cpp @@ -37,8 +37,8 @@ TQColor PrettyPopupMenu::s_sidePixmapColor; // public //////////////////////////////////////////////////////////////////////////////// -PrettyPopupMenu::PrettyPopupMenu( TQWidget* parent, const char* name ) - : KPopupMenu( parent, name ) +PrettyPopupMenu::PrettyPopupMenu( TQWidget* tqparent, const char* name ) + : KPopupMenu( tqparent, name ) { // Must be initialized so that we know the size on first invocation if ( s_sidePixmap.isNull() ) @@ -62,21 +62,21 @@ PrettyPopupMenu::generateSidePixmap() } } -QRect +TQRect PrettyPopupMenu::sideImageRect() const { - return TQStyle::visualRect( TQRect( frameWidth(), frameWidth(), s_sidePixmap.width(), + return TQStyle::tqvisualRect( TQRect( frameWidth(), frameWidth(), s_sidePixmap.width(), height() - 2*frameWidth() ), this ); } -QColor +TQColor PrettyPopupMenu::calcPixmapColor() { KConfig *config = KGlobal::config(); config->setGroup("WM"); - TQColor color = TQApplication::palette().active().highlight(); -// TQColor activeTitle = TQApplication::palette().active().background(); -// TQColor inactiveTitle = TQApplication::palette().inactive().background(); + TQColor color = TQApplication::tqpalette().active().highlight(); +// TQColor activeTitle = TQApplication::tqpalette().active().background(); +// TQColor inactiveTitle = TQApplication::tqpalette().inactive().background(); TQColor activeTitle = config->readColorEntry("activeBackground", &color); TQColor inactiveTitle = config->readColorEntry("inactiveBackground", &color); @@ -84,7 +84,7 @@ PrettyPopupMenu::calcPixmapColor() int h1, s1, v1, h2, s2, v2, h3, s3, v3; activeTitle.hsv(&h1, &s1, &v1); inactiveTitle.hsv(&h2, &s2, &v2); - TQApplication::palette().active().background().hsv(&h3, &s3, &v3); + TQApplication::tqpalette().active().background().hsv(&h3, &s3, &v3); if ( (kAbs(h1-h3)+kAbs(s1-s3)+kAbs(v1-v3) < kAbs(h2-h3)+kAbs(s2-s3)+kAbs(v2-v3)) && ((kAbs(h1-h3)+kAbs(s1-s3)+kAbs(v1-v3) < 32) || (s1 < 32)) && (s2 > s1)) @@ -95,7 +95,7 @@ PrettyPopupMenu::calcPixmapColor() // limit max/min brightness int r, g, b; color.rgb(&r, &g, &b); - int gray = qGray(r, g, b); + int gray = tqGray(r, g, b); if (gray > 180) { r = (r - (gray - 180) < 0 ? 0 : r - (gray - 180)); g = (g - (gray - 180) < 0 ? 0 : g - (gray - 180)); @@ -138,14 +138,14 @@ void PrettyPopupMenu::resizeEvent(TQResizeEvent * e) { KPopupMenu::resizeEvent( e ); - setFrameRect( TQStyle::visualRect( TQRect( s_sidePixmap.width(), 0, + setFrameRect( TQStyle::tqvisualRect( TQRect( s_sidePixmap.width(), 0, width() - s_sidePixmap.width(), height() ), this ) ); } -//Workaround Qt3.3.x sizing bug, by ensuring we're always wide enough. +//Workaround TQt3.3.x sizing bug, by ensuring we're always wide enough. void PrettyPopupMenu::resize( int width, int height ) { - width = kMax(width, maximumSize().width()); + width = kMax(width, tqmaximumSize().width()); KPopupMenu::resize(width, height); } @@ -174,9 +174,9 @@ PrettyPopupMenu::paintEvent( TQPaintEvent* e ) drawContents( &p ); - style().drawPrimitive( TQStyle::PE_PanelPopup, &p, + tqstyle().tqdrawPrimitive( TQStyle::PE_PanelPopup, &p, TQRect( 0, 0, width(), height() ), - colorGroup(), TQStyle::Style_Default, + tqcolorGroup(), TQStyle::Style_Default, TQStyleOption( frameWidth(), 0 ) ); } |