mirror of
https://invent.kde.org/system/dolphin
synced 2024-09-19 16:31:21 +00:00
Forgot to adapt to RTL the default category drawer (KCategoryDrawer), since right now it is fully overriden by dolphincategorydrawer. Unneeded commented code
removed from the latter svn path=/trunk/KDE/kdebase/apps/; revision=713320
This commit is contained in:
parent
c8072005fa
commit
b7e3077a9d
|
@ -211,14 +211,12 @@ void DolphinCategoryDrawer::drawCategory(const QModelIndex &index, int sortRole,
|
|||
if (option.direction == Qt::RightToLeft)
|
||||
{
|
||||
starRect.setLeft(starRect.left() + (iconSize / 2) /* separator between stars */);
|
||||
//starRect.setRight(starRect.right() + (iconSize / 2) /* separator between stars */);
|
||||
}
|
||||
|
||||
starRect.setTop(option.rect.top() + (option.rect.height() / 2) - (iconSize / 4));
|
||||
starRect.setSize(QSize(iconSize / 2, iconSize / 2));
|
||||
painter->drawPixmap(starRect, smallPixmap);
|
||||
starRect.setTop(opt.rect.top() + (option.rect.height() / 2) - (iconSize / 2));
|
||||
//starRect.setSize(QSize(iconSize / 2, iconSize / 2));
|
||||
|
||||
if (option.direction == Qt::LeftToRight)
|
||||
{
|
||||
|
|
|
@ -82,8 +82,10 @@ void KCategoryDrawer::drawCategory(const QModelIndex &index,
|
|||
|
||||
QLinearGradient gradient(option.rect.topLeft(),
|
||||
option.rect.bottomRight());
|
||||
gradient.setColorAt(0, color);
|
||||
gradient.setColorAt(1, Qt::transparent);
|
||||
gradient.setColorAt(option.direction == Qt::LeftToRight ? 0
|
||||
: 1, color);
|
||||
gradient.setColorAt(option.direction == Qt::LeftToRight ? 1
|
||||
: 0, Qt::transparent);
|
||||
|
||||
painter->setBrush(gradient);
|
||||
painter->fillPath(path, gradient);
|
||||
|
|
Loading…
Reference in a new issue