Rename obsolete tq methods to standard names

pull/1/head
Timothy Pearson 13 years ago
parent 0d3aa6374c
commit 2f2607de82

@ -868,8 +868,8 @@ TQtCurveStyle::TQtCurveStyle()
itsPixmapCache.setAutoDelete(true); itsPixmapCache.setAutoDelete(true);
shadeColors(TQApplication::tqpalette().active().highlight(), itsHighlightCols); shadeColors(TQApplication::tqpalette().active().highlight(), itsHighlightCols);
shadeColors(TQApplication::tqpalette().active().background(), itsBackgroundCols); shadeColors(TQApplication::palette().active().background(), itsBackgroundCols);
shadeColors(TQApplication::tqpalette().active().button(), itsButtonCols); shadeColors(TQApplication::palette().active().button(), itsButtonCols);
setDecorationColors(true); setDecorationColors(true);
@ -1073,7 +1073,7 @@ TQtCurveStyle::TQtCurveStyle()
} }
} }
setMenuColors(TQApplication::tqpalette().active()); setMenuColors(TQApplication::palette().active());
if(USE_LIGHTER_POPUP_MENU) if(USE_LIGHTER_POPUP_MENU)
itsLighterPopupMenuBgndCol=shade(itsBackgroundCols[ORIGINAL_SHADE], itsLighterPopupMenuBgndCol=shade(itsBackgroundCols[ORIGINAL_SHADE],
@ -1088,8 +1088,8 @@ TQtCurveStyle::TQtCurveStyle()
switch(opts.shadeCheckRadio) switch(opts.shadeCheckRadio)
{ {
default: default:
itsCheckRadioCol=opts.crButton ? TQApplication::tqpalette().active().buttonText() itsCheckRadioCol=opts.crButton ? TQApplication::palette().active().buttonText()
: TQApplication::tqpalette().active().text(); : TQApplication::palette().active().text();
break; break;
case SHADE_BLEND_SELECTED: case SHADE_BLEND_SELECTED:
case SHADE_SELECTED: case SHADE_SELECTED:
@ -1203,7 +1203,7 @@ void TQtCurveStyle::polish(TQApplication *app)
else if ("mactor"==appName) else if ("mactor"==appName)
{ {
if(!itsMactorPal) if(!itsMactorPal)
itsMactorPal=new TQPalette(TQApplication::tqpalette()); itsMactorPal=new TQPalette(TQApplication::palette());
itsThemedApp=APP_MACTOR; itsThemedApp=APP_MACTOR;
} }
else else
@ -1291,7 +1291,7 @@ void TQtCurveStyle::polish(TQPalette &pal)
if(kdeSettings.inactiveHighlight) if(kdeSettings.inactiveHighlight)
{ {
pal.setColor(TQPalette::Inactive, TQColorGroup::Highlight, pal.setColor(TQPalette::Inactive, TQColorGroup::Highlight,
tint(TQApplication::tqpalette().active().background(), tint(TQApplication::palette().active().background(),
TQApplication::tqpalette().active().highlight(), 0.4)); TQApplication::tqpalette().active().highlight(), 0.4));
// KDE4 does not set text colour :-( // KDE4 does not set text colour :-(
//pal.setColor(TQPalette::Inactive, TQColorGroup::HighlightedText, pal.color(TQPalette::Active, TQColorGroup::Foreground)); //pal.setColor(TQPalette::Inactive, TQColorGroup::HighlightedText, pal.color(TQPalette::Active, TQColorGroup::Foreground));
@ -1300,9 +1300,9 @@ void TQtCurveStyle::polish(TQPalette &pal)
bool newMenu(newContrast || bool newMenu(newContrast ||
itsHighlightCols[ORIGINAL_SHADE]!=TQApplication::tqpalette().active().highlight()), itsHighlightCols[ORIGINAL_SHADE]!=TQApplication::tqpalette().active().highlight()),
newGray(newContrast || newGray(newContrast ||
itsBackgroundCols[ORIGINAL_SHADE]!=TQApplication::tqpalette().active().background()), itsBackgroundCols[ORIGINAL_SHADE]!=TQApplication::palette().active().background()),
newButton(newContrast || newButton(newContrast ||
itsButtonCols[ORIGINAL_SHADE]!=TQApplication::tqpalette().active().button()), itsButtonCols[ORIGINAL_SHADE]!=TQApplication::palette().active().button()),
newSlider(itsSliderCols && SHADE_BLEND_SELECTED==opts.shadeSliders && newSlider(itsSliderCols && SHADE_BLEND_SELECTED==opts.shadeSliders &&
(newContrast || newButton || newMenu)), (newContrast || newButton || newMenu)),
newDefBtn(itsDefBtnCols && /*( (IND_COLORED==opts.defBtnIndicator &&*/ newDefBtn(itsDefBtnCols && /*( (IND_COLORED==opts.defBtnIndicator &&*/
@ -1327,17 +1327,17 @@ void TQtCurveStyle::polish(TQPalette &pal)
itsSortedLvColors!=itsProgressCols && itsCheckRadioSelCols!=itsProgressCols && (newContrast || newButton)); itsSortedLvColors!=itsProgressCols && itsCheckRadioSelCols!=itsProgressCols && (newContrast || newButton));
if(newGray) if(newGray)
shadeColors(TQApplication::tqpalette().active().background(), itsBackgroundCols); shadeColors(TQApplication::palette().active().background(), itsBackgroundCols);
if(newButton) if(newButton)
shadeColors(TQApplication::tqpalette().active().button(), itsButtonCols); shadeColors(TQApplication::palette().active().button(), itsButtonCols);
if(newMenu) if(newMenu)
shadeColors(TQApplication::tqpalette().active().highlight(), itsHighlightCols); shadeColors(TQApplication::tqpalette().active().highlight(), itsHighlightCols);
setDecorationColors(); setDecorationColors();
setMenuColors(TQApplication::tqpalette().active()); setMenuColors(TQApplication::palette().active());
if(newSlider) if(newSlider)
shadeColors(midColor(itsHighlightCols[ORIGINAL_SHADE], itsButtonCols[ORIGINAL_SHADE]), itsSliderCols); shadeColors(midColor(itsHighlightCols[ORIGINAL_SHADE], itsButtonCols[ORIGINAL_SHADE]), itsSliderCols);
@ -1385,8 +1385,8 @@ void TQtCurveStyle::polish(TQPalette &pal)
switch(opts.shadeCheckRadio) switch(opts.shadeCheckRadio)
{ {
default: default:
itsCheckRadioCol=opts.crButton ? TQApplication::tqpalette().active().buttonText() itsCheckRadioCol=opts.crButton ? TQApplication::palette().active().buttonText()
: TQApplication::tqpalette().active().text(); : TQApplication::palette().active().text();
break; break;
case SHADE_SELECTED: case SHADE_SELECTED:
case SHADE_BLEND_SELECTED: case SHADE_BLEND_SELECTED:
@ -1466,7 +1466,7 @@ void TQtCurveStyle::polish(TQWidget *widget)
if(widget->parentWidget() && ::tqqt_cast<TQScrollView *>(widget) && ::tqqt_cast<TQComboBox *>(widget->parentWidget())) if(widget->parentWidget() && ::tqqt_cast<TQScrollView *>(widget) && ::tqqt_cast<TQComboBox *>(widget->parentWidget()))
{ {
TQPalette pal(widget->tqpalette()); TQPalette pal(widget->palette());
#if 0 #if 0
TQPalette orig(pal); TQPalette orig(pal);
#endif #endif
@ -1477,7 +1477,7 @@ void TQtCurveStyle::polish(TQWidget *widget)
act.setColor(TQColorGroup::Base, USE_LIGHTER_POPUP_MENU ? itsLighterPopupMenuBgndCol : itsBackgroundCols[ORIGINAL_SHADE]); act.setColor(TQColorGroup::Base, USE_LIGHTER_POPUP_MENU ? itsLighterPopupMenuBgndCol : itsBackgroundCols[ORIGINAL_SHADE]);
act.setColor(TQColorGroup::Background, opts.gtkComboMenus act.setColor(TQColorGroup::Background, opts.gtkComboMenus
? USE_LIGHTER_POPUP_MENU ? itsLighterPopupMenuBgndCol : itsBackgroundCols[ORIGINAL_SHADE] ? USE_LIGHTER_POPUP_MENU ? itsLighterPopupMenuBgndCol : itsBackgroundCols[ORIGINAL_SHADE]
: TQApplication::tqpalette().active().base()); : TQApplication::palette().active().base());
#endif #endif
act.setColor(TQColorGroup::Foreground, itsBackgroundCols[STD_BORDER]); act.setColor(TQColorGroup::Foreground, itsBackgroundCols[STD_BORDER]);
@ -1606,7 +1606,7 @@ void TQtCurveStyle::polish(TQWidget *widget)
emitMenuSize(widget, widget->rect().height()); emitMenuSize(widget, widget->rect().height());
if(SHADE_WINDOW_BORDER==opts.shadeMenubars) if(SHADE_WINDOW_BORDER==opts.shadeMenubars)
{ {
TQPalette pal(widget->tqpalette()); TQPalette pal(widget->palette());
TQColorGroup act(pal.active()); TQColorGroup act(pal.active());
TQColorGroup inact(pal.inactive()); TQColorGroup inact(pal.inactive());
@ -1620,7 +1620,7 @@ void TQtCurveStyle::polish(TQWidget *widget)
else if(opts.customMenuTextColor || SHADE_BLEND_SELECTED==opts.shadeMenubars || SHADE_SELECTED==opts.shadeMenubars || else if(opts.customMenuTextColor || SHADE_BLEND_SELECTED==opts.shadeMenubars || SHADE_SELECTED==opts.shadeMenubars ||
(SHADE_CUSTOM==opts.shadeMenubars && TOO_DARK(itsMenubarCols[ORIGINAL_SHADE]))) (SHADE_CUSTOM==opts.shadeMenubars && TOO_DARK(itsMenubarCols[ORIGINAL_SHADE])))
{ {
TQPalette pal(widget->tqpalette()); TQPalette pal(widget->palette());
TQColorGroup act(pal.active()); TQColorGroup act(pal.active());
act.setColor(TQColorGroup::Foreground, opts.customMenuTextColor act.setColor(TQColorGroup::Foreground, opts.customMenuTextColor
@ -1726,8 +1726,8 @@ void TQtCurveStyle::polish(TQWidget *widget)
{ {
if(widget->tqpalette().inactive().highlightedText()!=widget->tqpalette().active().highlightedText()) if(widget->tqpalette().inactive().highlightedText()!=widget->tqpalette().active().highlightedText())
{ {
TQPalette pal(widget->tqpalette()); TQPalette pal(widget->palette());
pal.setInactive(widget->tqpalette().active()); pal.setInactive(widget->palette().active());
widget->setPalette(pal); widget->setPalette(pal);
} }
@ -1750,7 +1750,7 @@ void TQtCurveStyle::polish(TQWidget *widget)
// Thanks Comix! (because this was ugly from day one!) // Thanks Comix! (because this was ugly from day one!)
// NOTE: Check if we can set it earlier (before painting), cause // NOTE: Check if we can set it earlier (before painting), cause
// on slow machines we can see the repainting of the bar (from white to background...) // on slow machines we can see the repainting of the bar (from white to background...)
TQPalette pal(TQApplication::tqpalette()); TQPalette pal(TQApplication::palette());
pal.setColor(TQColorGroup::Midlight, pal.active().background()); pal.setColor(TQColorGroup::Midlight, pal.active().background());
TQApplication::setPalette(pal); TQApplication::setPalette(pal);
@ -1811,7 +1811,7 @@ void TQtCurveStyle::polish(TQWidget *widget)
::tqqt_cast<TQTabWidget *>(widget->parentWidget()) && ::tqqt_cast<TQTabWidget *>(widget->parentWidget()) &&
0==qstrcmp(widget->name(), "tab pages")) 0==qstrcmp(widget->name(), "tab pages"))
{ {
TQPalette pal(widget->tqpalette()); TQPalette pal(widget->palette());
pal.setColor(TQColorGroup::Background, shade(pal.active().background(), TO_FACTOR(opts.tabBgnd))); pal.setColor(TQColorGroup::Background, shade(pal.active().background(), TO_FACTOR(opts.tabBgnd)));
widget->setBackgroundMode(PaletteBackground); widget->setBackgroundMode(PaletteBackground);
@ -1889,7 +1889,7 @@ void TQtCurveStyle::unPolish(TQWidget *widget)
widget->removeEventFilter(this); widget->removeEventFilter(this);
if(SHADE_WINDOW_BORDER==opts.shadeMenubars || opts.customMenuTextColor || SHADE_BLEND_SELECTED==opts.shadeMenubars || 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]))) SHADE_SELECTED==opts.shadeMenubars || (SHADE_CUSTOM==opts.shadeMenubars &&TOO_DARK(itsMenubarCols[ORIGINAL_SHADE])))
widget->setPalette(TQApplication::tqpalette()); widget->setPalette(TQApplication::palette());
} }
else if (widget->inherits("KToolBarSeparator")) else if (widget->inherits("KToolBarSeparator"))
{ {
@ -2062,7 +2062,7 @@ bool TQtCurveStyle::eventFilter(TQObject *object, TQEvent *event)
{ {
TQWidget *widget=(TQWidget*)object; TQWidget *widget=(TQWidget*)object;
TQPainter painter(widget); TQPainter painter(widget);
TQColor col(USE_LIGHTER_POPUP_MENU ? itsLighterPopupMenuBgndCol : widget->tqpalette().active().background()); TQColor col(USE_LIGHTER_POPUP_MENU ? itsLighterPopupMenuBgndCol : widget->palette().active().background());
if(APPEARANCE_STRIPED==opts.menuBgndAppearance) if(APPEARANCE_STRIPED==opts.menuBgndAppearance)
painter.drawTiledPixmap(widget->rect(), *createStripePixmap(col, false)); painter.drawTiledPixmap(widget->rect(), *createStripePixmap(col, false));
@ -2174,7 +2174,7 @@ bool TQtCurveStyle::eventFilter(TQObject *object, TQEvent *event)
if( (useWindowCols || opts.customMenuTextColor || SHADE_BLEND_SELECTED==opts.shadeMenubars || SHADE_SELECTED==opts.shadeMenubars || if( (useWindowCols || opts.customMenuTextColor || SHADE_BLEND_SELECTED==opts.shadeMenubars || SHADE_SELECTED==opts.shadeMenubars ||
SHADE_CUSTOM==opts.shadeMenubars) && TQEvent::Paint==event->type()) SHADE_CUSTOM==opts.shadeMenubars) && TQEvent::Paint==event->type())
{ {
const TQColor &col(((TQWidget *)object)->tqpalette().active().color(TQColorGroup::Foreground)); const TQColor &col(((TQWidget *)object)->palette().active().color(TQColorGroup::Foreground));
// If we're relouring the menubar text, check to see if menubar palette has changed, if so set back to // If we're relouring the menubar text, check to see if menubar palette has changed, if so set back to
// our values. This fixes opera - which seems to change the widgets palette after it is polished. // our values. This fixes opera - which seems to change the widgets palette after it is polished.
@ -2183,7 +2183,7 @@ bool TQtCurveStyle::eventFilter(TQObject *object, TQEvent *event)
(SHADE_CUSTOM==opts.shadeMenubars && TOO_DARK(itsMenubarCols[ORIGINAL_SHADE]))) && (SHADE_CUSTOM==opts.shadeMenubars && TOO_DARK(itsMenubarCols[ORIGINAL_SHADE]))) &&
col!=TQApplication::tqpalette().active().highlightedText())) col!=TQApplication::tqpalette().active().highlightedText()))
{ {
TQPalette pal(((TQWidget *)object)->tqpalette()); TQPalette pal(((TQWidget *)object)->palette());
TQColorGroup act(pal.active()); TQColorGroup act(pal.active());
act.setColor(TQColorGroup::Foreground, useWindowCols act.setColor(TQColorGroup::Foreground, useWindowCols
@ -3422,7 +3422,7 @@ void TQtCurveStyle::tqdrawPrimitive(TQ_PrimitiveElement pe, TQPainter *p, const
TQListView *lv(item->listView()); TQListView *lv(item->listView());
p->setPen(TQPen(flags&Style_Enabled ? cg.text() p->setPen(TQPen(flags&Style_Enabled ? cg.text()
: lv->tqpalette().color(TQPalette::Disabled, : lv->palette().color(TQPalette::Disabled,
TQColorGroup::Text))); TQColorGroup::Text)));
if (flags&Style_Selected) if (flags&Style_Selected)
{ {
@ -5900,7 +5900,7 @@ void TQtCurveStyle::drawComplexControl(ComplexControl control, TQPainter *p, con
pe=PE_SpinWidgetPlus; pe=PE_SpinWidgetPlus;
if(!spinwidget->isUpEnabled()) if(!spinwidget->isUpEnabled())
upflags&=~Style_Enabled; upflags&=~Style_Enabled;
tqdrawPrimitive(pe, p, up, !(upflags&Style_Enabled) && spinwidget ? spinwidget->tqpalette().disabled() : cg, tqdrawPrimitive(pe, p, up, !(upflags&Style_Enabled) && spinwidget ? spinwidget->palette().disabled() : cg,
upflags |((active==SC_SpinWidgetUp) upflags |((active==SC_SpinWidgetUp)
? Style_On | Style_Sunken : Style_Raised)); ? Style_On | Style_Sunken : Style_Raised));
} }
@ -5916,7 +5916,7 @@ void TQtCurveStyle::drawComplexControl(ComplexControl control, TQPainter *p, con
pe=PE_SpinWidgetMinus; pe=PE_SpinWidgetMinus;
if(!spinwidget->isDownEnabled()) if(!spinwidget->isDownEnabled())
downflags&=~Style_Enabled; downflags&=~Style_Enabled;
tqdrawPrimitive(pe, p, down, !(downflags&Style_Enabled) && spinwidget ? spinwidget->tqpalette().disabled() : cg, tqdrawPrimitive(pe, p, down, !(downflags&Style_Enabled) && spinwidget ? spinwidget->palette().disabled() : cg,
downflags |((active==SC_SpinWidgetDown) downflags |((active==SC_SpinWidgetDown)
? Style_On | Style_Sunken : Style_Raised)); ? Style_On | Style_Sunken : Style_Raised));
} }
@ -6100,7 +6100,7 @@ void TQtCurveStyle::drawComplexControl(ComplexControl control, TQPainter *p, con
{ {
bool enable=!atMin; bool enable=!atMin;
tqdrawPrimitive(PE_ScrollBarSubLine, p, subline, !enable && sb ? sb->tqpalette().disabled() : cg, tqdrawPrimitive(PE_ScrollBarSubLine, p, subline, !enable && sb ? sb->palette().disabled() : cg,
sflags | sflags |
//(enable ? Style_Enabled : Style_Default) | //(enable ? Style_Enabled : Style_Default) |
(enable && hw && HOVER_SB_SUB==itsHover (enable && hw && HOVER_SB_SUB==itsHover
@ -6112,7 +6112,7 @@ void TQtCurveStyle::drawComplexControl(ComplexControl control, TQPainter *p, con
{ {
if(IS_FLAT(opts.sbarBgndAppearance)) if(IS_FLAT(opts.sbarBgndAppearance))
p->fillRect(subline2, cg.background()); p->fillRect(subline2, cg.background());
tqdrawPrimitive(PE_ScrollBarSubLine, p, subline2, !enable && sb ? sb->tqpalette().disabled() : cg, tqdrawPrimitive(PE_ScrollBarSubLine, p, subline2, !enable && sb ? sb->palette().disabled() : cg,
sflags | sflags |
//(enable ? Style_Enabled : Style_Default) | //(enable ? Style_Enabled : Style_Default) |
(enable && hw && HOVER_SB_SUB2==itsHover (enable && hw && HOVER_SB_SUB2==itsHover
@ -6132,7 +6132,7 @@ void TQtCurveStyle::drawComplexControl(ComplexControl control, TQPainter *p, con
else else
addline.addCoords(0, 0, 0, -1); addline.addCoords(0, 0, 0, -1);
tqdrawPrimitive(PE_ScrollBarAddLine, p, addline, !enable && sb ? sb->tqpalette().disabled() : cg, tqdrawPrimitive(PE_ScrollBarAddLine, p, addline, !enable && sb ? sb->palette().disabled() : cg,
sflags | sflags |
//(enable ? Style_Enabled : Style_Default) | //(enable ? Style_Enabled : Style_Default) |
(enable && hw && HOVER_SB_ADD==itsHover (enable && hw && HOVER_SB_ADD==itsHover
@ -6310,8 +6310,8 @@ void TQtCurveStyle::drawComplexControl(ComplexControl control, TQPainter *p, con
bool isActive((tb->isActive() && widget->isActiveWindow()) || bool isActive((tb->isActive() && widget->isActiveWindow()) ||
(!tb->window() && widget->topLevelWidget()->isActiveWindow())); (!tb->window() && widget->topLevelWidget()->isActiveWindow()));
TQColorGroup cgroup(isActive TQColorGroup cgroup(isActive
? widget->tqpalette().active() ? widget->palette().active()
: widget->tqpalette().inactive()); : widget->palette().inactive());
const TQColor *cols(getMdiColors(cg, isActive)); const TQColor *cols(getMdiColors(cg, isActive));
TQColor textCol(isActive ? itsActiveMdiTextColor : itsMdiTextColor), TQColor textCol(isActive ? itsActiveMdiTextColor : itsMdiTextColor),
shdCol(shadowColor(textCol)), shdCol(shadowColor(textCol)),

Loading…
Cancel
Save