[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdelibs/kfile
From: Rafael Fernández López <ereslibre () kde ! org>
Date: 2007-12-07 8:11:48
Message-ID: 1197015108.989827.28351.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 745896 by ereslibre:
Don't "cache" the palette at the beginning. The color scheme can change while the \
dialog is opened, and the view should be adapted to that change.
CCMAIL: kde-core-devel@kde.org
CCMAIL: peter.penz@gmx.at
M +8 -11 kdiroperator.cpp
--- trunk/KDE/kdelibs/kfile/kdiroperator.cpp #745895:745896
@@ -92,9 +92,6 @@
virtual QStyleOptionViewItem viewOptions() const;
virtual void dragEnterEvent(QDragEnterEvent* event);
virtual void mousePressEvent(QMouseEvent *event);
-
-private:
- QStyleOptionViewItem m_viewOptions;
};
KDirOperatorIconView::KDirOperatorIconView(QWidget *parent) :
@@ -109,13 +106,7 @@
setVerticalScrollMode(QListView::ScrollPerPixel);
setHorizontalScrollMode(QListView::ScrollPerPixel);
- m_viewOptions = QListView::viewOptions();
- m_viewOptions.showDecorationSelected = true;
- m_viewOptions.decorationPosition = QStyleOptionViewItem::Left;
- m_viewOptions.displayAlignment = Qt::AlignLeft | Qt::AlignVCenter;
- m_viewOptions.decorationSize = QSize(KIconLoader::SizeSmall, \
KIconLoader::SizeSmall);
-
- QFontMetrics metrics(m_viewOptions.font);
+ QFontMetrics metrics(viewOptions().font);
const int fontHeight = metrics.height();
setGridSize(QSize(fontHeight * 10, fontHeight + 4));
}
@@ -126,7 +117,13 @@
QStyleOptionViewItem KDirOperatorIconView::viewOptions() const
{
- return m_viewOptions;
+ QStyleOptionViewItem viewOptions = QListView::viewOptions();
+ viewOptions.showDecorationSelected = true;
+ viewOptions.decorationPosition = QStyleOptionViewItem::Left;
+ viewOptions.displayAlignment = Qt::AlignLeft | Qt::AlignVCenter;
+ viewOptions.decorationSize = QSize(KIconLoader::SizeSmall, \
KIconLoader::SizeSmall); +
+ return viewOptions;
}
void KDirOperatorIconView::dragEnterEvent(QDragEnterEvent* event)
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic