|
|
@ -441,7 +441,7 @@ void DolphinDetailsView::paintEmptyArea(TQPainter* painter, const TQRect& rect)
|
|
|
|
KFileDetailView::paintEmptyArea(painter, rect);
|
|
|
|
KFileDetailView::paintEmptyArea(painter, rect);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
else {
|
|
|
|
const TQBrush brush(tqcolorGroup().background());
|
|
|
|
const TQBrush brush(colorGroup().background());
|
|
|
|
painter->fillRect(rect, brush);
|
|
|
|
painter->fillRect(rect, brush);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -467,7 +467,7 @@ void DolphinDetailsView::drawRubber()
|
|
|
|
point = contentsToViewport(point);
|
|
|
|
point = contentsToViewport(point);
|
|
|
|
tqstyle().tqdrawPrimitive(TQStyle::PE_FocusRect, &p,
|
|
|
|
tqstyle().tqdrawPrimitive(TQStyle::PE_FocusRect, &p,
|
|
|
|
TQRect(point.x(), point.y(), m_rubber->width(), m_rubber->height()),
|
|
|
|
TQRect(point.x(), point.y(), m_rubber->width(), m_rubber->height()),
|
|
|
|
tqcolorGroup(), TQStyle::Style_Default, tqcolorGroup().base());
|
|
|
|
colorGroup(), TQStyle::Style_Default, colorGroup().base());
|
|
|
|
p.end();
|
|
|
|
p.end();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -553,7 +553,7 @@ void DolphinDetailsView::slotAutoScroll()
|
|
|
|
// select all items which intersect with the rubber, deselect all others
|
|
|
|
// select all items which intersect with the rubber, deselect all others
|
|
|
|
bool bottomReached = false;
|
|
|
|
bool bottomReached = false;
|
|
|
|
while ((item != 0) && !bottomReached) {
|
|
|
|
while ((item != 0) && !bottomReached) {
|
|
|
|
TQRect rect(tqitemRect(item));
|
|
|
|
TQRect rect(itemRect(item));
|
|
|
|
rect.setWidth(filenameWidth(item));
|
|
|
|
rect.setWidth(filenameWidth(item));
|
|
|
|
rect = TQRect(viewportToContents(rect.topLeft()),
|
|
|
|
rect = TQRect(viewportToContents(rect.topLeft()),
|
|
|
|
viewportToContents(rect.bottomRight()));
|
|
|
|
viewportToContents(rect.bottomRight()));
|
|
|
@ -710,7 +710,7 @@ DolphinDetailsView::DolphinListViewItem::~DolphinListViewItem()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void DolphinDetailsView::DolphinListViewItem::paintCell(TQPainter* painter,
|
|
|
|
void DolphinDetailsView::DolphinListViewItem::paintCell(TQPainter* painter,
|
|
|
|
const TQColorGroup& tqcolorGroup,
|
|
|
|
const TQColorGroup& colorGroup,
|
|
|
|
int column,
|
|
|
|
int column,
|
|
|
|
int cellWidth,
|
|
|
|
int cellWidth,
|
|
|
|
int tqalignment)
|
|
|
|
int tqalignment)
|
|
|
@ -721,10 +721,10 @@ void DolphinDetailsView::DolphinListViewItem::paintCell(TQPainter* painter,
|
|
|
|
// Per default the selection is drawn above the whole width of the item. As a consistent
|
|
|
|
// Per default the selection is drawn above the whole width of the item. As a consistent
|
|
|
|
// behavior with the icon view is wanted, only the the column containing the file name
|
|
|
|
// behavior with the icon view is wanted, only the the column containing the file name
|
|
|
|
// should be shown as selected.
|
|
|
|
// should be shown as selected.
|
|
|
|
TQColorGroup defaultColorGroup(tqcolorGroup);
|
|
|
|
TQColorGroup defaultColorGroup(colorGroup);
|
|
|
|
const TQColor highlightColor(isActive ? backgroundColor(column) : view->tqcolorGroup().background());
|
|
|
|
const TQColor highlightColor(isActive ? backgroundColor(column) : view->colorGroup().background());
|
|
|
|
defaultColorGroup.setColor(TQColorGroup::Highlight , highlightColor);
|
|
|
|
defaultColorGroup.setColor(TQColorGroup::Highlight , highlightColor);
|
|
|
|
defaultColorGroup.setColor(TQColorGroup::HighlightedText, tqcolorGroup.color(TQColorGroup::Text));
|
|
|
|
defaultColorGroup.setColor(TQColorGroup::HighlightedText, colorGroup.color(TQColorGroup::Text));
|
|
|
|
KFileListViewItem::paintCell(painter, defaultColorGroup, column, cellWidth, tqalignment);
|
|
|
|
KFileListViewItem::paintCell(painter, defaultColorGroup, column, cellWidth, tqalignment);
|
|
|
|
|
|
|
|
|
|
|
|
if (column == 0) {
|
|
|
|
if (column == 0) {
|
|
|
@ -732,19 +732,19 @@ void DolphinDetailsView::DolphinListViewItem::paintCell(TQPainter* painter,
|
|
|
|
TQListView* parent = listView();
|
|
|
|
TQListView* parent = listView();
|
|
|
|
const int itemWidth = width(parent->fontMetrics(), parent, 0);
|
|
|
|
const int itemWidth = width(parent->fontMetrics(), parent, 0);
|
|
|
|
if (isActive) {
|
|
|
|
if (isActive) {
|
|
|
|
KFileListViewItem::paintCell(painter, tqcolorGroup, column, itemWidth, tqalignment);
|
|
|
|
KFileListViewItem::paintCell(painter, colorGroup, column, itemWidth, tqalignment);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
else {
|
|
|
|
TQListViewItem::paintCell(painter, tqcolorGroup, column, itemWidth, tqalignment);
|
|
|
|
TQListViewItem::paintCell(painter, colorGroup, column, itemWidth, tqalignment);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
else {
|
|
|
|
if (isActive) {
|
|
|
|
if (isActive) {
|
|
|
|
KFileListViewItem::paintCell(painter, tqcolorGroup, column, cellWidth, tqalignment);
|
|
|
|
KFileListViewItem::paintCell(painter, colorGroup, column, cellWidth, tqalignment);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
else {
|
|
|
|
TQListViewItem::paintCell(painter, tqcolorGroup, column, cellWidth, tqalignment);
|
|
|
|
TQListViewItem::paintCell(painter, colorGroup, column, cellWidth, tqalignment);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -756,7 +756,7 @@ void DolphinDetailsView::DolphinListViewItem::paintCell(TQPainter* painter,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void DolphinDetailsView::DolphinListViewItem::paintFocus(TQPainter* painter,
|
|
|
|
void DolphinDetailsView::DolphinListViewItem::paintFocus(TQPainter* painter,
|
|
|
|
const TQColorGroup& tqcolorGroup,
|
|
|
|
const TQColorGroup& colorGroup,
|
|
|
|
const TQRect& rect)
|
|
|
|
const TQRect& rect)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
// draw the focus consistently with the selection (see implementation notes
|
|
|
|
// draw the focus consistently with the selection (see implementation notes
|
|
|
@ -771,7 +771,7 @@ void DolphinDetailsView::DolphinListViewItem::paintFocus(TQPainter* painter,
|
|
|
|
TQRect focusRect(rect);
|
|
|
|
TQRect focusRect(rect);
|
|
|
|
focusRect.setWidth(visibleWidth);
|
|
|
|
focusRect.setWidth(visibleWidth);
|
|
|
|
|
|
|
|
|
|
|
|
KFileListViewItem::paintFocus(painter, tqcolorGroup, focusRect);
|
|
|
|
KFileListViewItem::paintFocus(painter, colorGroup, focusRect);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
int DolphinDetailsView::filenameWidth(const TQListViewItem* item) const
|
|
|
|
int DolphinDetailsView::filenameWidth(const TQListViewItem* item) const
|
|
|
|