File indexing completed on 2024-04-21 16:22:51
0001 /* 0002 * SPDX-FileCopyrightText: 2009 Rafael Fernández López <ereslibre@kde.org> 0003 * 0004 * SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #include "CategoryDrawer.h" 0008 0009 #include "MenuProxyModel.h" 0010 0011 #include <QApplication> 0012 #include <QPainter> 0013 #include <QStyleOption> 0014 0015 CategoryDrawer::CategoryDrawer(KCategorizedView *view) 0016 : KCategoryDrawer(view) 0017 { 0018 } 0019 0020 void CategoryDrawer::drawCategory(const QModelIndex &index, int sortRole, const QStyleOption &option, QPainter *painter) const 0021 { 0022 QStyleOption copy = option; 0023 copy.palette.setBrush(QPalette::Window, option.palette.base()); 0024 KCategoryDrawer::drawCategory(index, sortRole, copy, painter); 0025 }