|
|
@ -277,7 +277,7 @@ LipstikStyle::~LipstikStyle()
|
|
|
|
|
|
|
|
|
|
|
|
void LipstikStyle::applicationPolish(const TQStyleControlElementData &ceData, ControlElementFlags, void *ptr)
|
|
|
|
void LipstikStyle::applicationPolish(const TQStyleControlElementData &ceData, ControlElementFlags, void *ptr)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (ceData.widgetObjectTypes.contains(TQAPPLICATION_OBJECT_NAME_STRING)) {
|
|
|
|
if (ceData.widgetObjectTypes.contains("TQApplication")) {
|
|
|
|
TQApplication *app = reinterpret_cast<TQApplication*>(ptr);
|
|
|
|
TQApplication *app = reinterpret_cast<TQApplication*>(ptr);
|
|
|
|
if (!qstrcmp(app->argv()[0], "kicker"))
|
|
|
|
if (!qstrcmp(app->argv()[0], "kicker"))
|
|
|
|
kickerMode = true;
|
|
|
|
kickerMode = true;
|
|
|
@ -288,7 +288,7 @@ void LipstikStyle::applicationPolish(const TQStyleControlElementData &ceData, Co
|
|
|
|
|
|
|
|
|
|
|
|
void LipstikStyle::polish(const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void *ptr)
|
|
|
|
void LipstikStyle::polish(const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void *ptr)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (ceData.widgetObjectTypes.contains(TQWIDGET_OBJECT_NAME_STRING)) {
|
|
|
|
if (ceData.widgetObjectTypes.contains("TQWidget")) {
|
|
|
|
TQWidget *widget = reinterpret_cast<TQWidget*>(ptr);
|
|
|
|
TQWidget *widget = reinterpret_cast<TQWidget*>(ptr);
|
|
|
|
|
|
|
|
|
|
|
|
if( !strcmp(widget->name(), "__tdehtml") ) { // is it a tdehtml widget...?
|
|
|
|
if( !strcmp(widget->name(), "__tdehtml") ) { // is it a tdehtml widget...?
|
|
|
@ -313,7 +313,7 @@ void LipstikStyle::polish(const TQStyleControlElementData &ceData, ControlElemen
|
|
|
|
} else if(::tqqt_cast<TQScrollBar*>(widget)) {
|
|
|
|
} else if(::tqqt_cast<TQScrollBar*>(widget)) {
|
|
|
|
widget->setMouseTracking(true);
|
|
|
|
widget->setMouseTracking(true);
|
|
|
|
installObjectEventHandler(ceData, elementFlags, ptr, this);
|
|
|
|
installObjectEventHandler(ceData, elementFlags, ptr, this);
|
|
|
|
} else if (widget->inherits(TQSPLITTERHANDLE_OBJECT_NAME_STRING) || widget->inherits(TQDOCKWINDOWHANDLE_OBJECT_NAME_STRING) ) {
|
|
|
|
} else if (widget->inherits("TQSplitterHandle") || widget->inherits("TQDockWindowHandle") ) {
|
|
|
|
installObjectEventHandler(ceData, elementFlags, ptr, this);
|
|
|
|
installObjectEventHandler(ceData, elementFlags, ptr, this);
|
|
|
|
} else if (::tqqt_cast<TQLineEdit*>(widget)) {
|
|
|
|
} else if (::tqqt_cast<TQLineEdit*>(widget)) {
|
|
|
|
installObjectEventHandler(ceData, elementFlags, ptr, this);
|
|
|
|
installObjectEventHandler(ceData, elementFlags, ptr, this);
|
|
|
@ -345,7 +345,7 @@ void LipstikStyle::polish(const TQStyleControlElementData &ceData, ControlElemen
|
|
|
|
|
|
|
|
|
|
|
|
void LipstikStyle::unPolish(const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void *ptr)
|
|
|
|
void LipstikStyle::unPolish(const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void *ptr)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (ceData.widgetObjectTypes.contains(TQWIDGET_OBJECT_NAME_STRING)) {
|
|
|
|
if (ceData.widgetObjectTypes.contains("TQWidget")) {
|
|
|
|
TQWidget *widget = reinterpret_cast<TQWidget*>(ptr);
|
|
|
|
TQWidget *widget = reinterpret_cast<TQWidget*>(ptr);
|
|
|
|
|
|
|
|
|
|
|
|
if( !strcmp(widget->name(), "__tdehtml") ) { // is it a tdehtml widget...?
|
|
|
|
if( !strcmp(widget->name(), "__tdehtml") ) { // is it a tdehtml widget...?
|
|
|
@ -357,7 +357,7 @@ void LipstikStyle::unPolish(const TQStyleControlElementData &ceData, ControlElem
|
|
|
|
::tqqt_cast<TQSpinWidget*>(widget) || ::tqqt_cast<TQSlider*>(widget) ||
|
|
|
|
::tqqt_cast<TQSpinWidget*>(widget) || ::tqqt_cast<TQSlider*>(widget) ||
|
|
|
|
::tqqt_cast<TQCheckBox*>(widget) || ::tqqt_cast<TQRadioButton*>(widget) ||
|
|
|
|
::tqqt_cast<TQCheckBox*>(widget) || ::tqqt_cast<TQRadioButton*>(widget) ||
|
|
|
|
::tqqt_cast<TQToolButton*>(widget) || ::tqqt_cast<TQLineEdit*>(widget) ||
|
|
|
|
::tqqt_cast<TQToolButton*>(widget) || ::tqqt_cast<TQLineEdit*>(widget) ||
|
|
|
|
widget->inherits(TQSPLITTERHANDLE_OBJECT_NAME_STRING) )
|
|
|
|
widget->inherits("TQSplitterHandle") )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
removeObjectEventHandler(ceData, elementFlags, ptr, this);
|
|
|
|
removeObjectEventHandler(ceData, elementFlags, ptr, this);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -3409,7 +3409,7 @@ void LipstikStyle::drawComplexControl(ComplexControl control,
|
|
|
|
// Tricky... (I'm lucky TQtCurve has already gone there... thanks Craig!)
|
|
|
|
// Tricky... (I'm lucky TQtCurve has already gone there... thanks Craig!)
|
|
|
|
if (_drawToolBarGradient) {
|
|
|
|
if (_drawToolBarGradient) {
|
|
|
|
bool horizontal=false;
|
|
|
|
bool horizontal=false;
|
|
|
|
if ( ceData.parentWidgetData.widgetObjectTypes.contains(TQTOOLBAR_OBJECT_NAME_STRING) ) {
|
|
|
|
if ( ceData.parentWidgetData.widgetObjectTypes.contains("TQToolBar") ) {
|
|
|
|
if ( TQt::Horizontal==ceData.toolBarData.orientation ) {
|
|
|
|
if ( TQt::Horizontal==ceData.toolBarData.orientation ) {
|
|
|
|
horizontal=true;
|
|
|
|
horizontal=true;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -3925,7 +3925,7 @@ TQSize LipstikStyle::sizeFromContents(ContentsType t,
|
|
|
|
|
|
|
|
|
|
|
|
case CT_ToolButton:
|
|
|
|
case CT_ToolButton:
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (ceData.parentWidgetData.widgetObjectTypes.contains(TQTOOLBAR_OBJECT_NAME_STRING))
|
|
|
|
if (ceData.parentWidgetData.widgetObjectTypes.contains("TQToolBar"))
|
|
|
|
return TQSize( s.width()+2*4+_toolBarSpacing, s.height()+2*4 );
|
|
|
|
return TQSize( s.width()+2*4+_toolBarSpacing, s.height()+2*4 );
|
|
|
|
else
|
|
|
|
else
|
|
|
|
return TDEStyle::sizeFromContents (t, ceData, elementFlags, s, opt, widget);
|
|
|
|
return TDEStyle::sizeFromContents (t, ceData, elementFlags, s, opt, widget);
|
|
|
@ -3970,7 +3970,7 @@ bool LipstikStyle::objectEventHandler( const TQStyleControlElementData &ceData,
|
|
|
|
if (TDEStyle::objectEventHandler(ceData, elementFlags, source, ev) )
|
|
|
|
if (TDEStyle::objectEventHandler(ceData, elementFlags, source, ev) )
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
|
|
|
|
|
|
|
|
if (ceData.widgetObjectTypes.contains(TQOBJECT_OBJECT_NAME_STRING)) {
|
|
|
|
if (ceData.widgetObjectTypes.contains("TQObject")) {
|
|
|
|
TQObject* obj = reinterpret_cast<TQObject*>(source);
|
|
|
|
TQObject* obj = reinterpret_cast<TQObject*>(source);
|
|
|
|
|
|
|
|
|
|
|
|
if (!obj->isWidgetType() ) return false;
|
|
|
|
if (!obj->isWidgetType() ) return false;
|
|
|
|