resize nodes list
This commit is contained in:
parent
2ad90ac2bb
commit
5cb4fea788
|
@ -433,9 +433,7 @@ list(APPEND HEADERS
|
|||
list(APPEND SOURCES
|
||||
controls/LevelingSensor/QskSGNodeUtility.cpp
|
||||
controls/LevelingSensor/QskLevelingSensor.cpp
|
||||
controls/LevelingSensor/QskLevelingSensorNodes.cpp
|
||||
controls/LevelingSensor/QskLevelingSensorSkinlet.cpp
|
||||
controls/LevelingSensor/QskLevelingSensorUtility.cpp
|
||||
)
|
||||
|
||||
if(ENABLE_PINYIN)
|
||||
|
|
|
@ -243,15 +243,18 @@ public:
|
|||
|
||||
void update(const QskSkinnable* const skinnable, const QskAspect::Subcontrol subControl, const QVector<QPair<double, QString>>& labels, const QVector2D& scale = { 1.0, 0.0 }, const QVector2D& offset = {})
|
||||
{
|
||||
if (childCount() != labels.count())
|
||||
const auto count = labels.count();
|
||||
|
||||
for ( int i = childCount(); i > count; --i )
|
||||
{
|
||||
removeAllChildNodes();
|
||||
for (const auto& label : qAsConst(labels))
|
||||
{
|
||||
appendChildNode(new QskTextNode);
|
||||
}
|
||||
removeChildNode(lastChild());
|
||||
}
|
||||
|
||||
for ( int i = childCount(); i < count; ++i )
|
||||
{
|
||||
appendChildNode(new QskTextNode);
|
||||
}
|
||||
|
||||
const QFontMetricsF metrics(skinnable->effectiveFont(subControl));
|
||||
const auto h = skinnable->effectiveFontHeight(subControl);
|
||||
const auto a = skinnable->alignmentHint(subControl);
|
||||
|
|
Loading…
Reference in New Issue