|
|
@ -37,7 +37,7 @@ ViewTreeItem::ViewTreeItem(TQListView* parent, const TQString& name, ChatWindow*
|
|
|
|
setView(view);
|
|
|
|
setView(view);
|
|
|
|
setViewType(view->getType());
|
|
|
|
setViewType(view->getType());
|
|
|
|
|
|
|
|
|
|
|
|
m_color = KGlobalSettings::textColor();
|
|
|
|
m_color = TDEGlobalSettings::textColor();
|
|
|
|
m_customColorSet = false;
|
|
|
|
m_customColorSet = false;
|
|
|
|
|
|
|
|
|
|
|
|
setOpen(true);
|
|
|
|
setOpen(true);
|
|
|
@ -66,7 +66,7 @@ ViewTreeItem::ViewTreeItem(TQListViewItem* parent, const TQString& name, ChatWin
|
|
|
|
setView(view);
|
|
|
|
setView(view);
|
|
|
|
setViewType(view->getType());
|
|
|
|
setViewType(view->getType());
|
|
|
|
|
|
|
|
|
|
|
|
m_color = KGlobalSettings::textColor();
|
|
|
|
m_color = TDEGlobalSettings::textColor();
|
|
|
|
m_customColorSet = false;
|
|
|
|
m_customColorSet = false;
|
|
|
|
|
|
|
|
|
|
|
|
setOpen(true);
|
|
|
|
setOpen(true);
|
|
|
@ -91,7 +91,7 @@ ViewTreeItem::ViewTreeItem(TQListViewItem* parent, TQListViewItem* afterItem, co
|
|
|
|
setView(view);
|
|
|
|
setView(view);
|
|
|
|
setViewType(view->getType());
|
|
|
|
setViewType(view->getType());
|
|
|
|
|
|
|
|
|
|
|
|
m_color = KGlobalSettings::textColor();
|
|
|
|
m_color = TDEGlobalSettings::textColor();
|
|
|
|
m_customColorSet = false;
|
|
|
|
m_customColorSet = false;
|
|
|
|
|
|
|
|
|
|
|
|
setOpen(true);
|
|
|
|
setOpen(true);
|
|
|
@ -184,7 +184,7 @@ TQColor ViewTreeItem::getColor() const
|
|
|
|
if (Preferences::inputFieldsBackgroundColor())
|
|
|
|
if (Preferences::inputFieldsBackgroundColor())
|
|
|
|
return Preferences::color(Preferences::ChannelMessage);
|
|
|
|
return Preferences::color(Preferences::ChannelMessage);
|
|
|
|
else
|
|
|
|
else
|
|
|
|
return KGlobalSettings::textColor();
|
|
|
|
return TDEGlobalSettings::textColor();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
return m_color;
|
|
|
|
return m_color;
|
|
|
@ -341,16 +341,16 @@ void ViewTreeItem::paintCell(TQPainter* p, const TQColorGroup& /* cg */, int /*
|
|
|
|
TQPixmap buffer(width, height());
|
|
|
|
TQPixmap buffer(width, height());
|
|
|
|
TQPainter painter(&buffer);
|
|
|
|
TQPainter painter(&buffer);
|
|
|
|
|
|
|
|
|
|
|
|
TQColor textColor = isSelected() ? KGlobalSettings::highlightedTextColor() : getColor();
|
|
|
|
TQColor textColor = isSelected() ? TDEGlobalSettings::highlightedTextColor() : getColor();
|
|
|
|
TQColor background = isSelected() ? KGlobalSettings::highlightColor() : listView()->paletteBackgroundColor();
|
|
|
|
TQColor background = isSelected() ? TDEGlobalSettings::highlightColor() : listView()->paletteBackgroundColor();
|
|
|
|
if (m_isHighlighted) background = Preferences::inputFieldsBackgroundColor()
|
|
|
|
if (m_isHighlighted) background = Preferences::inputFieldsBackgroundColor()
|
|
|
|
? Preferences::color(Preferences::AlternateBackground) : KGlobalSettings::alternateBackgroundColor();
|
|
|
|
? Preferences::color(Preferences::AlternateBackground) : TDEGlobalSettings::alternateBackgroundColor();
|
|
|
|
|
|
|
|
|
|
|
|
// Fill in background.
|
|
|
|
// Fill in background.
|
|
|
|
painter.fillRect(0, 0, width, height(), background);
|
|
|
|
painter.fillRect(0, 0, width, height(), background);
|
|
|
|
|
|
|
|
|
|
|
|
TQColor bgColor = listView()->paletteBackgroundColor();
|
|
|
|
TQColor bgColor = listView()->paletteBackgroundColor();
|
|
|
|
TQColor selColor = m_isHighlighted ? background : KGlobalSettings::highlightColor();
|
|
|
|
TQColor selColor = m_isHighlighted ? background : TDEGlobalSettings::highlightColor();
|
|
|
|
TQColor midColor = mixColor(bgColor, selColor);
|
|
|
|
TQColor midColor = mixColor(bgColor, selColor);
|
|
|
|
|
|
|
|
|
|
|
|
int iconWidth = pixmap(0) ? LED_ICON_SIZE : 0;
|
|
|
|
int iconWidth = pixmap(0) ? LED_ICON_SIZE : 0;
|
|
|
@ -411,7 +411,7 @@ void ViewTreeItem::paintCell(TQPainter* p, const TQColorGroup& /* cg */, int /*
|
|
|
|
|
|
|
|
|
|
|
|
if (m_isHighlighted)
|
|
|
|
if (m_isHighlighted)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
selColor = KGlobalSettings::highlightColor();
|
|
|
|
selColor = TDEGlobalSettings::highlightColor();
|
|
|
|
midColor = mixColor(bgColor, selColor);
|
|
|
|
midColor = mixColor(bgColor, selColor);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -479,7 +479,7 @@ void ViewTreeItem::paintCell(TQPainter* p, const TQColorGroup& /* cg */, int /*
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
|
TQColor lineColor = Preferences::inputFieldsBackgroundColor()
|
|
|
|
TQColor lineColor = Preferences::inputFieldsBackgroundColor()
|
|
|
|
? Preferences::color(Preferences::AlternateBackground) : KGlobalSettings::alternateBackgroundColor();
|
|
|
|
? Preferences::color(Preferences::AlternateBackground) : TDEGlobalSettings::alternateBackgroundColor();
|
|
|
|
painter.setPen(lineColor);
|
|
|
|
painter.setPen(lineColor);
|
|
|
|
painter.drawLine(0, 5, width, 5);
|
|
|
|
painter.drawLine(0, 5, width, 5);
|
|
|
|
}
|
|
|
|
}
|
|
|
|