Changeset 268d58f


Ignore:
Timestamp:
07/13/11 23:18:58 (10 years ago)
Author:
Philipp Spitzer <philipp@…>
Branches:
master, qt5
Children:
84c94b3
Parents:
a4ed73e
Message:

First try to improve the colors (ticket #13).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/mvc/delegate.cpp

    ra4ed73e r268d58f  
    5656
    5757    painter->save();
    58     QColor bkgrColor = Qt::cyan;
     58    QColor bkgrColor = option.palette.color(QPalette::Background);
    5959    //QColor bkgrColor = QColor(0xAA,0xAA,0xAA);
    6060    QColor conflictColor = Qt::yellow;
    6161
    62     QPen borderPen(bkgrColor.darker());
     62    QColor textColor = option.palette.color(QPalette::Text);
     63    QPen borderPen(textColor);
    6364    if(hasParent(index))
    6465    {
    65         // entry horisontal layout:
     66        // entry horizontal layout:
    6667        // * spacer (aka y position of image)
    6768        // * image
     
    9697
    9798        QLinearGradient itemGradient(option.rect.topLeft(), option.rect.bottomLeft());
    98         itemGradient.setColorAt(0.0, Qt::white);
    99         itemGradient.setColorAt(0.25, bkgrColor);
    100         itemGradient.setColorAt(0.5, bkgrColor);
    101         itemGradient.setColorAt(0.75, bkgrColor);
    102         itemGradient.setColorAt(1.0, Qt::white);
     99        itemGradient.setColorAt(0.0, bkgrColor);
     100        itemGradient.setColorAt(1.0, bkgrColor);
    103101
    104102        if(isLast(index))
     
    204202
    205203        QLinearGradient titleGradient(option.rect.topLeft(), option.rect.topRight());
    206         //titleGradient.setColorAt(0.0, Qt::white);
     204        bkgrColor = option.palette.color(QPalette::Highlight);
     205        textColor = option.palette.color(QPalette::HighlightedText);
    207206        titleGradient.setColorAt(0.0, bkgrColor);
    208         titleGradient.setColorAt(0.5, Qt::white);
    209207        titleGradient.setColorAt(1.0, bkgrColor);
    210208
     
    237235        painter->drawPath(titlePath);
    238236
    239         // draw icons
     237        // draw icons
     238        borderPen.setColor(textColor);
     239        painter->setPen(borderPen);
    240240        painter->setFont(fontSmall);
    241241        QImage *image = mControls[FavouriteControlOn]->image();
Note: See TracChangeset for help on using the changeset viewer.