Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 723436
Collapse All | Expand All

(-)kdiff3-1.8.2/src/directorymergewindow.cpp (-6 / +9 lines)
Lines 584-590 Link Here
584
            //QPixmap icon = value.value<QPixmap>(); //pixmap(column);
584
            //QPixmap icon = value.value<QPixmap>(); //pixmap(column);
585
            if(!icon.isNull())
585
            if(!icon.isNull())
586
            {
586
            {
587
                int yOffset = (sizeHint(option, index).height() - icon.height()) / 2;
587
                const auto dpr = thePainter->device()->devicePixelRatioF();
588
                const int w = qRound(icon.width() / dpr);
589
                const int h = qRound(icon.height() / dpr);
590
                int yOffset = (sizeHint(option, index).height() - h) / 2;
588
                thePainter->drawPixmap(x + 2, y + yOffset, icon);
591
                thePainter->drawPixmap(x + 2, y + yOffset, icon);
589
592
590
                int i = index == d->m_selection1Index ? 1 : index == d->m_selection2Index ? 2 : index == d->m_selection3Index ? 3 : 0;
593
                int i = index == d->m_selection1Index ? 1 : index == d->m_selection2Index ? 2 : index == d->m_selection3Index ? 3 : 0;
Lines 593-612 Link Here
593
                    Options* pOpts = d->m_pOptions;
596
                    Options* pOpts = d->m_pOptions;
594
                    QColor c(i == 1 ? pOpts->m_colorA : i == 2 ? pOpts->m_colorB : pOpts->m_colorC);
597
                    QColor c(i == 1 ? pOpts->m_colorA : i == 2 ? pOpts->m_colorB : pOpts->m_colorC);
595
                    thePainter->setPen(c); // highlight() );
598
                    thePainter->setPen(c); // highlight() );
596
                    thePainter->drawRect(x + 2, y + yOffset, icon.width(), icon.height());
599
                    thePainter->drawRect(x + 2, y + yOffset, w, h);
597
                    thePainter->setPen(QPen(c, 0, Qt::DotLine));
600
                    thePainter->setPen(QPen(c, 0, Qt::DotLine));
598
                    thePainter->drawRect(x + 1, y + yOffset - 1, icon.width() + 2, icon.height() + 2);
601
                    thePainter->drawRect(x + 1, y + yOffset - 1, w + 2, h + 2);
599
                    thePainter->setPen(Qt::white);
602
                    thePainter->setPen(Qt::white);
600
                    QString s(QChar('A' + i - 1));
603
                    QString s(QChar('A' + i - 1));
601
604
602
                    thePainter->drawText(x + 2 + (icon.width() - Utils::getHorizontalAdvance(thePainter->fontMetrics(), s)) / 2,
605
                    thePainter->drawText(x + 2 + (w - Utils::getHorizontalAdvance(thePainter->fontMetrics(), s)) / 2,
603
                                y + yOffset + (icon.height() + thePainter->fontMetrics().ascent()) / 2 - 1,
606
                                y + yOffset + (h + thePainter->fontMetrics().ascent()) / 2 - 1,
604
                                s);
607
                                s);
605
                }
608
                }
606
                else
609
                else
607
                {
610
                {
608
                    thePainter->setPen(m_pDMW->palette().window().color());
611
                    thePainter->setPen(m_pDMW->palette().window().color());
609
                    thePainter->drawRect(x + 1, y + yOffset - 1, icon.width() + 2, icon.height() + 2);
612
                    thePainter->drawRect(x + 1, y + yOffset - 1, w + 2, h + 2);
610
                }
613
                }
611
                return;
614
                return;
612
            }
615
            }
(-)kdiff3-1.8.2/src/main.cpp (+1 lines)
Lines 80-85 Link Here
80
{
80
{
81
    const QLatin1String appName("kdiff3");
81
    const QLatin1String appName("kdiff3");
82
82
83
    QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
83
    QApplication app(argc, argv); // KAboutData and QCommandLineParser depend on this being setup.
84
    QApplication app(argc, argv); // KAboutData and QCommandLineParser depend on this being setup.
84
    KLocalizedString::setApplicationDomain(appName.data());
85
    KLocalizedString::setApplicationDomain(appName.data());
85
86
(-)kdiff3-1.8.2/src/mergeresultwindow.cpp (-2 / +5 lines)
Lines 1970-1977 Link Here
1970
    if(!m_bCursorUpdate) // Don't redraw everything for blinking cursor?
1970
    if(!m_bCursorUpdate) // Don't redraw everything for blinking cursor?
1971
    {
1971
    {
1972
        m_selection.bSelectionContainsData = false;
1972
        m_selection.bSelectionContainsData = false;
1973
        if(size() != m_pixmap.size())
1973
        const auto dpr = devicePixelRatioF();
1974
            m_pixmap = QPixmap(size());
1974
        if(size() * dpr != m_pixmap.size()){
1975
            m_pixmap = QPixmap(size() * dpr);
1976
            m_pixmap.setDevicePixelRatio(devicePixelRatioF());
1977
        }
1975
1978
1976
        RLPainter p(&m_pixmap, m_pOptions->m_bRightToLeftLanguage, width(), fontWidth);
1979
        RLPainter p(&m_pixmap, m_pOptions->m_bRightToLeftLanguage, width(), fontWidth);
1977
        p.setFont(font());
1980
        p.setFont(font());
(-)kdiff3-1.8.2/src/Overview.cpp (-2 / +4 lines)
Lines 271-277 Link Here
271
    int h = height() - 1;
271
    int h = height() - 1;
272
    int w = width();
272
    int w = width();
273
273
274
    if(m_pixmap.size() != size())
274
    const auto dpr = devicePixelRatioF();
275
    if(m_pixmap.size() != size() * dpr)
275
    {
276
    {
276
        if(m_pOptions->m_bWordWrap)
277
        if(m_pOptions->m_bWordWrap)
277
        {
278
        {
Lines 287-293 Link Here
287
            m_nofLines = m_pDiff3LineList->size();
288
            m_nofLines = m_pDiff3LineList->size();
288
        }
289
        }
289
290
290
        m_pixmap = QPixmap(size());
291
        m_pixmap = QPixmap(size() * dpr);
292
        m_pixmap.setDevicePixelRatio(dpr);
291
293
292
        QPainter p(&m_pixmap);
294
        QPainter p(&m_pixmap);
293
        p.fillRect(rect(), m_pOptions->m_bgColor);
295
        p.fillRect(rect(), m_pOptions->m_bgColor);

Return to bug 723436