resize nodes list
This commit is contained in:
parent
2ad90ac2bb
commit
5cb4fea788
|
@ -433,9 +433,7 @@ list(APPEND HEADERS
|
||||||
list(APPEND SOURCES
|
list(APPEND SOURCES
|
||||||
controls/LevelingSensor/QskSGNodeUtility.cpp
|
controls/LevelingSensor/QskSGNodeUtility.cpp
|
||||||
controls/LevelingSensor/QskLevelingSensor.cpp
|
controls/LevelingSensor/QskLevelingSensor.cpp
|
||||||
controls/LevelingSensor/QskLevelingSensorNodes.cpp
|
|
||||||
controls/LevelingSensor/QskLevelingSensorSkinlet.cpp
|
controls/LevelingSensor/QskLevelingSensorSkinlet.cpp
|
||||||
controls/LevelingSensor/QskLevelingSensorUtility.cpp
|
|
||||||
)
|
)
|
||||||
|
|
||||||
if(ENABLE_PINYIN)
|
if(ENABLE_PINYIN)
|
||||||
|
|
|
@ -243,14 +243,17 @@ 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 = {})
|
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();
|
removeChildNode(lastChild());
|
||||||
for (const auto& label : qAsConst(labels))
|
}
|
||||||
|
|
||||||
|
for ( int i = childCount(); i < count; ++i )
|
||||||
{
|
{
|
||||||
appendChildNode(new QskTextNode);
|
appendChildNode(new QskTextNode);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
const QFontMetricsF metrics(skinnable->effectiveFont(subControl));
|
const QFontMetricsF metrics(skinnable->effectiveFont(subControl));
|
||||||
const auto h = skinnable->effectiveFontHeight(subControl);
|
const auto h = skinnable->effectiveFontHeight(subControl);
|
||||||
|
|
Loading…
Reference in New Issue