Example #1
0
QSGNode *QQuickTextField::updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *data)
{
    QQuickDefaultClipNode *clipNode = static_cast<QQuickDefaultClipNode *>(oldNode);
    if (!clipNode)
        clipNode = new QQuickDefaultClipNode(QRectF());

    clipNode->setRect(clipRect().adjusted(leftPadding(), topPadding(), -rightPadding(), -bottomPadding()));
    clipNode->update();

    QSGNode *textNode = QQuickTextInput::updatePaintNode(clipNode->firstChild(), data);
    if (!textNode->parent())
        clipNode->appendChildNode(textNode);

    return clipNode;
}
Example #2
0
PStyle &PStyle::operator =(const PStyle &obj)
{
    inverted(obj.inverted());
    size(obj.size());
    lineWidth(obj.lineWidth());
    smooth(obj.smooth());
    leftPadding(obj.leftPadding());
    rightPadding(obj.rightPadding());
    topPadding(obj.topPadding());
    bottomPadding(obj.bottomPadding());
    foregroundColor(obj.foregroundColor());
    backgroundColor(obj.backgroundColor());
    borderColor(obj.borderColor());
    selectedForegroundColor(obj.selectedForegroundColor());
    selectedBackgroundColor(obj.selectedBackgroundColor());
    selectedBorderColor(obj.selectedBorderColor());

    return *this;
}