diff options
author | Michele Calgaro <[email protected]> | 2025-01-22 17:46:54 +0900 |
---|---|---|
committer | Michele Calgaro <[email protected]> | 2025-02-03 22:38:49 +0900 |
commit | 4a47c1bfffffad7094f0b5c7cef532069e088ec3 (patch) | |
tree | 31b86dd0d87816e4b31e8bc2aa7687b2e85c2e82 /src/tag.cpp | |
parent | 7975b08418486c2793bd61c32ee347ce6b81c687 (diff) | |
download | basket-4a47c1bfffffad7094f0b5c7cef532069e088ec3.tar.gz basket-4a47c1bfffffad7094f0b5c7cef532069e088ec3.zip |
Use tdeApp
Signed-off-by: Michele Calgaro <[email protected]>
Diffstat (limited to 'src/tag.cpp')
-rw-r--r-- | src/tag.cpp | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/src/tag.cpp b/src/tag.cpp index db0cbad..625fd39 100644 --- a/src/tag.cpp +++ b/src/tag.cpp @@ -740,14 +740,14 @@ void IndentedMenuItem::paint(TQPainter *painter, const TQColorGroup &cg, bool ac */ bool drawingEtchedText = !enabled && !active && painter->pen().color() != cg.mid()/*== cg.foreground()*/; if (drawingEtchedText) { - TQString styleName = kapp->style().name(); + TQString styleName = tdeApp->style().name(); if (styleName == "plastik" || styleName == "lipstik") painter->setPen(cg.light()); drawingEtchedText = !enabled && !active && painter->pen().color() != cg.foreground(); } else drawingEtchedText = !enabled && !active && painter->pen().color() == cg.light(); if (!m_icon.isEmpty() && !drawingEtchedText) { - TQPixmap icon = kapp->iconLoader()->loadIcon(m_icon, TDEIcon::Small, iconSize, + TQPixmap icon = tdeApp->iconLoader()->loadIcon(m_icon, TDEIcon::Small, iconSize, (enabled ? (active ? TDEIcon::ActiveState : TDEIcon::DefaultState) : TDEIcon::DisabledState), /*path_store=*/0L, /*canReturnNull=*/true); painter->drawPixmap(x, y + (h-iconSize)/2, icon); @@ -810,14 +810,14 @@ void StateMenuItem::paint(TQPainter *painter, const TQColorGroup &cg, bool activ */ bool drawingEtchedText = !enabled && !active && painter->pen().color() != cg.mid()/*== cg.foreground()*/; if (drawingEtchedText) { - TQString styleName = kapp->style().name(); + TQString styleName = tdeApp->style().name(); if (styleName == "plastik" || styleName == "lipstik") painter->setPen(cg.light()); drawingEtchedText = !enabled && !active && painter->pen().color() != cg.foreground(); } else drawingEtchedText = !enabled && !active && painter->pen().color() == cg.light(); if (!m_state->emblem().isEmpty() && !drawingEtchedText) { - TQPixmap icon = kapp->iconLoader()->loadIcon(m_state->emblem(), TDEIcon::Small, iconSize, + TQPixmap icon = tdeApp->iconLoader()->loadIcon(m_state->emblem(), TDEIcon::Small, iconSize, (enabled ? (active ? TDEIcon::ActiveState : TDEIcon::DefaultState) : TDEIcon::DisabledState), /*path_store=*/0L, /*canReturnNull=*/true); painter->drawPixmap(x, y + (h-iconSize)/2, icon); @@ -855,11 +855,11 @@ TQSize StateMenuItem::sizeHint() TQIconSet StateMenuItem::checkBoxIconSet(bool checked, TQColorGroup cg) { - int width = kapp->style().pixelMetric(TQStyle::PM_IndicatorWidth, 0); - int height = kapp->style().pixelMetric(TQStyle::PM_IndicatorHeight, 0); + int width = tdeApp->style().pixelMetric(TQStyle::PM_IndicatorWidth, 0); + int height = tdeApp->style().pixelMetric(TQStyle::PM_IndicatorHeight, 0); TQRect rect(0, 0, width, height); - TQColor menuBackgroundColor = (dynamic_cast<TDEStyle*>(&(kapp->style())) == NULL ? TQColor(cg.background()) : cg.background().light(103)); + TQColor menuBackgroundColor = (dynamic_cast<TDEStyle*>(&(tdeApp->style())) == NULL ? TQColor(cg.background()) : cg.background().light(103)); // Enabled, Not hovering TQPixmap pixmap(width, height); @@ -867,7 +867,7 @@ TQIconSet StateMenuItem::checkBoxIconSet(bool checked, TQColorGroup cg) TQPainter painter(&pixmap); int style = TQStyle::Style_Enabled | TQStyle::Style_Active | (checked ? TQStyle::Style_On : TQStyle::Style_Off); TQColor background = cg.color(TQColorGroup::Background); - kapp->style().drawPrimitive(TQStyle::PE_Indicator, &painter, rect, cg, style); + tdeApp->style().drawPrimitive(TQStyle::PE_Indicator, &painter, rect, cg, style); painter.end(); // Enabled, Hovering @@ -876,7 +876,7 @@ TQIconSet StateMenuItem::checkBoxIconSet(bool checked, TQColorGroup cg) painter.begin(&pixmapHover); style |= TQStyle::Style_MouseOver; cg.setColor(TQColorGroup::Background, TDEGlobalSettings::highlightColor()); - kapp->style().drawPrimitive(TQStyle::PE_Indicator, &painter, rect, cg, style); + tdeApp->style().drawPrimitive(TQStyle::PE_Indicator, &painter, rect, cg, style); painter.end(); // Disabled @@ -885,7 +885,7 @@ TQIconSet StateMenuItem::checkBoxIconSet(bool checked, TQColorGroup cg) painter.begin(&pixmapDisabled); style = /*TQStyle::Style_Enabled | */TQStyle::Style_Active | (checked ? TQStyle::Style_On : TQStyle::Style_Off); cg.setColor(TQColorGroup::Background, background); - kapp->style().drawPrimitive(TQStyle::PE_Indicator, &painter, rect, cg, style); + tdeApp->style().drawPrimitive(TQStyle::PE_Indicator, &painter, rect, cg, style); painter.end(); TQIconSet iconSet(pixmap); @@ -896,8 +896,8 @@ TQIconSet StateMenuItem::checkBoxIconSet(bool checked, TQColorGroup cg) TQIconSet StateMenuItem::radioButtonIconSet(bool checked, TQColorGroup cg) { - int width = kapp->style().pixelMetric(TQStyle::PM_ExclusiveIndicatorWidth, 0); - int height = kapp->style().pixelMetric(TQStyle::PM_ExclusiveIndicatorHeight, 0); + int width = tdeApp->style().pixelMetric(TQStyle::PM_ExclusiveIndicatorWidth, 0); + int height = tdeApp->style().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); @@ -906,13 +906,13 @@ TQIconSet StateMenuItem::radioButtonIconSet(bool checked, TQColorGroup cg) pixmap.fill(TQt::red); TQPainter painter(&pixmap); /* We can't use that line of code (like for checkboxes): - * //kapp->style().drawPrimitive(TQStyle::PE_ExclusiveIndicator, &painter, rect, cg, style); + * //tdeApp->style().drawPrimitive(TQStyle::PE_ExclusiveIndicator, &painter, rect, cg, style); * because Plastik (and derived styles) don't care of the TQStyle::Style_On flag and will ALWAYS draw an unchecked radiobutton. * So, we use another method: */ TQRadioButton rb(0); rb.setChecked(checked); - kapp->style().drawControl(TQStyle::CE_RadioButton, &painter, &rb, rect, cg, style); + tdeApp->style().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. @@ -925,10 +925,10 @@ TQIconSet StateMenuItem::radioButtonIconSet(bool checked, TQColorGroup cg) TQPixmap pixmapHover(width, height); pixmapHover.fill(TQt::red); painter.begin(&pixmapHover); - //kapp->style().drawPrimitive(TQStyle::PE_ExclusiveIndicator, &painter, rect, cg, style); + //tdeApp->style().drawPrimitive(TQStyle::PE_ExclusiveIndicator, &painter, rect, cg, style); style |= TQStyle::Style_MouseOver; cg.setColor(TQColorGroup::Background, TDEGlobalSettings::highlightColor()); - kapp->style().drawControl(TQStyle::CE_RadioButton, &painter, &rb, rect, cg, style); + tdeApp->style().drawControl(TQStyle::CE_RadioButton, &painter, &rb, rect, cg, style); painter.end(); pixmapHover.setMask(pixmapHover.createHeuristicMask()); |