Reduce radious of action highlight
This commit is contained in:
committed by
Craig Drummond
parent
243c403c74
commit
a9d97bd034
@@ -97,23 +97,10 @@ void ActionItemDelegate::adjustActionRect(bool rtl, ActionPos actionPos, QRect &
|
||||
}
|
||||
}
|
||||
|
||||
static QPainterPath buildPath(const QRectF &r, double radius)
|
||||
{
|
||||
QPainterPath path;
|
||||
double diameter(radius*2);
|
||||
|
||||
path.moveTo(r.x()+r.width(), r.y()+r.height()-radius);
|
||||
path.arcTo(r.x()+r.width()-diameter, r.y(), diameter, diameter, 0, 90);
|
||||
path.arcTo(r.x(), r.y(), diameter, diameter, 90, 90);
|
||||
path.arcTo(r.x(), r.y()+r.height()-diameter, diameter, diameter, 180, 90);
|
||||
path.arcTo(r.x()+r.width()-diameter, r.y()+r.height()-diameter, diameter, diameter, 270, 90);
|
||||
return path;
|
||||
}
|
||||
|
||||
static void drawBgnd(QPainter *painter, const QRect &rx, bool light)
|
||||
{
|
||||
QRectF r(rx.x()-0.5, rx.y()-0.5, rx.width()+1, rx.height()+1);
|
||||
QPainterPath p(buildPath(r, 3.0));
|
||||
QPainterPath p(Utils::buildPath(r, 1.0));
|
||||
QColor c(light ? Qt::white : Qt::black);
|
||||
|
||||
painter->setRenderHint(QPainter::Antialiasing, true);
|
||||
|
||||
Reference in New Issue
Block a user