]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/kitemviews/kstandarditemlistwidget.h
Fix wrong text color in places and in folders panel.
[dolphin.git] / src / kitemviews / kstandarditemlistwidget.h
index 90a6f505562a7c744cda12acd69a083ad3bc5f46..f559f3d223527e6511b1a66a973a17185bca8cf9 100644 (file)
@@ -115,6 +115,13 @@ protected:
      */
     virtual bool isHidden() const;
 
+    /**
+     * @return A font based on baseFont which is customized according to the data shown in the widget.
+     */
+    virtual QFont customizedFont(const QFont& baseFont) const;
+
+    virtual QPalette::ColorRole normalTextColorPalette() const;
+
     void setTextColor(const QColor& color);
     QColor textColor() const;
 
@@ -160,9 +167,13 @@ private:
 
     QRectF roleEditingRect(const QByteArray &role) const;
 
+    /**
+     * Closes the role editor and returns the focus back
+     * to the KItemListContainer.
+     */
+    void closeRoleEditor();
+
     static QPixmap pixmapForIcon(const QString& name, int size);
-    static void applyCutEffect(QPixmap& pixmap);
-    static void applyHiddenEffect(QPixmap& pixmap);
 
     /**
      * @return Preferred size of the rating-image based on the given
@@ -180,6 +191,8 @@ private:
 private:
     bool m_isCut;
     bool m_isHidden;
+    QFont m_customizedFont;
+    QFontMetrics m_customizedFontMetrics;
     bool m_isExpandable;
     bool m_supportsItemExpanding;