diff options
Diffstat (limited to 'src/tag.cpp')
-rw-r--r-- | src/tag.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/tag.cpp b/src/tag.cpp index f560397..7af9db1 100644 --- a/src/tag.cpp +++ b/src/tag.cpp @@ -768,7 +768,7 @@ void IndentedMenuItem::paint(TQPainter *painter, const TQColorGroup &cg, bool ac } } -TQSize IndentedMenuItem::tqsizeHint() +TQSize IndentedMenuItem::sizeHint() { int iconSize = KIcon::SizeSmall; int iconMargin = StateMenuItem::iconMargin(); @@ -841,7 +841,7 @@ void StateMenuItem::paint(TQPainter *painter, const TQColorGroup &cg, bool activ } } -TQSize StateMenuItem::tqsizeHint() +TQSize StateMenuItem::sizeHint() { int iconSize = 16; // We use 16 instead of KIcon::SizeSmall (the size of icons in menus) because tags will always be 16*16 icons TQFont theFont = m_state->font(KGlobalSettings::menuFont()); @@ -851,15 +851,15 @@ TQSize StateMenuItem::tqsizeHint() TQIconSet StateMenuItem::checkBoxIconSet(bool checked, TQColorGroup cg) { - int width = kapp->tqstyle().tqpixelMetric(TQStyle::PM_IndicatorWidth, 0); - int height = kapp->tqstyle().tqpixelMetric(TQStyle::PM_IndicatorHeight, 0); + int width = kapp->tqstyle().pixelMetric(TQStyle::PM_IndicatorWidth, 0); + int height = kapp->tqstyle().pixelMetric(TQStyle::PM_IndicatorHeight, 0); TQRect rect(0, 0, width, height); TQColor menuBackgroundColor = (dynamic_cast<KStyle*>(&(kapp->tqstyle())) == NULL ? TQColor(cg.background()) : cg.background().light(103)); // Enabled, Not hovering TQPixmap pixmap(width, height); - pixmap.fill(menuBackgroundColor); // In case the tqpixelMetric() haven't returned a bigger rectangle than what drawPrimitive() draws + pixmap.fill(menuBackgroundColor); // In case the pixelMetric() haven't returned a bigger rectangle than what drawPrimitive() draws TQPainter painter(&pixmap); int style = TQStyle::Style_Enabled | TQStyle::Style_Active | (checked ? TQStyle::Style_On : TQStyle::Style_Off); TQColor background = cg.color(TQColorGroup::Background); @@ -868,7 +868,7 @@ TQIconSet StateMenuItem::checkBoxIconSet(bool checked, TQColorGroup cg) // Enabled, Hovering TQPixmap pixmapHover(width, height); - pixmapHover.fill(menuBackgroundColor); // In case the tqpixelMetric() haven't returned a bigger rectangle than what drawPrimitive() draws + pixmapHover.fill(menuBackgroundColor); // In case the pixelMetric() haven't returned a bigger rectangle than what drawPrimitive() draws painter.begin(&pixmapHover); style |= TQStyle::Style_MouseOver; cg.setColor(TQColorGroup::Background, KGlobalSettings::highlightColor()); @@ -877,7 +877,7 @@ TQIconSet StateMenuItem::checkBoxIconSet(bool checked, TQColorGroup cg) // Disabled TQPixmap pixmapDisabled(width, height); - pixmapDisabled.fill(menuBackgroundColor); // In case the tqpixelMetric() haven't returned a bigger rectangle than what drawPrimitive() draws + pixmapDisabled.fill(menuBackgroundColor); // In case the pixelMetric() haven't returned a bigger rectangle than what drawPrimitive() draws painter.begin(&pixmapDisabled); style = /*TQStyle::Style_Enabled | */TQStyle::Style_Active | (checked ? TQStyle::Style_On : TQStyle::Style_Off); cg.setColor(TQColorGroup::Background, background); @@ -892,8 +892,8 @@ TQIconSet StateMenuItem::checkBoxIconSet(bool checked, TQColorGroup cg) TQIconSet StateMenuItem::radioButtonIconSet(bool checked, TQColorGroup cg) { - int width = kapp->tqstyle().tqpixelMetric(TQStyle::PM_ExclusiveIndicatorWidth, 0); - int height = kapp->tqstyle().tqpixelMetric(TQStyle::PM_ExclusiveIndicatorHeight, 0); + int width = kapp->tqstyle().pixelMetric(TQStyle::PM_ExclusiveIndicatorWidth, 0); + int height = kapp->tqstyle().pixelMetric(TQStyle::PM_ExclusiveIndicatorHeight, 0); TQRect rect(0, 0, width, height); int style = TQStyle::Style_Default | TQStyle::Style_Enabled | (checked ? TQStyle::Style_On : TQStyle::Style_Off); @@ -908,7 +908,7 @@ TQIconSet StateMenuItem::radioButtonIconSet(bool checked, TQColorGroup cg) */ TQRadioButton rb(0); rb.setChecked(checked); - kapp->tqstyle().tqdrawControl(TQStyle::CE_RadioButton, &painter, &rb, rect, cg, style); + kapp->tqstyle().drawControl(TQStyle::CE_RadioButton, &painter, &rb, rect, cg, style); painter.end(); /* Some styles like Plastik (and derived ones) have TQStyle::PE_ExclusiveIndicator drawing a radiobutton disc, as wanted, * and leave pixels ouside it untouched, BUT TQStyle::PE_ExclusiveIndicatorMask is a fully black square. @@ -924,7 +924,7 @@ TQIconSet StateMenuItem::radioButtonIconSet(bool checked, TQColorGroup cg) //kapp->tqstyle().tqdrawPrimitive(TQStyle::PE_ExclusiveIndicator, &painter, rect, cg, style); style |= TQStyle::Style_MouseOver; cg.setColor(TQColorGroup::Background, KGlobalSettings::highlightColor()); - kapp->tqstyle().tqdrawControl(TQStyle::CE_RadioButton, &painter, &rb, rect, cg, style); + kapp->tqstyle().drawControl(TQStyle::CE_RadioButton, &painter, &rb, rect, cg, style); painter.end(); pixmapHover.setMask(pixmapHover.createHeuristicMask()); |