mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-08 07:07:05 +02:00
* Disable anti-aliasing, but keep text anti-aliasing, in sidebar.
This commit is contained in:
@@ -567,7 +567,7 @@ PlaylistItemDelegate::drawTrack( QPainter* painter, const QStyleOptionViewItem&
|
|||||||
const track_ptr track = item->query()->track();
|
const track_ptr track = item->query()->track();
|
||||||
|
|
||||||
painter->save();
|
painter->save();
|
||||||
// painter->setRenderHint( QPainter::Antialiasing, true );
|
painter->setRenderHint( QPainter::TextAntialiasing, true );
|
||||||
|
|
||||||
if ( option.state & QStyle::State_Selected )
|
if ( option.state & QStyle::State_Selected )
|
||||||
{
|
{
|
||||||
|
@@ -426,8 +426,6 @@ SourceDelegate::paintCollection( QPainter* painter, const QStyleOptionViewItem&
|
|||||||
|
|
||||||
if ( shouldPaintTrackCount || shouldDrawDropHint )
|
if ( shouldPaintTrackCount || shouldDrawDropHint )
|
||||||
{
|
{
|
||||||
painter->setRenderHint( QPainter::Antialiasing );
|
|
||||||
|
|
||||||
if ( shouldDrawDropHint )
|
if ( shouldDrawDropHint )
|
||||||
{
|
{
|
||||||
QRect figRect = option.rect.adjusted( option.rect.width() - figWidth - iconRectVertMargin, iconRectVertMargin, -iconRectVertMargin, -iconRectVertMargin );
|
QRect figRect = option.rect.adjusted( option.rect.width() - figWidth - iconRectVertMargin, iconRectVertMargin, -iconRectVertMargin, -iconRectVertMargin );
|
||||||
@@ -525,6 +523,7 @@ SourceDelegate::paint( QPainter* painter, const QStyleOptionViewItem& option, co
|
|||||||
QStyleOptionViewItemV4 opt = option;
|
QStyleOptionViewItemV4 opt = option;
|
||||||
|
|
||||||
painter->save();
|
painter->save();
|
||||||
|
painter->setRenderHint( QPainter::TextAntialiasing );
|
||||||
|
|
||||||
SourcesModel::RowType type = static_cast< SourcesModel::RowType >( index.data( SourcesModel::SourceTreeItemTypeRole ).toInt() );
|
SourcesModel::RowType type = static_cast< SourcesModel::RowType >( index.data( SourcesModel::SourceTreeItemTypeRole ).toInt() );
|
||||||
SourceTreeItem* item = index.data( SourcesModel::SourceTreeItemRole ).value< SourceTreeItem* >();
|
SourceTreeItem* item = index.data( SourcesModel::SourceTreeItemRole ).value< SourceTreeItem* >();
|
||||||
@@ -663,7 +662,6 @@ SourceDelegate::paint( QPainter* painter, const QStyleOptionViewItem& option, co
|
|||||||
else if ( type == SourcesModel::Divider )
|
else if ( type == SourcesModel::Divider )
|
||||||
{
|
{
|
||||||
QRect middle = optIndentation.rect.adjusted( 0, 2, 0, -2 );
|
QRect middle = optIndentation.rect.adjusted( 0, 2, 0, -2 );
|
||||||
painter->setRenderHint( QPainter::Antialiasing, false );
|
|
||||||
|
|
||||||
QColor bgcolor = opt.palette.color( QPalette::Base );
|
QColor bgcolor = opt.palette.color( QPalette::Base );
|
||||||
|
|
||||||
@@ -684,7 +682,6 @@ SourceDelegate::paint( QPainter* painter, const QStyleOptionViewItem& option, co
|
|||||||
if ( ii && ii->unlistenedCount() )
|
if ( ii && ii->unlistenedCount() )
|
||||||
{
|
{
|
||||||
painter->save();
|
painter->save();
|
||||||
painter->setRenderHint( QPainter::Antialiasing );
|
|
||||||
|
|
||||||
QString count = QString::number( ii->unlistenedCount() );
|
QString count = QString::number( ii->unlistenedCount() );
|
||||||
int figWidth = QFontMetrics( painter->font() ).width( count );
|
int figWidth = QFontMetrics( painter->font() ).width( count );
|
||||||
|
Reference in New Issue
Block a user