|
|
|
@ -236,7 +236,7 @@ inline bool isSpecialHover(TQWidget *w)
|
|
|
|
|
::tqqt_cast<TQCheckBox *>(w) ||
|
|
|
|
|
#endif
|
|
|
|
|
::tqqt_cast<TQScrollBar *>(w) ||
|
|
|
|
|
#if defined KDE_VERSION && KDE_VERSION >= 0x30400 && KDE_VERSION < 0x30500
|
|
|
|
|
#if defined TDE_VERSION && TDE_VERSION >= 0x30400 && TDE_VERSION < 0x30500
|
|
|
|
|
::tqqt_cast<TQToolButton *>(w) ||
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
@ -375,7 +375,7 @@ TQ_EXPORT_PLUGIN(TQtCurveStylePlugin)
|
|
|
|
|
|
|
|
|
|
#define SKIP_TASKBAR (APP_SKIP_TASKBAR==itsThemedApp || APP_KPRINTER==itsThemedApp || APP_KDIALOG==itsThemedApp)
|
|
|
|
|
|
|
|
|
|
#if defined TQTC_TQT_ONLY || !defined KDE_VERSION || KDE_VERSION >= 0x30200
|
|
|
|
|
#if defined TQTC_TQT_ONLY || !defined TDE_VERSION || TDE_VERSION >= 0x30200
|
|
|
|
|
#include <tqfile.h>
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
@ -393,7 +393,7 @@ TQ_EXPORT_PLUGIN(TQtCurveStylePlugin)
|
|
|
|
|
|
|
|
|
|
#define DW_BGND 105
|
|
|
|
|
|
|
|
|
|
#if defined TQTC_TQT_ONLY || !defined KDE_VERSION || KDE_VERSION >= 0x30200
|
|
|
|
|
#if defined TQTC_TQT_ONLY || !defined TDE_VERSION || TDE_VERSION >= 0x30200
|
|
|
|
|
// Try to read $KDEHOME/share/config/kickerrc to find out if kicker is transparent...
|
|
|
|
|
|
|
|
|
|
static bool kickerIsTrans()
|
|
|
|
@ -820,7 +820,7 @@ TQtCurveStyle::TQtCurveStyle()
|
|
|
|
|
itsMdiColors(0L),
|
|
|
|
|
itsThemedApp(APP_OTHER),
|
|
|
|
|
itsPixmapCache(150000, 499),
|
|
|
|
|
#if defined TQTC_TQT_ONLY || !defined KDE_VERSION || KDE_VERSION >= 0x30200
|
|
|
|
|
#if defined TQTC_TQT_ONLY || !defined TDE_VERSION || TDE_VERSION >= 0x30200
|
|
|
|
|
itsIsTransKicker(false),
|
|
|
|
|
#endif
|
|
|
|
|
itsHover(HOVER_NONE),
|
|
|
|
@ -1161,7 +1161,7 @@ void TQtCurveStyle::polish(TQApplication *app)
|
|
|
|
|
if ("kicker"==appName || "appletproxy"==appName)
|
|
|
|
|
{
|
|
|
|
|
itsThemedApp=APP_KICKER;
|
|
|
|
|
#if defined TQTC_TQT_ONLY || !defined KDE_VERSION || KDE_VERSION >= 0x30200
|
|
|
|
|
#if defined TQTC_TQT_ONLY || !defined TDE_VERSION || TDE_VERSION >= 0x30200
|
|
|
|
|
itsIsTransKicker=kickerIsTrans();
|
|
|
|
|
#endif
|
|
|
|
|
}
|
|
|
|
@ -1196,7 +1196,7 @@ void TQtCurveStyle::polish(TQApplication *app)
|
|
|
|
|
else if ("korn"==appName)
|
|
|
|
|
{
|
|
|
|
|
itsThemedApp=APP_KORN;
|
|
|
|
|
#if defined TQTC_TQT_ONLY || !defined KDE_VERSION || KDE_VERSION >= 0x30200
|
|
|
|
|
#if defined TQTC_TQT_ONLY || !defined TDE_VERSION || TDE_VERSION >= 0x30200
|
|
|
|
|
itsIsTransKicker=kickerIsTrans();
|
|
|
|
|
#endif
|
|
|
|
|
}
|
|
|
|
@ -1567,7 +1567,7 @@ void TQtCurveStyle::polish(TQWidget *widget)
|
|
|
|
|
if(enableFilter)
|
|
|
|
|
{
|
|
|
|
|
widget->installEventFilter(this);
|
|
|
|
|
#if defined KDE_VERSION && KDE_VERSION >= 0x30400 && KDE_VERSION < 0x30500
|
|
|
|
|
#if defined TDE_VERSION && TDE_VERSION >= 0x30400 && TDE_VERSION < 0x30500
|
|
|
|
|
widget->setMouseTracking(true);
|
|
|
|
|
#endif
|
|
|
|
|
}
|
|
|
|
@ -1863,7 +1863,7 @@ void TQtCurveStyle::unPolish(TQWidget *widget)
|
|
|
|
|
if(NoBackground!=widget->backgroundMode()) // && onToolBar(widget))
|
|
|
|
|
widget->setBackgroundMode(PaletteButton);
|
|
|
|
|
widget->removeEventFilter(this);
|
|
|
|
|
#if defined KDE_VERSION && KDE_VERSION >= 0x30400 && KDE_VERSION < 0x30500
|
|
|
|
|
#if defined TDE_VERSION && TDE_VERSION >= 0x30400 && TDE_VERSION < 0x30500
|
|
|
|
|
widget->setMouseTracking(false);
|
|
|
|
|
#endif
|
|
|
|
|
}
|
|
|
|
@ -3149,8 +3149,8 @@ void TQtCurveStyle::tqdrawPrimitive(TQ_PrimitiveElement pe, TQPainter *p, const
|
|
|
|
|
if(flags&Style_Down)
|
|
|
|
|
flags=((flags|Style_Down)^Style_Down)| Style_Sunken;
|
|
|
|
|
flags|=Style_Enabled;
|
|
|
|
|
#if defined TQTC_TQT_ONLY || !defined KDE_VERSION || KDE_VERSION >= 0x30200
|
|
|
|
|
#if defined KDE_VERSION && KDE_VERSION >= 0x30400 && KDE_VERSION < 0x30500
|
|
|
|
|
#if defined TQTC_TQT_ONLY || !defined TDE_VERSION || TDE_VERSION >= 0x30200
|
|
|
|
|
#if defined TDE_VERSION && TDE_VERSION >= 0x30400 && TDE_VERSION < 0x30500
|
|
|
|
|
if(HOVER_KICKER==itsHover && itsHoverWidget) // && itsHoverWidget==p->device())
|
|
|
|
|
flags|=Style_MouseOver;
|
|
|
|
|
#endif
|
|
|
|
@ -3158,7 +3158,7 @@ void TQtCurveStyle::tqdrawPrimitive(TQ_PrimitiveElement pe, TQPainter *p, const
|
|
|
|
|
#endif
|
|
|
|
|
drawLightBevel(p, r, cg, flags|Style_Horizontal, ROUNDED_ALL,
|
|
|
|
|
getFill(flags, use), use, true, false);
|
|
|
|
|
#if defined TQTC_TQT_ONLY || !defined KDE_VERSION || KDE_VERSION >= 0x30200
|
|
|
|
|
#if defined TQTC_TQT_ONLY || !defined TDE_VERSION || TDE_VERSION >= 0x30200
|
|
|
|
|
itsFormMode=false;
|
|
|
|
|
#endif
|
|
|
|
|
}
|
|
|
|
@ -3310,7 +3310,7 @@ void TQtCurveStyle::tqdrawPrimitive(TQ_PrimitiveElement pe, TQPainter *p, const
|
|
|
|
|
? cg.background().dark(DW_BGND)
|
|
|
|
|
: */cg.background(),
|
|
|
|
|
p, r, cg, glassMod ? flags : flags|Style_Horizontal,
|
|
|
|
|
#if defined TQTC_TQT_ONLY || !defined KDE_VERSION || KDE_VERSION >= 0x30200
|
|
|
|
|
#if defined TQTC_TQT_ONLY || !defined TDE_VERSION || TDE_VERSION >= 0x30200
|
|
|
|
|
(APP_KORN==itsThemedApp && itsIsTransKicker && PE_ButtonTool==pe) ||
|
|
|
|
|
#endif
|
|
|
|
|
operaMdi || mdi
|
|
|
|
@ -3342,7 +3342,7 @@ void TQtCurveStyle::tqdrawPrimitive(TQ_PrimitiveElement pe, TQPainter *p, const
|
|
|
|
|
|
|
|
|
|
drawLightBevel(p, r, cg, glassMod ? flags : flags|Style_Horizontal,
|
|
|
|
|
flags&CHECK_BUTTON
|
|
|
|
|
#if defined TQTC_TQT_ONLY || !defined KDE_VERSION || KDE_VERSION >= 0x30200
|
|
|
|
|
#if defined TQTC_TQT_ONLY || !defined TDE_VERSION || TDE_VERSION >= 0x30200
|
|
|
|
|
|| (APP_KORN==itsThemedApp && itsIsTransKicker && PE_ButtonTool==pe)
|
|
|
|
|
#endif
|
|
|
|
|
? ROUNDED_NONE : ROUNDED_ALL,
|
|
|
|
@ -5537,7 +5537,7 @@ void TQtCurveStyle::tqdrawComplexControl(ComplexControl control, TQPainter *p, c
|
|
|
|
|
bflags|=NO_ETCH_BUTTON;
|
|
|
|
|
|
|
|
|
|
// If we're pressed, on, or raised...
|
|
|
|
|
#if defined TQTC_TQT_ONLY || !defined KDE_VERSION || KDE_VERSION >= 0x30200
|
|
|
|
|
#if defined TQTC_TQT_ONLY || !defined TDE_VERSION || TDE_VERSION >= 0x30200
|
|
|
|
|
if(bflags &(Style_Down | Style_On | Style_Raised) || onControlButtons)
|
|
|
|
|
#else
|
|
|
|
|
if(bflags &(Style_Down | Style_On | Style_Raised | Style_MouseOver) ||
|
|
|
|
@ -8217,7 +8217,7 @@ bool TQtCurveStyle::redrawHoverWidget(const TQPoint &pos)
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
#if defined KDE_VERSION && KDE_VERSION >= 0x30400 && KDE_VERSION < 0x30500
|
|
|
|
|
#if defined TDE_VERSION && TDE_VERSION >= 0x30400 && TDE_VERSION < 0x30500
|
|
|
|
|
TQToolButton *tb(::tqqt_cast<TQToolButton *>(itsHoverWidget));
|
|
|
|
|
|
|
|
|
|
if(tb)
|
|
|
|
|