MCPcopy Create free account
hub / github.com/Martchus/syncthingtray / createSubtree

Method createSubtree

syncthingwidgets/quick/quickicon.cpp:99–112  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

97}
98
99QSGNode *Icon::createSubtree(qreal initialOpacity)
100{
101 auto opacityNode = new QSGOpacityNode{};
102 opacityNode->setFlag(QSGNode::OwnedByParent, true);
103 opacityNode->setOpacity(initialOpacity);
104
105 auto *mNode = new ManagedTextureNode;
106
107 mNode->setTexture(s_iconImageCache->loadTexture(window(), m_icon, QQuickWindow::TextureCanUseAtlas));
108
109 opacityNode->appendChildNode(mNode);
110
111 return opacityNode;
112}
113
114void Icon::updateSubtree(QSGNode *node, qreal opacity)
115{

Callers

nothing calls this directly

Calls 2

setTextureMethod · 0.80
loadTextureMethod · 0.80

Tested by

no test coverage detected