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);
shadeColors(TQApplication::tqpalette().active().highlight(), itsHighlightCols);
shadeColors(TQApplication::tqpalette().active().background(), itsBackgroundCols);
shadeColors(TQApplication::tqpalette().active().button(), itsButtonCols);
shadeColors(TQApplication::palette().active().background(), itsBackgroundCols);
shadeColors(TQApplication::palette().active().button(), itsButtonCols);
setDecorationColors(true);
@ -1073,7 +1073,7 @@ TQtCurveStyle::TQtCurveStyle()
}
}
setMenuColors(TQApplication::tqpalette().active());
setMenuColors(TQApplication::palette().active());
if(USE_LIGHTER_POPUP_MENU)
itsLighterPopupMenuBgndCol=shade(itsBackgroundCols[ORIGINAL_SHADE],
@ -1088,8 +1088,8 @@ TQtCurveStyle::TQtCurveStyle()
switch(opts.shadeCheckRadio)
{
default:
itsCheckRadioCol=opts.crButton ? TQApplication::tqpalette().active().buttonText()
: TQApplication::tqpalette().active().text();
itsCheckRadioCol=opts.crButton ? TQApplication::palette().active().buttonText()
: TQApplication::palette().active().text();
break;
case SHADE_BLEND_SELECTED:
case SHADE_SELECTED:
@ -1203,7 +1203,7 @@ void TQtCurveStyle::polish(TQApplication *app)
else if ("mactor"==appName)
{
if(!itsMactorPal)
itsMactorPal=new TQPalette(TQApplication::tqpalette());
itsMactorPal=new TQPalette(TQApplication::palette());
itsThemedApp=APP_MACTOR;
}
else
@ -1291,7 +1291,7 @@ void TQtCurveStyle::polish(TQPalette &pal)
if(kdeSettings.inactiveHighlight)
{
pal.setColor(TQPalette::Inactive, TQColorGroup::Highlight,
tint(TQApplication::tqpalette().active().background(),
tint(TQApplication::palette().active().background(),
TQApplication::tqpalette().active().highlight(), 0.4));
// KDE4 does not set text colour :-(
//pal.setColor(TQPalette::Inactive, TQColorGroup::HighlightedText, pal.color(TQPalette::Active, TQColorGroup::Foreground));
@ -1300,9 +1300,9 @@ void TQtCurveStyle::polish(TQPalette &pal)
bool newMenu(newContrast ||
itsHighlightCols[ORIGINAL_SHADE]!=TQApplication::tqpalette().active().highlight()),
newGray(newContrast ||
itsBackgroundCols[ORIGINAL_SHADE]!=TQApplication::tqpalette().active().background()),
itsBackgroundCols[ORIGINAL_SHADE]!=TQApplication::palette().active().background()),
newButton(newContrast ||
itsButtonCols[ORIGINAL_SHADE]!=TQApplication::tqpalette().active().button()),
itsButtonCols[ORIGINAL_SHADE]!=TQApplication::palette().active().button()),
newSlider(itsSliderCols && SHADE_BLEND_SELECTED==opts.shadeSliders &&
(newContrast || newButton || newMenu)),
newDefBtn(itsDefBtnCols && /*( (IND_COLORED==opts.defBtnIndicator &&*/
@ -1327,17 +1327,17 @@ void TQtCurveStyle::polish(TQPalette &pal)
itsSortedLvColors!=itsProgressCols && itsCheckRadioSelCols!=itsProgressCols && (newContrast || newButton));
if(newGray)
shadeColors(TQApplication::tqpalette().active().background(), itsBackgroundCols);
shadeColors(TQApplication::palette().active().background(), itsBackgroundCols);
if(newButton)
shadeColors(TQApplication::tqpalette().active().button(), itsButtonCols);
shadeColors(TQApplication::palette().active().button(), itsButtonCols);
if(newMenu)
shadeColors(TQApplication::tqpalette().active().highlight(), itsHighlightCols);
setDecorationColors();
setMenuColors(TQApplication::tqpalette().active());
setMenuColors(TQApplication::palette().active());
if(newSlider)
shadeColors(midColor(itsHighlightCols[ORIGINAL_SHADE], itsButtonCols[ORIGINAL_SHADE]), itsSliderCols);
@ -1385,8 +1385,8 @@ void TQtCurveStyle::polish(TQPalette &pal)
switch(opts.shadeCheckRadio)
{
default:
itsCheckRadioCol=opts.crButton ? TQApplication::tqpalette().active().buttonText()
: TQApplication::tqpalette().active().text();
itsCheckRadioCol=opts.crButton ? TQApplication::palette().active().buttonText()
: TQApplication::palette().active().text();
break;
case SHADE_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()))
{
TQPalette pal(widget->tqpalette());
TQPalette pal(widget->palette());
#if 0
TQPalette orig(pal);
#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::Background, opts.gtkComboMenus
? USE_LIGHTER_POPUP_MENU ? itsLighterPopupMenuBgndCol : itsBackgroundCols[ORIGINAL_SHADE]
: TQApplication::tqpalette().active().base());
: TQApplication::palette().active().base());
#endif
act.setColor(TQColorGroup::Foreground, itsBackgroundCols[STD_BORDER]);
@ -1606,7 +1606,7 @@ void TQtCurveStyle::polish(TQWidget *widget)
emitMenuSize(widget, widget->rect().height());
if(SHADE_WINDOW_BORDER==opts.shadeMenubars)
{
TQPalette pal(widget->tqpalette());
TQPalette pal(widget->palette());
TQColorGroup act(pal.active());
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 ||
(SHADE_CUSTOM==opts.shadeMenubars && TOO_DARK(itsMenubarCols[ORIGINAL_SHADE])))
{
TQPalette pal(widget->tqpalette());
TQPalette pal(widget->palette());
TQColorGroup act(pal.active());
act.setColor(TQColorGroup::Foreground, opts.customMenuTextColor
@ -1726,8 +1726,8 @@ void TQtCurveStyle::polish(TQWidget *widget)
{
if(widget->tqpalette().inactive().highlightedText()!=widget->tqpalette().active().highlightedText())
{
TQPalette pal(widget->tqpalette());
pal.setInactive(widget->tqpalette().active());
TQPalette pal(widget->palette());
pal.setInactive(widget->palette().active());
widget->setPalette(pal);
}
@ -1750,7 +1750,7 @@ void TQtCurveStyle::polish(TQWidget *widget)
// Thanks Comix! (because this was ugly from day one!)
// 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...)
TQPalette pal(TQApplication::tqpalette());
TQPalette pal(TQApplication::palette());
pal.setColor(TQColorGroup::Midlight, pal.active().background());
TQApplication::setPalette(pal);
@ -1811,7 +1811,7 @@ void TQtCurveStyle::polish(TQWidget *widget)
::tqqt_cast<TQTabWidget *>(widget->parentWidget()) &&
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)));
widget->setBackgroundMode(PaletteBackground);
@ -1889,7 +1889,7 @@ void TQtCurveStyle::unPolish(TQWidget *widget)
widget->removeEventFilter(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::tqpalette());
widget->setPalette(TQApplication::palette());
}
else if (widget->inherits("KToolBarSeparator"))
{
@ -2062,7 +2062,7 @@ bool TQtCurveStyle::eventFilter(TQObject *object, TQEvent *event)
{
TQWidget *widget=(TQWidget*)object;
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)
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 ||
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
// 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]))) &&
col!=TQApplication::tqpalette().active().highlightedText()))
{
TQPalette pal(((TQWidget *)object)->tqpalette());
TQPalette pal(((TQWidget *)object)->palette());
TQColorGroup act(pal.active());
act.setColor(TQColorGroup::Foreground, useWindowCols
@ -3422,7 +3422,7 @@ void TQtCurveStyle::tqdrawPrimitive(TQ_PrimitiveElement pe, TQPainter *p, const
TQListView *lv(item->listView());
p->setPen(TQPen(flags&Style_Enabled ? cg.text()
: lv->tqpalette().color(TQPalette::Disabled,
: lv->palette().color(TQPalette::Disabled,
TQColorGroup::Text)));
if (flags&Style_Selected)
{
@ -5900,7 +5900,7 @@ void TQtCurveStyle::drawComplexControl(ComplexControl control, TQPainter *p, con
pe=PE_SpinWidgetPlus;
if(!spinwidget->isUpEnabled())
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)
? Style_On | Style_Sunken : Style_Raised));
}
@ -5916,7 +5916,7 @@ void TQtCurveStyle::drawComplexControl(ComplexControl control, TQPainter *p, con
pe=PE_SpinWidgetMinus;
if(!spinwidget->isDownEnabled())
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)
? Style_On | Style_Sunken : Style_Raised));
}
@ -6100,7 +6100,7 @@ void TQtCurveStyle::drawComplexControl(ComplexControl control, TQPainter *p, con
{
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 |
//(enable ? Style_Enabled : Style_Default) |
(enable && hw && HOVER_SB_SUB==itsHover
@ -6112,7 +6112,7 @@ void TQtCurveStyle::drawComplexControl(ComplexControl control, TQPainter *p, con
{
if(IS_FLAT(opts.sbarBgndAppearance))
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 |
//(enable ? Style_Enabled : Style_Default) |
(enable && hw && HOVER_SB_SUB2==itsHover
@ -6132,7 +6132,7 @@ void TQtCurveStyle::drawComplexControl(ComplexControl control, TQPainter *p, con
else
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 |
//(enable ? Style_Enabled : Style_Default) |
(enable && hw && HOVER_SB_ADD==itsHover
@ -6310,8 +6310,8 @@ void TQtCurveStyle::drawComplexControl(ComplexControl control, TQPainter *p, con
bool isActive((tb->isActive() && widget->isActiveWindow()) ||
(!tb->window() && widget->topLevelWidget()->isActiveWindow()));
TQColorGroup cgroup(isActive
? widget->tqpalette().active()
: widget->tqpalette().inactive());
? widget->palette().active()
: widget->palette().inactive());
const TQColor *cols(getMdiColors(cg, isActive));
TQColor textCol(isActive ? itsActiveMdiTextColor : itsMdiTextColor),
shdCol(shadowColor(textCol)),

Loading…
Cancel
Save