diff --git qt5/style/qtcurve.cpp qt5/style/qtcurve.cpp
index 1e17882..f70e1cb 100644
|
|
|
98 | 98 | |
99 | 99 | namespace QtCurve { |
100 | 100 | |
| 101 | static inline void setPainterPen(QPainter *p, const QColor &col, const qreal width=1.0) |
| 102 | { |
| 103 | p->setPen(QPen(col, width)); |
| 104 | } |
| 105 | |
101 | 106 | static Style::Icon |
102 | 107 | pix2Icon(QStyle::StandardPixmap pix) |
103 | 108 | { |
… |
… |
Style::drawFadedLine(QPainter *p, const QRect &r, const QColor &col, |
1193 | 1198 | if(fadeSizeEnd>=0 && fadeSizeEnd<=1.0) |
1194 | 1199 | grad.setColorAt(1.0-fadeSizeEnd, col); |
1195 | 1200 | grad.setColorAt(1, fadeEnd && opts.fadeLines ? fade : col); |
1196 | | p->setPen(QPen(QBrush(grad), 1)); |
| 1201 | p->setPen(QPen(QBrush(grad), QPENWIDTH1)); |
1197 | 1202 | } |
1198 | 1203 | else |
1199 | 1204 | p->setPen(col); |
… |
… |
void Style::drawLines(QPainter *p, const QRect &r, bool horiz, int nLines, int o |
1211 | 1216 | x2(r.x()+r.width()-1), |
1212 | 1217 | y2(r.y()+r.height()-1), |
1213 | 1218 | i; |
1214 | | QPen dp(cols[dark], 1), |
1215 | | lp(cols[0], 1); |
| 1219 | QPen dp(cols[dark], QPENWIDTH1), |
| 1220 | lp(cols[0], QPENWIDTH1); |
1216 | 1221 | |
1217 | 1222 | if(opts.fadeLines && (horiz ? r.width() : r.height())>16) |
1218 | 1223 | { |
… |
… |
void Style::drawLines(QPainter *p, const QRect &r, bool horiz, int nLines, int o |
1225 | 1230 | grad.setColorAt(0.6, cols[dark]); |
1226 | 1231 | grad.setColorAt(1, fade); |
1227 | 1232 | |
1228 | | dp=QPen(QBrush(grad), 1); |
| 1233 | dp=QPen(QBrush(grad), QPENWIDTH1); |
1229 | 1234 | |
1230 | 1235 | if(LINE_FLAT!=type) |
1231 | 1236 | { |
… |
… |
void Style::drawLines(QPainter *p, const QRect &r, bool horiz, int nLines, int o |
1236 | 1241 | grad.setColorAt(0.4, cols[0]); |
1237 | 1242 | grad.setColorAt(0.6, cols[0]); |
1238 | 1243 | grad.setColorAt(1, fade); |
1239 | | lp=QPen(QBrush(grad), 1); |
| 1244 | lp=QPen(QBrush(grad), QPENWIDTH1); |
1240 | 1245 | } |
1241 | 1246 | } |
1242 | 1247 | |
… |
… |
Style::drawLightBevel(QPainter *p, const QRect &r, const QStyleOption *option, |
1613 | 1618 | round, (int)realRound, pixSize.width(), pixSize.height(), |
1614 | 1619 | state, fill.rgba(), (int)(radius * 100)); |
1615 | 1620 | if (!m_usePixmapCache || !QPixmapCache::find(key, pix)) { |
1616 | | const float scale = ((int(pixSize.width() * 1.2) + 1.0) / |
1617 | | pixSize.width()); |
1618 | | pix = QPixmap(pixSize * scale); |
| 1621 | pix = QPixmap(pixSize); |
1619 | 1622 | pix.fill(Qt::transparent); |
1620 | 1623 | |
1621 | 1624 | QPainter pixPainter(&pix); |
1622 | | pixPainter.scale(scale, scale); |
1623 | 1625 | ERound oldRound = opts.round; |
1624 | 1626 | opts.round = realRound; |
| 1627 | pixPainter.setRenderHint(QPainter::Antialiasing, true); |
1625 | 1628 | drawLightBevelReal(&pixPainter, QRect(0, 0, pixSize.width(), |
1626 | 1629 | pixSize.height()), option, |
1627 | 1630 | widget, round, fill, custom, doBorder, w, |
1628 | 1631 | false, realRound, onToolbar); |
1629 | 1632 | opts.round = oldRound; |
1630 | 1633 | pixPainter.end(); |
1631 | | pix = pix.scaled(pixSize); |
1632 | 1634 | |
1633 | 1635 | if (m_usePixmapCache) { |
1634 | 1636 | QPixmapCache::insert(key, pix); |
… |
… |
Style::drawLightBevelReal(QPainter *p, const QRect &rOrig, |
1770 | 1772 | bool horizontal((horiz && WIDGET_SB_BUTTON!=w)|| (!horiz && WIDGET_SB_BUTTON==w)), |
1771 | 1773 | thin(WIDGET_SB_BUTTON==w || WIDGET_SPIN==w || ((horiz ? r.height() : r.width())<16)); |
1772 | 1774 | |
1773 | | p->setPen(m_mouseOverCols[MO_PLASTIK_DARK(w)]); |
| 1775 | setPainterPen(p, m_mouseOverCols[MO_PLASTIK_DARK(w)], QPENWIDTH1); |
1774 | 1776 | if(horizontal) |
1775 | 1777 | { |
1776 | 1778 | drawAaLine(p, r.x()+1, r.y()+1, r.x()+r.width()-2, r.y()+1); |
… |
… |
Style::drawLightBevelReal(QPainter *p, const QRect &rOrig, |
1783 | 1785 | } |
1784 | 1786 | if(!thin) |
1785 | 1787 | { |
1786 | | p->setPen(m_mouseOverCols[MO_PLASTIK_LIGHT(w)]); |
| 1788 | setPainterPen(p, m_mouseOverCols[MO_PLASTIK_LIGHT(w)], QPENWIDTH1); |
1787 | 1789 | if(horizontal) |
1788 | 1790 | { |
1789 | 1791 | drawAaLine(p, r.x()+1, r.y()+2, r.x()+r.width()-2, r.y()+2); |
… |
… |
Style::drawLightBevelReal(QPainter *p, const QRect &rOrig, |
1889 | 1891 | } |
1890 | 1892 | |
1891 | 1893 | if (!colouredMouseOver && lightBorder) { |
1892 | | p->setPen(cols[LIGHT_BORDER(app)]); |
| 1894 | setPainterPen(p, cols[LIGHT_BORDER(app)], QPENWIDTH1); |
1893 | 1895 | p->drawPath(buildPath(r, w, round, |
1894 | 1896 | qtcGetRadius(&opts, r.width(), |
1895 | 1897 | r.height(), w, RADIUS_INTERNAL))); |
… |
… |
Style::drawLightBevelReal(QPainter *p, const QRect &rOrig, |
1901 | 1903 | buildSplitPath(r, round, qtcGetRadius(&opts, r.width(), r.height(), w, RADIUS_INTERNAL), |
1902 | 1904 | innerTlPath, innerBrPath); |
1903 | 1905 | |
1904 | | p->setPen(border[colouredMouseOver ? MO_STD_LIGHT(w, sunken) : (sunken ? dark : 0)]); |
| 1906 | setPainterPen(p, border[colouredMouseOver ? MO_STD_LIGHT(w, sunken) : (sunken ? dark : 0)], QPENWIDTH1); |
1905 | 1907 | p->drawPath(innerTlPath); |
1906 | 1908 | if(colouredMouseOver || bevelledButton || draw3dfull) |
1907 | 1909 | { |
1908 | | p->setPen(border[colouredMouseOver ? MO_STD_DARK(w) : (sunken ? 0 : dark)]); |
| 1910 | setPainterPen(p, border[colouredMouseOver ? MO_STD_DARK(w) : (sunken ? 0 : dark)], QPENWIDTH1); |
1909 | 1911 | p->drawPath(innerBrPath); |
1910 | 1912 | } |
1911 | 1913 | } |
… |
… |
void Style::drawGlow(QPainter *p, const QRect &r, EWidget w, const QColor *cols) |
1967 | 1969 | col.setAlphaF(GLOW_ALPHA(defShade)); |
1968 | 1970 | p->setBrush(Qt::NoBrush); |
1969 | 1971 | p->setRenderHint(QPainter::Antialiasing, true); |
1970 | | p->setPen(col); |
| 1972 | setPainterPen(p, col, QPENWIDTH1); |
1971 | 1973 | p->drawPath(buildPath(r, w, ROUNDED_ALL, qtcGetRadius(&opts, r.width(), r.height(), w, RADIUS_ETCH))); |
1972 | 1974 | p->setRenderHint(QPainter::Antialiasing, QPAINTER_ANTIALIAS_MAYBE_ON); |
1973 | 1975 | } |
… |
… |
void Style::drawEtch(QPainter *p, const QRect &r, const QWidget *widget, EWidge |
1986 | 1988 | col.setAlphaF(USE_CUSTOM_ALPHAS(opts) ? opts.customAlphas[ALPHA_ETCH_DARK] : ETCH_TOP_ALPHA); |
1987 | 1989 | p->setBrush(Qt::NoBrush); |
1988 | 1990 | p->setRenderHint(QPainter::Antialiasing, true); |
1989 | | p->setPen(col); |
| 1991 | setPainterPen(p, col, QPENWIDTH1); |
1990 | 1992 | |
1991 | 1993 | if(!raised && WIDGET_SLIDER!=w) |
1992 | 1994 | { |
… |
… |
void Style::drawEtch(QPainter *p, const QRect &r, const QWidget *widget, EWidge |
1995 | 1997 | { |
1996 | 1998 | QColor col(Qt::white); |
1997 | 1999 | col.setAlphaF(USE_CUSTOM_ALPHAS(opts) ? opts.customAlphas[ALPHA_ETCH_LIGHT] : ETCH_BOTTOM_ALPHA); // 0.25); |
1998 | | p->setPen(col); |
| 2000 | setPainterPen(p, col, QPENWIDTH1); |
1999 | 2001 | } |
2000 | 2002 | else |
2001 | | p->setPen(getLowerEtchCol(widget)); |
| 2003 | setPainterPen(p, getLowerEtchCol(widget), QPENWIDTH1); |
2002 | 2004 | } |
2003 | 2005 | |
2004 | 2006 | p->drawPath(br); |
… |
… |
void Style::drawBgndRing(QPainter &painter, int x, int y, int size, int size2, b |
2012 | 2014 | QColor col(Qt::white); |
2013 | 2015 | |
2014 | 2016 | col.setAlphaF(RINGS_INNER_ALPHA(isWindow ? opts.bgndImage.type : opts.menuBgndImage.type)); |
| 2017 | if (width == 1) { |
| 2018 | width = QPENWIDTH1; |
| 2019 | } |
2015 | 2020 | painter.setPen(QPen(col, width)); |
2016 | 2021 | painter.drawEllipse(QRectF(x+width2, y+width2, size-width, size-width)); |
2017 | 2022 | |
2018 | 2023 | if(IMG_BORDERED_RINGS==(isWindow ? opts.bgndImage.type : opts.menuBgndImage.type)) |
2019 | 2024 | { |
2020 | 2025 | col.setAlphaF(RINGS_OUTER_ALPHA); |
2021 | | painter.setPen(QPen(col, 1)); |
| 2026 | painter.setPen(QPen(col, QPENWIDTH1)); |
2022 | 2027 | painter.drawEllipse(QRectF(x, y, size, size)); |
2023 | 2028 | if(size2) |
2024 | 2029 | painter.drawEllipse(QRectF(x+width, y+width, size2, size2)); |
… |
… |
QPixmap Style::drawStripes(const QColor &color, int opacity) const |
2048 | 2053 | if(100!=opacity) |
2049 | 2054 | { |
2050 | 2055 | col2.setAlphaF(opacity/100.0); |
2051 | | pixPainter.setPen(col); |
| 2056 | pixPainter.setPen(QPen(col, QPENWIDTH1)); |
2052 | 2057 | for(int i=0; i<pix.height(); i+=4) |
2053 | 2058 | pixPainter.drawLine(0, i, pix.width()-1, i); |
2054 | 2059 | } |
2055 | 2060 | else |
2056 | 2061 | pixPainter.fillRect(pix.rect(), col); |
2057 | | pixPainter.setPen(QColor((3*col.red()+col2.red())/4, |
| 2062 | pixPainter.setPen(QPen(QColor((3*col.red()+col2.red())/4, |
2058 | 2063 | (3*col.green()+col2.green())/4, |
2059 | 2064 | (3*col.blue()+col2.blue())/4, |
2060 | | 100!=opacity ? col2.alpha() : 255)); |
| 2065 | 100!=opacity ? col2.alpha() : 255), QPENWIDTH1)); |
2061 | 2066 | |
2062 | 2067 | for(int i=1; i<pix.height(); i+=4) |
2063 | 2068 | { |
2064 | 2069 | pixPainter.drawLine(0, i, pix.width()-1, i); |
2065 | 2070 | pixPainter.drawLine(0, i+2, pix.width()-1, i+2); |
2066 | 2071 | } |
2067 | | pixPainter.setPen(col2); |
| 2072 | pixPainter.setPen(QPen(col2, QPENWIDTH1)); |
2068 | 2073 | for(int i=2; i<pix.height()-1; i+=4) |
2069 | 2074 | pixPainter.drawLine(0, i, pix.width()-1, i); |
2070 | 2075 | |
… |
… |
Style::drawBorder(QPainter *p, const QRect &r, const QStyleOption *option, |
2554 | 2559 | |
2555 | 2560 | buildSplitPath(inner, round, qtcGetRadius(&opts, inner.width(), inner.height(), w, RADIUS_INTERNAL), topPath, botPath); |
2556 | 2561 | |
2557 | | p->setPen((enabled || BORDER_SUNKEN==borderProfile) /*&& |
| 2562 | setPainterPen(p, (enabled || BORDER_SUNKEN==borderProfile) /*&& |
2558 | 2563 | (BORDER_RAISED==borderProfile || BORDER_LIGHT==borderProfile || hasFocus || APPEARANCE_FLAT!=app)*/ |
2559 | 2564 | ? tl |
2560 | | : option->palette.background().color()); |
| 2565 | : option->palette.background().color(), QPENWIDTH1); |
2561 | 2566 | p->drawPath(topPath); |
2562 | 2567 | if(WIDGET_SCROLLVIEW==w || // Because of list view headers, need to draw dark line on right! |
2563 | 2568 | (! ( (WIDGET_ENTRY==w && !hasFocus && !hasMouseOver) || |
2564 | 2569 | (WIDGET_ENTRY!=w && doBlend && BORDER_SUNKEN==borderProfile) ) ) ) |
2565 | 2570 | { |
2566 | 2571 | if(!hasFocus && !hasMouseOver && BORDER_LIGHT!=borderProfile && WIDGET_SCROLLVIEW!=w) |
2567 | | p->setPen(/*WIDGET_SCROLLVIEW==w && !hasFocus |
| 2572 | setPainterPen(p, /*WIDGET_SCROLLVIEW==w && !hasFocus |
2568 | 2573 | ? checkColour(option, QPalette::Window) |
2569 | 2574 | : WIDGET_ENTRY==w && !hasFocus |
2570 | 2575 | ? checkColour(option, QPalette::Base) |
2571 | 2576 | : */enabled && (BORDER_SUNKEN==borderProfile || hasFocus || /*APPEARANCE_FLAT!=app ||*/ |
2572 | 2577 | WIDGET_TAB_TOP==w || WIDGET_TAB_BOT==w) |
2573 | 2578 | ? br |
2574 | | : checkColour(option, QPalette::Window)); |
| 2579 | : checkColour(option, QPalette::Window), QPENWIDTH1); |
2575 | 2580 | p->drawPath(botPath); |
2576 | 2581 | } |
2577 | 2582 | } |
… |
… |
Style::drawBorder(QPainter *p, const QRect &r, const QStyleOption *option, |
2586 | 2591 | |
2587 | 2592 | col.setAlphaF(LOWER_BORDER_ALPHA); |
2588 | 2593 | buildSplitPath(r, round, qtcGetRadius(&opts, r.width(), r.height(), w, RADIUS_EXTERNAL), topPath, botPath); |
2589 | | p->setPen(/*enabled ? */border/* : col*/); |
| 2594 | p->setPen(QPen(/*enabled ? */border/* : col*/, QPENWIDTH1)); |
2590 | 2595 | p->drawPath(topPath); |
2591 | 2596 | // if(enabled) |
2592 | 2597 | p->setPen(col); |
… |
… |
Style::drawBorder(QPainter *p, const QRect &r, const QStyleOption *option, |
2594 | 2599 | } |
2595 | 2600 | else |
2596 | 2601 | { |
2597 | | p->setPen(border); |
| 2602 | p->setPen(QPen(border, QPENWIDTH1)); |
2598 | 2603 | p->drawPath(buildPath(r, w, round, qtcGetRadius(&opts, r.width(), r.height(), w, RADIUS_EXTERNAL))); |
2599 | 2604 | } |
2600 | 2605 | |
diff --git qt5/style/qtcurve_api.cpp qt5/style/qtcurve_api.cpp
index f418d10..a52f62c 100644
|
|
void Style::drawComplexControl(ComplexControl control, const QStyleOptionComplex |
5309 | 5309 | |
5310 | 5310 | grad.setColorAt(0, dark); |
5311 | 5311 | grad.setColorAt(1, m_backgroundCols[QTC_STD_BORDER]); |
5312 | | painter->setPen(QPen(QBrush(grad), 1)); |
| 5312 | painter->setPen(QPen(QBrush(grad), QPENWIDTH1)); |
5313 | 5313 | painter->drawLine(r.x(), start.y(), r.x(), end.y()); |
5314 | 5314 | painter->drawLine(r.x()+r.width()-1, start.y(), r.x()+r.width()-1, end.y()); |
5315 | 5315 | |
… |
… |
void Style::drawComplexControl(ComplexControl control, const QStyleOptionComplex |
5317 | 5317 | { |
5318 | 5318 | grad.setColorAt(0, light); |
5319 | 5319 | grad.setColorAt(1, m_backgroundCols[0]); |
5320 | | painter->setPen(QPen(QBrush(grad), 1)); |
| 5320 | painter->setPen(QPen(QBrush(grad), QPENWIDTH1)); |
5321 | 5321 | painter->drawLine(r.x()+1, start.y(), r.x()+1, end.y()); |
5322 | 5322 | } |
5323 | 5323 | } |
diff --git qt5/style/qtcurve_p.h qt5/style/qtcurve_p.h
index 6f2ee31..2350227 100644
|
|
bool isA(const QObject *w, const char *type); |
286 | 286 | |
287 | 287 | } |
288 | 288 | |
| 289 | // allow testing pen widths slightly different from 1 as Qt5 might not anti-alias correctly for width 1 |
| 290 | #define QPENWIDTH1 1 |
289 | 291 | #define QPAINTER_ANTIALIAS_MAYBE_ON true |
290 | 292 | |
291 | 293 | #endif |
diff --git qt5/style/qtcurve_primitive.cpp qt5/style/qtcurve_primitive.cpp
index c014df8..ad37acb 100644
|
|
|
48 | 48 | #endif |
49 | 49 | |
50 | 50 | namespace QtCurve { |
| 51 | |
| 52 | static inline void setPainterPen(QPainter *p, const QColor &col, const qreal width=1.0) |
| 53 | { |
| 54 | p->setPen(QPen(col, width)); |
| 55 | } |
| 56 | |
51 | 57 | bool |
52 | 58 | Style::drawPrimitiveIndicatorTabClose(PrimitiveElement, |
53 | 59 | const QStyleOption*option, |
… |
… |
Style::drawPrimitiveFrameGroupBox(PrimitiveElement, |
493 | 499 | col.setAlphaF(0.0); |
494 | 500 | grad.setColorAt(1, col); |
495 | 501 | painter->setRenderHint(QPainter::Antialiasing, true); |
496 | | painter->setPen(QPen(QBrush(grad), 1)); |
| 502 | painter->setPen(QPen(QBrush(grad), QPENWIDTH1)); |
497 | 503 | painter->drawPath(path); |
498 | 504 | } |
499 | 505 | if (opts.gbLabel & (GB_LBL_INSIDE | GB_LBL_OUTSIDE)) { |
… |
… |
Style::drawPrimitiveButton(PrimitiveElement element, const QStyleOption *option, |
1234 | 1240 | path.lineTo(xd + offset + etchOffset, yd + offset + 6 + etchOffset); |
1235 | 1241 | path.lineTo(xd + offset + etchOffset, yd + offset + etchOffset); |
1236 | 1242 | painter->setBrush(cols[isDown ? 0 : 4]); |
1237 | | painter->setPen(cols[isDown ? 0 : 4]); |
| 1243 | setPainterPen(painter, cols[isDown ? 0 : 4], QPENWIDTH1); |
1238 | 1244 | painter->setRenderHint(QPainter::Antialiasing, true); |
1239 | 1245 | painter->drawPath(path); |
1240 | 1246 | painter->setRenderHint(QPainter::Antialiasing, QPAINTER_ANTIALIAS_MAYBE_ON); |
… |
… |
Style::drawPrimitiveIndicatorRadioButton(PrimitiveElement, |
1541 | 1547 | if (opts.crSize != CR_SMALL_SIZE && menu) { |
1542 | 1548 | y -= 2; |
1543 | 1549 | } |
| 1550 | painter->setRenderHint(QPainter::Antialiasing, true); |
1544 | 1551 | drawLightBevel(painter, rect, &opt, widget, ROUNDED_ALL, |
1545 | 1552 | getFill(&opt, use, true, false), use, true, |
1546 | 1553 | WIDGET_RADIO_BUTTON); |
… |
… |
Style::drawPrimitiveIndicatorRadioButton(PrimitiveElement, |
1580 | 1587 | painter->setRenderHint(QPainter::Antialiasing, true); |
1581 | 1588 | if (coloredMo) { |
1582 | 1589 | painter->setBrush(Qt::NoBrush); |
1583 | | painter->setPen(use[CR_MO_FILL]); |
| 1590 | setPainterPen(painter, use[CR_MO_FILL], QPENWIDTH1); |
1584 | 1591 | painter->drawArc(QRectF(x + 1, y + 1, opts.crSize - 2, |
1585 | 1592 | opts.crSize - 2), 0, 360 * 16); |
1586 | 1593 | painter->drawArc(QRectF(x + 2, y + 2, opts.crSize - 4, |
… |
… |
Style::drawPrimitiveIndicatorRadioButton(PrimitiveElement, |
1593 | 1600 | if (!glow) { |
1594 | 1601 | topCol.setAlphaF(ETCH_RADIO_TOP_ALPHA); |
1595 | 1602 | } |
1596 | | painter->setPen(topCol); |
| 1603 | setPainterPen(painter, topCol, QPENWIDTH1); |
1597 | 1604 | painter->drawArc(QRectF(x - 0.5, y - 0.5, opts.crSize + 1, |
1598 | 1605 | opts.crSize + 1), 45 * 16, 180 * 16); |
1599 | 1606 | if (!glow) { |
… |
… |
Style::drawPrimitiveIndicatorRadioButton(PrimitiveElement, |
1602 | 1609 | painter->drawArc(QRectF(x - 0.5, y - 0.5, opts.crSize + 1, |
1603 | 1610 | opts.crSize + 1), 225 * 16, 180 * 16); |
1604 | 1611 | } |
1605 | | painter->setPen(use[BORDER_VAL(state & State_Enabled)]); |
| 1612 | setPainterPen(painter, use[BORDER_VAL(state & State_Enabled)], QPENWIDTH1); |
1606 | 1613 | painter->drawArc(QRectF(x + 0.25, y + 0.25, opts.crSize - 0.5, |
1607 | 1614 | opts.crSize - 0.5), 0, 360 * 16); |
1608 | 1615 | if (!coloredMo) { |
1609 | | painter->setPen(btn[state & State_MouseOver ? 3 : 4]); |
| 1616 | setPainterPen(painter, btn[state & State_MouseOver ? 3 : 4], QPENWIDTH1); |
1610 | 1617 | painter->drawArc(QRectF(x + 0.75, y + 0.75, opts.crSize - 1.5, |
1611 | 1618 | opts.crSize - 1.5), |
1612 | 1619 | lightBorder ? 0 : 45 * 16, |
… |
… |
Style::drawPrimitiveIndicatorCheckBox(PrimitiveElement element, |
1661 | 1668 | if (r == QRect(0, 0, 14, 15)) { // OO.o 3.2 =14x15? |
1662 | 1669 | rect.adjust(-1, -1, -1, -1); |
1663 | 1670 | } |
1664 | | painter->setPen(option ? option->palette.text().color() : |
1665 | | QApplication::palette().text().color()); |
| 1671 | setPainterPen(painter, option ? option->palette.text().color() : |
| 1672 | QApplication::palette().text().color(), QPENWIDTH1); |
1666 | 1673 | drawRect(painter, r); |
1667 | 1674 | // LibreOffice its 15x15 - and arrow is not centred, so adjust this... |
1668 | 1675 | if (r == QRect(0, 0, 15, 15)) { |
… |
… |
Style::drawPrimitiveIndicatorCheckBox(PrimitiveElement element, |
1692 | 1699 | opt.state &= ~State_On; |
1693 | 1700 | opt.state |= State_Raised; |
1694 | 1701 | opt.rect = rect; |
| 1702 | painter->setRenderHint(QPainter::Antialiasing, true); |
1695 | 1703 | drawLightBevel(painter, rect, &opt, widget, ROUNDED_ALL, |
1696 | 1704 | getFill(&opt, use, true, false), |
1697 | 1705 | use, true, WIDGET_CHECKBOX); |
… |
… |
Style::drawPrimitiveIndicatorCheckBox(PrimitiveElement element, |
1721 | 1729 | |
1722 | 1730 | if (opts.coloredMouseOver != MO_NONE && !glow && mo) { |
1723 | 1731 | painter->setRenderHint(QPainter::Antialiasing, true); |
1724 | | painter->setPen(use[CR_MO_FILL]); |
| 1732 | setPainterPen(painter, use[CR_MO_FILL], QPENWIDTH1); |
1725 | 1733 | drawAaRect(painter, rect.adjusted(1, 1, -1, -1)); |
1726 | 1734 | painter->setRenderHint(QPainter::Antialiasing, QPAINTER_ANTIALIAS_MAYBE_ON); |
1727 | 1735 | } else { |
1728 | | painter->setPen(midColor(state & State_Enabled ? |
| 1736 | setPainterPen(painter, midColor(state & State_Enabled ? |
1729 | 1737 | palette.base().color() : |
1730 | | palette.background().color(), use[3])); |
| 1738 | palette.background().color(), use[3]), QPENWIDTH1); |
1731 | 1739 | if (lightBorder) { |
1732 | 1740 | drawRect(painter, rect.adjusted(1, 1, -1, -1)); |
1733 | 1741 | } else { |
… |
… |
Style::drawPrimitiveIndicatorCheckBox(PrimitiveElement element, |
1740 | 1748 | } |
1741 | 1749 | } |
1742 | 1750 | |
| 1751 | painter->setRenderHint(QPainter::Antialiasing, true); |
1743 | 1752 | if (doEtch && !view) { |
1744 | 1753 | if (glow && !(opts.thin & THIN_FRAMES)) { |
1745 | 1754 | drawGlow(painter, r, WIDGET_CHECKBOX); |
… |
… |
Style::drawPrimitiveIndicatorCheckBox(PrimitiveElement element, |
1751 | 1760 | } |
1752 | 1761 | drawBorder(painter, rect, option, ROUNDED_ALL, use, |
1753 | 1762 | WIDGET_CHECKBOX); |
| 1763 | painter->setRenderHint(QPainter::Antialiasing, QPAINTER_ANTIALIAS_MAYBE_ON); |
1754 | 1764 | } |
1755 | 1765 | } |
1756 | 1766 | if (state & State_On || selectedOOMenu) { |
… |
… |
Style::drawPrimitiveIndicatorCheckBox(PrimitiveElement element, |
1762 | 1772 | // tri-state |
1763 | 1773 | int x(rect.center().x()), y(rect.center().y()); |
1764 | 1774 | |
1765 | | painter->setPen(checkRadioCol(option)); |
| 1775 | setPainterPen(painter, checkRadioCol(option), QPENWIDTH1); |
1766 | 1776 | painter->drawLine(x - 3, y, x + 3, y); |
1767 | 1777 | painter->drawLine(x - 3, y + 1, x + 3, y + 1); |
1768 | 1778 | } |