|
|
|
@ -1154,8 +1154,11 @@ static TQString getFile(const TQString &f)
|
|
|
|
|
return d;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void TQtCurveStyle::polish(TQApplication *app)
|
|
|
|
|
void TQtCurveStyle::applicationPolish(TQStyleControlElementData ceData, ControlElementFlags elementFlags, void *ptr)
|
|
|
|
|
{
|
|
|
|
|
if (ceData.widgetObjectTypes.contains(TQAPPLICATION_OBJECT_NAME_STRING)) {
|
|
|
|
|
TQApplication *app = reinterpret_cast<TQApplication*>(ptr);
|
|
|
|
|
|
|
|
|
|
TQString appName(getFile(app->argv()[0]));
|
|
|
|
|
|
|
|
|
|
if(NULL!=getenv("QTCURVE_DEBUG"))
|
|
|
|
@ -1164,9 +1167,9 @@ void TQtCurveStyle::polish(TQApplication *app)
|
|
|
|
|
if ("kicker"==appName || "appletproxy"==appName)
|
|
|
|
|
{
|
|
|
|
|
itsThemedApp=APP_KICKER;
|
|
|
|
|
#if defined TQTC_TQT_ONLY || !defined TDE_VERSION || TDE_VERSION >= 0x30200
|
|
|
|
|
#if defined TQTC_TQT_ONLY || !defined TDE_VERSION || TDE_VERSION >= 0x30200
|
|
|
|
|
itsIsTransKicker=kickerIsTrans();
|
|
|
|
|
#endif
|
|
|
|
|
#endif
|
|
|
|
|
}
|
|
|
|
|
else if ("kontact"==appName)
|
|
|
|
|
itsThemedApp=APP_KONTACT;
|
|
|
|
@ -1199,9 +1202,9 @@ void TQtCurveStyle::polish(TQApplication *app)
|
|
|
|
|
else if ("korn"==appName)
|
|
|
|
|
{
|
|
|
|
|
itsThemedApp=APP_KORN;
|
|
|
|
|
#if defined TQTC_TQT_ONLY || !defined TDE_VERSION || TDE_VERSION >= 0x30200
|
|
|
|
|
#if defined TQTC_TQT_ONLY || !defined TDE_VERSION || TDE_VERSION >= 0x30200
|
|
|
|
|
itsIsTransKicker=kickerIsTrans();
|
|
|
|
|
#endif
|
|
|
|
|
#endif
|
|
|
|
|
}
|
|
|
|
|
else if ("mactor"==appName)
|
|
|
|
|
{
|
|
|
|
@ -1223,11 +1226,11 @@ void TQtCurveStyle::polish(TQApplication *app)
|
|
|
|
|
{
|
|
|
|
|
TQMetaObject *meta=(TQMetaObject *)metaObject();
|
|
|
|
|
|
|
|
|
|
#ifdef USE_QT4
|
|
|
|
|
#warning Qt4 does not allow the metaobject classname to be set (skipping)
|
|
|
|
|
#else // USE_QT4
|
|
|
|
|
#ifdef USE_QT4
|
|
|
|
|
#warning Qt4 does not allow the metaobject classname to be set (skipping)
|
|
|
|
|
#else // USE_QT4
|
|
|
|
|
meta->classname="HighContrastStyle";
|
|
|
|
|
#endif // USE_QT4
|
|
|
|
|
#endif // USE_QT4
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(opts.scrollbarType==SCROLLBAR_NEXT)
|
|
|
|
@ -1239,10 +1242,11 @@ void TQtCurveStyle::polish(TQApplication *app)
|
|
|
|
|
|
|
|
|
|
if(SHADE_NONE!=opts.menuStripe && opts.noMenuStripeApps.contains(appName))
|
|
|
|
|
opts.menuStripe=SHADE_NONE;
|
|
|
|
|
#ifdef TQTC_ENABLE_PARENTLESS_DIALOG_FIX_SUPPORT
|
|
|
|
|
#ifdef TQTC_ENABLE_PARENTLESS_DIALOG_FIX_SUPPORT
|
|
|
|
|
if(opts.fixParentlessDialogs && (opts.noDlgFixApps.contains(appName) || opts.noDlgFixApps.contains("kde")))
|
|
|
|
|
opts.fixParentlessDialogs=false;
|
|
|
|
|
#endif
|
|
|
|
|
#endif
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void TQtCurveStyle::polish(TQPalette &pal)
|
|
|
|
@ -1458,8 +1462,11 @@ TQColorGroup TQtCurveStyle::setColorGroup(const TQColorGroup &old, const TQColor
|
|
|
|
|
|
|
|
|
|
static const char * kdeToolbarWidget="kde toolbar widget";
|
|
|
|
|
|
|
|
|
|
void TQtCurveStyle::polish(TQWidget *widget)
|
|
|
|
|
void TQtCurveStyle::polish(TQStyleControlElementData ceData, ControlElementFlags elementFlags, void *ptr)
|
|
|
|
|
{
|
|
|
|
|
if (ceData.widgetObjectTypes.contains(TQWIDGET_OBJECT_NAME_STRING)) {
|
|
|
|
|
TQWidget *widget = reinterpret_cast<TQWidget*>(ptr);
|
|
|
|
|
|
|
|
|
|
bool enableFilter(opts.highlightFactor || opts.coloredMouseOver);
|
|
|
|
|
|
|
|
|
|
if(::isKhtmlFormWidget(widget))
|
|
|
|
@ -1472,7 +1479,7 @@ void TQtCurveStyle::polish(TQWidget *widget)
|
|
|
|
|
connect(widget, TQT_SIGNAL(destroyed(TQObject *)), this, TQT_SLOT(hoverWidgetDestroyed(TQObject *)));
|
|
|
|
|
|
|
|
|
|
if(isWindowDragWidget(TQT_TQOBJECT(widget)))
|
|
|
|
|
widget->installEventFilter(this);
|
|
|
|
|
installObjectEventHandler(ceData, elementFlags, ptr, this);
|
|
|
|
|
|
|
|
|
|
if(APPEARANCE_STRIPED==opts.bgndAppearance && (::tqqt_cast<TQDialog *>(widget) || ::tqqt_cast<TQMainWindow *>(widget)))
|
|
|
|
|
setBgndProp(widget, APPEARANCE_STRIPED);
|
|
|
|
@ -1480,23 +1487,23 @@ void TQtCurveStyle::polish(TQWidget *widget)
|
|
|
|
|
if(widget->parentWidget() && ::tqqt_cast<TQScrollView *>(widget) && ::tqqt_cast<TQComboBox *>(widget->parentWidget()))
|
|
|
|
|
{
|
|
|
|
|
TQPalette pal(widget->palette());
|
|
|
|
|
#if 0
|
|
|
|
|
#if 0
|
|
|
|
|
TQPalette orig(pal);
|
|
|
|
|
#endif
|
|
|
|
|
#endif
|
|
|
|
|
TQColorGroup act(pal.active());
|
|
|
|
|
|
|
|
|
|
#if 0
|
|
|
|
|
#if 0
|
|
|
|
|
if(opts.gtkComboMenus)
|
|
|
|
|
act.setColor(TQColorGroup::Base, USE_LIGHTER_POPUP_MENU ? itsLighterPopupMenuBgndCol : itsBackgroundCols[ORIGINAL_SHADE]);
|
|
|
|
|
act.setColor(TQColorGroup::Background, opts.gtkComboMenus
|
|
|
|
|
? USE_LIGHTER_POPUP_MENU ? itsLighterPopupMenuBgndCol : itsBackgroundCols[ORIGINAL_SHADE]
|
|
|
|
|
: TQApplication::palette().active().base());
|
|
|
|
|
#endif
|
|
|
|
|
#endif
|
|
|
|
|
act.setColor(TQColorGroup::Foreground, itsBackgroundCols[STD_BORDER]);
|
|
|
|
|
|
|
|
|
|
pal.setActive(act);
|
|
|
|
|
widget->setPalette(pal);
|
|
|
|
|
#if 0
|
|
|
|
|
#if 0
|
|
|
|
|
//((TQScrollView *)widget)->setMargin(1);
|
|
|
|
|
|
|
|
|
|
const TQObjectList *children(widget->children());
|
|
|
|
@ -1510,7 +1517,7 @@ void TQtCurveStyle::polish(TQWidget *widget)
|
|
|
|
|
if(::tqqt_cast<TQWidget *>(*it))
|
|
|
|
|
((TQWidget *)(*it))->setPalette(orig);
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
#endif
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (APP_MACTOR==itsThemedApp && itsMactorPal && !widget->inherits("TQTipLabel"))
|
|
|
|
@ -1522,11 +1529,11 @@ void TQtCurveStyle::polish(TQWidget *widget)
|
|
|
|
|
((TQHBox *)widget)->setLineWidth(0);
|
|
|
|
|
|
|
|
|
|
if(!IS_FLAT_BGND(opts.menuBgndAppearance) && ::tqqt_cast<const TQPopupMenu *>(widget))
|
|
|
|
|
widget->installEventFilter(this);
|
|
|
|
|
installObjectEventHandler(ceData, elementFlags, ptr, this);
|
|
|
|
|
|
|
|
|
|
#if 0
|
|
|
|
|
if(opts.menubarHiding && ::tqqt_cast<TQMainWindow *>(widget) && static_cast<TQMainWindow *>(widget)->menuBar())
|
|
|
|
|
widget->installEventFilter(this);
|
|
|
|
|
installObjectEventHandler(ceData, elementFlags, ptr, this);
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
if ((opts.square&SQUARE_SCROLLVIEW) && widget &&
|
|
|
|
@ -1550,10 +1557,10 @@ void TQtCurveStyle::polish(TQWidget *widget)
|
|
|
|
|
|
|
|
|
|
if(framelessGroupBoxCheckBox || enableFilter)
|
|
|
|
|
{
|
|
|
|
|
#if 0x039999 >= 0x030200
|
|
|
|
|
#if 0x039999 >= 0x030200
|
|
|
|
|
if(!isFormWidget(widget))
|
|
|
|
|
widget->setMouseTracking(true);
|
|
|
|
|
#endif
|
|
|
|
|
#endif
|
|
|
|
|
if(framelessGroupBoxCheckBox)
|
|
|
|
|
{
|
|
|
|
|
TQFont fnt(widget->font());
|
|
|
|
@ -1561,7 +1568,7 @@ void TQtCurveStyle::polish(TQWidget *widget)
|
|
|
|
|
fnt.setBold(true);
|
|
|
|
|
widget->setFont(fnt);
|
|
|
|
|
}
|
|
|
|
|
widget->installEventFilter(this);
|
|
|
|
|
installObjectEventHandler(ceData, elementFlags, ptr, this);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else if (::tqqt_cast<TQHeader *>(widget) || ::tqqt_cast<TQTabBar *>(widget) || ::tqqt_cast<TQSpinWidget *>(widget)/* ||
|
|
|
|
@ -1570,7 +1577,7 @@ void TQtCurveStyle::polish(TQWidget *widget)
|
|
|
|
|
if(enableFilter)
|
|
|
|
|
{
|
|
|
|
|
widget->setMouseTracking(true);
|
|
|
|
|
widget->installEventFilter(this);
|
|
|
|
|
installObjectEventHandler(ceData, elementFlags, ptr, this);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else if (::tqqt_cast<TQToolButton *>(widget))
|
|
|
|
@ -1579,10 +1586,10 @@ void TQtCurveStyle::polish(TQWidget *widget)
|
|
|
|
|
widget->setBackgroundMode(PaletteBackground);
|
|
|
|
|
if(enableFilter)
|
|
|
|
|
{
|
|
|
|
|
widget->installEventFilter(this);
|
|
|
|
|
#if defined TDE_VERSION && TDE_VERSION >= 0x30400 && TDE_VERSION < 0x30500
|
|
|
|
|
installObjectEventHandler(ceData, elementFlags, ptr, this);
|
|
|
|
|
#if defined TDE_VERSION && TDE_VERSION >= 0x30400 && TDE_VERSION < 0x30500
|
|
|
|
|
widget->setMouseTracking(true);
|
|
|
|
|
#endif
|
|
|
|
|
#endif
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else if (::tqqt_cast<TQButton *>(widget) || widget->inherits("TQToolBarExtensionWidget"))
|
|
|
|
@ -1592,13 +1599,13 @@ void TQtCurveStyle::polish(TQWidget *widget)
|
|
|
|
|
else*/ if(NoBackground!=widget->backgroundMode()) // && onToolBar(widget))
|
|
|
|
|
widget->setBackgroundMode(PaletteBackground);
|
|
|
|
|
if(enableFilter)
|
|
|
|
|
widget->installEventFilter(this);
|
|
|
|
|
installObjectEventHandler(ceData, elementFlags, ptr, this);
|
|
|
|
|
}
|
|
|
|
|
else if (::tqqt_cast<TQComboBox *>(widget))
|
|
|
|
|
{
|
|
|
|
|
if(NoBackground!=widget->backgroundMode()) // && onToolBar(widget))
|
|
|
|
|
widget->setBackgroundMode(PaletteBackground);
|
|
|
|
|
widget->installEventFilter(this);
|
|
|
|
|
installObjectEventHandler(ceData, elementFlags, ptr, this);
|
|
|
|
|
|
|
|
|
|
if(DO_EFFECT && onToolBar(widget))
|
|
|
|
|
widget->setName(kdeToolbarWidget);
|
|
|
|
@ -1608,13 +1615,15 @@ void TQtCurveStyle::polish(TQWidget *widget)
|
|
|
|
|
|
|
|
|
|
if(((TQComboBox *)widget)->listBox())
|
|
|
|
|
((TQComboBox *)widget)->listBox()->installEventFilter(this);
|
|
|
|
|
// FIXME
|
|
|
|
|
// installObjectEventHandler(ceData, elementFlags, ptr, this);
|
|
|
|
|
}
|
|
|
|
|
else if(::tqqt_cast<TQMenuBar *>(widget))
|
|
|
|
|
{
|
|
|
|
|
if(NoBackground!=widget->backgroundMode())
|
|
|
|
|
widget->setBackgroundMode(PaletteBackground);
|
|
|
|
|
if(SHADE_NONE!=opts.shadeMenubars)
|
|
|
|
|
widget->installEventFilter(this);
|
|
|
|
|
installObjectEventHandler(ceData, elementFlags, ptr, this);
|
|
|
|
|
if(BLEND_TITLEBAR || opts.windowBorder&WINDOW_BORDER_USE_MENUBAR_COLOR_FOR_TITLEBAR)
|
|
|
|
|
emitMenuSize(widget, widget->rect().height());
|
|
|
|
|
if(SHADE_WINDOW_BORDER==opts.shadeMenubars)
|
|
|
|
@ -1664,28 +1673,28 @@ void TQtCurveStyle::polish(TQWidget *widget)
|
|
|
|
|
{
|
|
|
|
|
widget->setName(kdeToolbarWidget);
|
|
|
|
|
widget->setBackgroundMode(NoBackground);
|
|
|
|
|
widget->installEventFilter(this);
|
|
|
|
|
installObjectEventHandler(ceData, elementFlags, ptr, this);
|
|
|
|
|
}
|
|
|
|
|
else if (::tqqt_cast<TQScrollBar *>(widget))
|
|
|
|
|
{
|
|
|
|
|
if(enableFilter)
|
|
|
|
|
{
|
|
|
|
|
widget->setMouseTracking(true);
|
|
|
|
|
widget->installEventFilter(this);
|
|
|
|
|
installObjectEventHandler(ceData, elementFlags, ptr, this);
|
|
|
|
|
}
|
|
|
|
|
//widget->setBackgroundMode(NoBackground);
|
|
|
|
|
}
|
|
|
|
|
else if (::tqqt_cast<TQSlider *>(widget))
|
|
|
|
|
{
|
|
|
|
|
if(enableFilter)
|
|
|
|
|
widget->installEventFilter(this);
|
|
|
|
|
installObjectEventHandler(ceData, elementFlags, ptr, this);
|
|
|
|
|
if(widget->parent() && ::tqqt_cast<TQToolBar *>(widget->parent()))
|
|
|
|
|
{
|
|
|
|
|
widget->setName(kdeToolbarWidget);
|
|
|
|
|
widget->setBackgroundMode(NoBackground); // We paint whole background.
|
|
|
|
|
|
|
|
|
|
if(!enableFilter)
|
|
|
|
|
widget->installEventFilter(this);
|
|
|
|
|
installObjectEventHandler(ceData, elementFlags, ptr, this);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// This bit stolen form polyester...
|
|
|
|
@ -1694,7 +1703,7 @@ void TQtCurveStyle::polish(TQWidget *widget)
|
|
|
|
|
}
|
|
|
|
|
else if (::tqqt_cast<TQLineEdit*>(widget) || ::tqqt_cast<TQTextEdit*>(widget))
|
|
|
|
|
{
|
|
|
|
|
widget->installEventFilter(this);
|
|
|
|
|
installObjectEventHandler(ceData, elementFlags, ptr, this);
|
|
|
|
|
if(onToolBar(widget))
|
|
|
|
|
widget->setName(kdeToolbarWidget);
|
|
|
|
|
if(widget && widget->parentWidget() &&
|
|
|
|
@ -1705,7 +1714,7 @@ void TQtCurveStyle::polish(TQWidget *widget)
|
|
|
|
|
else if (widget->inherits(TQSPLITTERHANDLE_OBJECT_NAME_STRING) || widget->inherits(TQDOCKWINDOWHANDLE_OBJECT_NAME_STRING) || widget->inherits("TQDockWindowResizeHandle"))
|
|
|
|
|
{
|
|
|
|
|
if(enableFilter)
|
|
|
|
|
widget->installEventFilter(this);
|
|
|
|
|
installObjectEventHandler(ceData, elementFlags, ptr, this);
|
|
|
|
|
}
|
|
|
|
|
else if (0==qstrcmp(widget->name(), kdeToolbarWidget))
|
|
|
|
|
{
|
|
|
|
@ -1714,14 +1723,14 @@ void TQtCurveStyle::polish(TQWidget *widget)
|
|
|
|
|
"KListViewSearchLineWidget") ||
|
|
|
|
|
onToolBar(widget))
|
|
|
|
|
{
|
|
|
|
|
widget->installEventFilter(this);
|
|
|
|
|
installObjectEventHandler(ceData, elementFlags, ptr, this);
|
|
|
|
|
widget->setBackgroundMode(NoBackground); // We paint whole background.
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (widget->parentWidget() && ::tqqt_cast<TQMenuBar *>(widget->parentWidget()) && !qstrcmp(widget->className(), TQFRAME_OBJECT_NAME_STRING))
|
|
|
|
|
{
|
|
|
|
|
widget->installEventFilter(this);
|
|
|
|
|
installObjectEventHandler(ceData, elementFlags, ptr, this);
|
|
|
|
|
widget->setBackgroundMode(NoBackground); // We paint whole background.
|
|
|
|
|
}
|
|
|
|
|
else if (TQt::X11ParentRelative!=widget->backgroundMode() &&
|
|
|
|
@ -1732,7 +1741,7 @@ void TQtCurveStyle::polish(TQWidget *widget)
|
|
|
|
|
"MainWindow") || onToolBar(widget)))
|
|
|
|
|
{
|
|
|
|
|
widget->setName(kdeToolbarWidget);
|
|
|
|
|
widget->installEventFilter(this);
|
|
|
|
|
installObjectEventHandler(ceData, elementFlags, ptr, this);
|
|
|
|
|
widget->setBackgroundMode(NoBackground); // We paint the whole background.
|
|
|
|
|
}
|
|
|
|
|
else if(::tqqt_cast<TQProgressBar *>(widget))
|
|
|
|
@ -1746,7 +1755,7 @@ void TQtCurveStyle::polish(TQWidget *widget)
|
|
|
|
|
|
|
|
|
|
if(opts.animatedProgress)
|
|
|
|
|
{
|
|
|
|
|
widget->installEventFilter(this);
|
|
|
|
|
installObjectEventHandler(ceData, elementFlags, ptr, this);
|
|
|
|
|
itsProgAnimWidgets[widget] = 0;
|
|
|
|
|
connect(widget, TQT_SIGNAL(destroyed(TQObject *)), this, TQT_SLOT(progressBarDestroyed(TQObject *)));
|
|
|
|
|
if (!itsAnimationTimer->isActive())
|
|
|
|
@ -1754,7 +1763,7 @@ void TQtCurveStyle::polish(TQWidget *widget)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else if(opts.highlightScrollViews && ::tqqt_cast<TQScrollView*>(widget))
|
|
|
|
|
widget->installEventFilter(this);
|
|
|
|
|
installObjectEventHandler(ceData, elementFlags, ptr, this);
|
|
|
|
|
else if(!qstrcmp(widget->className(), "KonqFrameStatusBar"))
|
|
|
|
|
{
|
|
|
|
|
// This disables the white background of the KonquerorFrameStatusBar.
|
|
|
|
@ -1769,13 +1778,13 @@ void TQtCurveStyle::polish(TQWidget *widget)
|
|
|
|
|
TQApplication::setPalette(pal);
|
|
|
|
|
}
|
|
|
|
|
else if(widget->inherits("KTabCtl"))
|
|
|
|
|
widget->installEventFilter(this);
|
|
|
|
|
installObjectEventHandler(ceData, elementFlags, ptr, this);
|
|
|
|
|
else if(NO_FRAME(opts.groupBox) && ::tqqt_cast<TQGroupBox *>(widget))
|
|
|
|
|
{
|
|
|
|
|
((TQGroupBox *)widget)->setFlat(false);
|
|
|
|
|
((TQGroupBox *)widget)->setFrameShape(TQFrame::NoFrame);
|
|
|
|
|
}
|
|
|
|
|
#ifdef TQTC_ENABLE_PARENTLESS_DIALOG_FIX_SUPPORT
|
|
|
|
|
#ifdef TQTC_ENABLE_PARENTLESS_DIALOG_FIX_SUPPORT
|
|
|
|
|
else if(opts.fixParentlessDialogs && ::tqqt_cast<TQDialog *>(widget))
|
|
|
|
|
{
|
|
|
|
|
TQDialog *dlg=(TQDialog *)widget;
|
|
|
|
@ -1785,7 +1794,7 @@ void TQtCurveStyle::polish(TQWidget *widget)
|
|
|
|
|
if( (SKIP_TASKBAR && !dlg->parentWidget()) ||
|
|
|
|
|
( (!dlg->parentWidget() || !dlg->parentWidget()->isShown())// &&
|
|
|
|
|
/*(dlg->isModal() || ::tqqt_cast<TQProgressDialog *>(widget))*/) )
|
|
|
|
|
widget->installEventFilter(this);
|
|
|
|
|
installObjectEventHandler(ceData, elementFlags, ptr, this);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(opts.fixParentlessDialogs && (APP_KPRINTER==itsThemedApp || APP_KDIALOG==itsThemedApp ||
|
|
|
|
@ -1804,7 +1813,7 @@ void TQtCurveStyle::polish(TQWidget *widget)
|
|
|
|
|
(index+17)==(int)cap.length())) )
|
|
|
|
|
widget->TQWidget::setCaption(cap.left(index));
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
if(APP_SYSTEMSETTINGS==itsThemedApp)
|
|
|
|
|
{
|
|
|
|
@ -1833,61 +1842,68 @@ void TQtCurveStyle::polish(TQWidget *widget)
|
|
|
|
|
|
|
|
|
|
if(APPEARANCE_STRIPED==opts.bgndAppearance)
|
|
|
|
|
widget->setBackgroundOrigin(TQWidget::WindowOrigin);
|
|
|
|
|
BASE_STYLE::polish(widget);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
BASE_STYLE::polish(ceData, elementFlags, ptr);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void TQtCurveStyle::unPolish(TQWidget *widget)
|
|
|
|
|
void TQtCurveStyle::unPolish(TQStyleControlElementData ceData, ControlElementFlags elementFlags, void *ptr)
|
|
|
|
|
{
|
|
|
|
|
if (ceData.widgetObjectTypes.contains(TQWIDGET_OBJECT_NAME_STRING)) {
|
|
|
|
|
TQWidget *widget = reinterpret_cast<TQWidget*>(ptr);
|
|
|
|
|
|
|
|
|
|
if(isFormWidget(widget))
|
|
|
|
|
itsKhtmlWidgets.remove(widget);
|
|
|
|
|
|
|
|
|
|
if(!IS_FLAT_BGND(opts.menuBgndAppearance) && ::tqqt_cast<const TQPopupMenu *>(widget))
|
|
|
|
|
widget->removeEventFilter(this);
|
|
|
|
|
removeObjectEventHandler(ceData, elementFlags, ptr, this);
|
|
|
|
|
|
|
|
|
|
#if 0
|
|
|
|
|
if(opts.menubarHiding && ::tqqt_cast<TQMainWindow *>(widget) && static_cast<TQMainWindow *>(widget)->menuBar())
|
|
|
|
|
widget->removeEventFilter(this);
|
|
|
|
|
removeObjectEventHandler(ceData, elementFlags, ptr, this);
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
if(isWindowDragWidget(TQT_TQOBJECT(widget)))
|
|
|
|
|
widget->removeEventFilter(this);
|
|
|
|
|
removeObjectEventHandler(ceData, elementFlags, ptr, this);
|
|
|
|
|
|
|
|
|
|
if (::tqqt_cast<TQRadioButton *>(widget) || ::tqqt_cast<TQCheckBox *>(widget))
|
|
|
|
|
{
|
|
|
|
|
#if 0x039999 >= 0x030200
|
|
|
|
|
#if 0x039999 >= 0x030200
|
|
|
|
|
widget->setMouseTracking(false);
|
|
|
|
|
#endif
|
|
|
|
|
widget->removeEventFilter(this);
|
|
|
|
|
#endif
|
|
|
|
|
removeObjectEventHandler(ceData, elementFlags, ptr, this);
|
|
|
|
|
}
|
|
|
|
|
else if (::tqqt_cast<TQHeader *>(widget) || ::tqqt_cast<TQTabBar *>(widget) || ::tqqt_cast<TQSpinWidget *>(widget) /*||
|
|
|
|
|
::tqqt_cast<TQDateTimeEditBase*>(widget)*/)
|
|
|
|
|
{
|
|
|
|
|
widget->setMouseTracking(false);
|
|
|
|
|
widget->removeEventFilter(this);
|
|
|
|
|
removeObjectEventHandler(ceData, elementFlags, ptr, this);
|
|
|
|
|
}
|
|
|
|
|
else if (::tqqt_cast<TQButton *>(widget) || widget->inherits("TQToolBarExtensionWidget"))
|
|
|
|
|
{
|
|
|
|
|
if(NoBackground!=widget->backgroundMode()) // && onToolBar(widget))
|
|
|
|
|
widget->setBackgroundMode(PaletteButton);
|
|
|
|
|
widget->removeEventFilter(this);
|
|
|
|
|
removeObjectEventHandler(ceData, elementFlags, ptr, this);
|
|
|
|
|
}
|
|
|
|
|
else if (::tqqt_cast<TQToolButton *>(widget))
|
|
|
|
|
{
|
|
|
|
|
if(NoBackground!=widget->backgroundMode()) // && onToolBar(widget))
|
|
|
|
|
widget->setBackgroundMode(PaletteButton);
|
|
|
|
|
widget->removeEventFilter(this);
|
|
|
|
|
#if defined TDE_VERSION && TDE_VERSION >= 0x30400 && TDE_VERSION < 0x30500
|
|
|
|
|
removeObjectEventHandler(ceData, elementFlags, ptr, this);
|
|
|
|
|
#if defined TDE_VERSION && TDE_VERSION >= 0x30400 && TDE_VERSION < 0x30500
|
|
|
|
|
widget->setMouseTracking(false);
|
|
|
|
|
#endif
|
|
|
|
|
#endif
|
|
|
|
|
}
|
|
|
|
|
else if (::tqqt_cast<TQComboBox *>(widget))
|
|
|
|
|
{
|
|
|
|
|
if(NoBackground!=widget->backgroundMode()) // && onToolBar(widget))
|
|
|
|
|
widget->setBackgroundMode(PaletteButton);
|
|
|
|
|
widget->removeEventFilter(this);
|
|
|
|
|
removeObjectEventHandler(ceData, elementFlags, ptr, this);
|
|
|
|
|
widget->setMouseTracking(false);
|
|
|
|
|
if(((TQComboBox *)widget)->listBox())
|
|
|
|
|
((TQComboBox *)widget)->listBox()->removeEventFilter(this);
|
|
|
|
|
// FIXME
|
|
|
|
|
// removeObjectEventHandler(ceData, elementFlags, ptr, this);
|
|
|
|
|
}
|
|
|
|
|
else if (::tqqt_cast<TQToolBar *>(widget) || ::tqqt_cast<TQPopupMenu *>(widget))
|
|
|
|
|
{
|
|
|
|
@ -1899,7 +1915,7 @@ void TQtCurveStyle::unPolish(TQWidget *widget)
|
|
|
|
|
if(NoBackground!=widget->backgroundMode())
|
|
|
|
|
widget->setBackgroundMode(PaletteBackground);
|
|
|
|
|
if(SHADE_NONE!=opts.shadeMenubars)
|
|
|
|
|
widget->removeEventFilter(this);
|
|
|
|
|
removeObjectEventHandler(ceData, elementFlags, ptr, this);
|
|
|
|
|
if(SHADE_WINDOW_BORDER==opts.shadeMenubars || opts.customMenuTextColor || SHADE_BLEND_SELECTED==opts.shadeMenubars ||
|
|
|
|
|
SHADE_SELECTED==opts.shadeMenubars || (SHADE_CUSTOM==opts.shadeMenubars &&TOO_DARK(itsMenubarCols[ORIGINAL_SHADE])))
|
|
|
|
|
widget->setPalette(TQApplication::palette());
|
|
|
|
@ -1907,49 +1923,50 @@ void TQtCurveStyle::unPolish(TQWidget *widget)
|
|
|
|
|
else if (widget->inherits("KToolBarSeparator"))
|
|
|
|
|
{
|
|
|
|
|
widget->setBackgroundMode(PaletteBackground);
|
|
|
|
|
widget->removeEventFilter(this);
|
|
|
|
|
removeObjectEventHandler(ceData, elementFlags, ptr, this);
|
|
|
|
|
}
|
|
|
|
|
else if (::tqqt_cast<TQScrollBar *>(widget))
|
|
|
|
|
{
|
|
|
|
|
widget->setMouseTracking(false);
|
|
|
|
|
widget->removeEventFilter(this);
|
|
|
|
|
removeObjectEventHandler(ceData, elementFlags, ptr, this);
|
|
|
|
|
widget->setBackgroundMode(PaletteButton);
|
|
|
|
|
}
|
|
|
|
|
else if (::tqqt_cast<TQSlider *>(widget))
|
|
|
|
|
{
|
|
|
|
|
widget->removeEventFilter(this);
|
|
|
|
|
removeObjectEventHandler(ceData, elementFlags, ptr, this);
|
|
|
|
|
if(widget->parent() && ::tqqt_cast<TQToolBar *>(widget->parent()))
|
|
|
|
|
widget->setBackgroundMode(PaletteBackground);
|
|
|
|
|
}
|
|
|
|
|
else if (::tqqt_cast<TQLineEdit*>(widget) || ::tqqt_cast<TQTextEdit*>(widget))
|
|
|
|
|
widget->removeEventFilter(this);
|
|
|
|
|
removeObjectEventHandler(ceData, elementFlags, ptr, this);
|
|
|
|
|
else if (widget->inherits(TQSPLITTERHANDLE_OBJECT_NAME_STRING) || widget->inherits(TQDOCKWINDOWHANDLE_OBJECT_NAME_STRING) || widget->inherits("TQDockWindowResizeHandle"))
|
|
|
|
|
widget->removeEventFilter(this);
|
|
|
|
|
removeObjectEventHandler(ceData, elementFlags, ptr, this);
|
|
|
|
|
else if (::tqqt_cast<TQProgressBar*>(widget))
|
|
|
|
|
{
|
|
|
|
|
itsProgAnimWidgets.remove(widget);
|
|
|
|
|
widget->removeEventFilter(this);
|
|
|
|
|
removeObjectEventHandler(ceData, elementFlags, ptr, this);
|
|
|
|
|
}
|
|
|
|
|
else if(opts.highlightScrollViews && ::tqqt_cast<TQScrollView*>(widget))
|
|
|
|
|
widget->removeEventFilter(this);
|
|
|
|
|
removeObjectEventHandler(ceData, elementFlags, ptr, this);
|
|
|
|
|
else if(0==qstrcmp(widget->name(), kdeToolbarWidget))
|
|
|
|
|
{
|
|
|
|
|
widget->removeEventFilter(this);
|
|
|
|
|
removeObjectEventHandler(ceData, elementFlags, ptr, this);
|
|
|
|
|
widget->setBackgroundMode(PaletteBackground);
|
|
|
|
|
}
|
|
|
|
|
if (widget->parentWidget() && ::tqqt_cast<TQMenuBar *>(widget->parentWidget()) && !qstrcmp(widget->className(), TQFRAME_OBJECT_NAME_STRING))
|
|
|
|
|
{
|
|
|
|
|
widget->removeEventFilter(this);
|
|
|
|
|
removeObjectEventHandler(ceData, elementFlags, ptr, this);
|
|
|
|
|
widget->setBackgroundMode(PaletteBackground); // We paint whole background.
|
|
|
|
|
}
|
|
|
|
|
else if(widget->inherits("KTabCtl"))
|
|
|
|
|
widget->removeEventFilter(this);
|
|
|
|
|
#ifdef TQTC_ENABLE_PARENTLESS_DIALOG_FIX_SUPPORT
|
|
|
|
|
removeObjectEventHandler(ceData, elementFlags, ptr, this);
|
|
|
|
|
#ifdef TQTC_ENABLE_PARENTLESS_DIALOG_FIX_SUPPORT
|
|
|
|
|
else if(opts.fixParentlessDialogs && ::tqqt_cast<TQDialog *>(widget))
|
|
|
|
|
widget->removeEventFilter(this);
|
|
|
|
|
#endif
|
|
|
|
|
removeObjectEventHandler(ceData, elementFlags, ptr, this);
|
|
|
|
|
#endif
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
BASE_STYLE::unPolish(widget);
|
|
|
|
|
BASE_STYLE::unPolish(ceData, elementFlags, ptr);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void sendXEvent(TQDialog *dlg, const char *msg)
|
|
|
|
@ -1987,8 +2004,11 @@ bool TQtCurveStyle::appIsNotEmbedded(TQDialog *dlg)
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool TQtCurveStyle::eventFilter(TQObject *object, TQEvent *event)
|
|
|
|
|
bool TQtCurveStyle::objectEventHandler( TQStyleControlElementData ceData, ControlElementFlags elementFlags, void* source, TQEvent *event )
|
|
|
|
|
{
|
|
|
|
|
if (ceData.widgetObjectTypes.contains(TQOBJECT_OBJECT_NAME_STRING)) {
|
|
|
|
|
TQObject* object = reinterpret_cast<TQObject*>(source);
|
|
|
|
|
|
|
|
|
|
if(itsHoverWidget && TQT_BASE_OBJECT(object)==TQT_BASE_OBJECT(itsHoverWidget) && (TQEvent::Destroy==event->type() || TQEvent::Hide==event->type()))
|
|
|
|
|
resetHover();
|
|
|
|
|
|
|
|
|
@ -2063,13 +2083,13 @@ bool TQtCurveStyle::eventFilter(TQObject *object, TQEvent *event)
|
|
|
|
|
TQCheckBox *cb=static_cast<TQCheckBox *>(TQT_TQWIDGET(object));
|
|
|
|
|
TQRect r(cb->geometry());
|
|
|
|
|
|
|
|
|
|
cb->removeEventFilter(this);
|
|
|
|
|
removeObjectEventHandler(ceData, elementFlags, source, this);
|
|
|
|
|
if(TQApplication::reverseLayout())
|
|
|
|
|
r.setWidth(r.width()+8);
|
|
|
|
|
else
|
|
|
|
|
r.setX(0);
|
|
|
|
|
cb->setGeometry(r);
|
|
|
|
|
cb->installEventFilter(this);
|
|
|
|
|
installObjectEventHandler(ceData, elementFlags, source, this);
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
else if (TQEvent::Paint==event->type())
|
|
|
|
@ -2293,7 +2313,7 @@ bool TQtCurveStyle::eventFilter(TQObject *object, TQEvent *event)
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#ifdef TQTC_ENABLE_PARENTLESS_DIALOG_FIX_SUPPORT
|
|
|
|
|
#ifdef TQTC_ENABLE_PARENTLESS_DIALOG_FIX_SUPPORT
|
|
|
|
|
if(opts.fixParentlessDialogs && ::tqqt_cast<TQDialog *>(object))
|
|
|
|
|
{
|
|
|
|
|
TQDialog *dlg=(TQDialog *)object;
|
|
|
|
@ -2366,7 +2386,7 @@ bool TQtCurveStyle::eventFilter(TQObject *object, TQEvent *event)
|
|
|
|
|
}
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
// Track show events for progress bars
|
|
|
|
|
if (opts.animatedProgress && ::tqqt_cast<TQProgressBar*>(object))
|
|
|
|
@ -2389,10 +2409,10 @@ bool TQtCurveStyle::eventFilter(TQObject *object, TQEvent *event)
|
|
|
|
|
(((TQListBox *)object)->parentWidget() &&
|
|
|
|
|
::tqqt_cast<TQComboBox *>(((TQListBox *)object)->parentWidget())))
|
|
|
|
|
((TQComboBox *)(((TQListBox *)object)->parentWidget()))->repaint(false);
|
|
|
|
|
// else if(::tqqt_cast<TQFrame *>(object) &&
|
|
|
|
|
// (TQFrame::Box==((TQFrame *)object)->frameShape() || TQFrame::Panel==((TQFrame *)object)->frameShape() ||
|
|
|
|
|
// TQFrame::WinPanel==((TQFrame *)object)->frameShape()))
|
|
|
|
|
// ((TQFrame *)object)->setFrameShape(TQFrame::StyledPanel);
|
|
|
|
|
// else if(::tqqt_cast<TQFrame *>(object) &&
|
|
|
|
|
// (TQFrame::Box==((TQFrame *)object)->frameShape() || TQFrame::Panel==((TQFrame *)object)->frameShape() ||
|
|
|
|
|
// TQFrame::WinPanel==((TQFrame *)object)->frameShape()))
|
|
|
|
|
// ((TQFrame *)object)->setFrameShape(TQFrame::StyledPanel);
|
|
|
|
|
break;
|
|
|
|
|
case TQEvent::Enter:
|
|
|
|
|
if(object->isWidgetType())
|
|
|
|
@ -2442,8 +2462,9 @@ bool TQtCurveStyle::eventFilter(TQObject *object, TQEvent *event)
|
|
|
|
|
default:
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return BASE_STYLE::eventFilter(object, event);
|
|
|
|
|
return BASE_STYLE::objectEventHandler(ceData, elementFlags, source, event);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void TQtCurveStyle::drawLightBevel(const TQColor &bgnd, TQPainter *p, const TQRect &rOrig,
|
|
|
|
|