splash node clipping fixed
This commit is contained in:
parent
4bf1b019c7
commit
56c3481c42
|
@ -550,43 +550,21 @@ QSGNode* QskSegmentedBarSkinlet::updateSplashNode(
|
||||||
{
|
{
|
||||||
using Q = QskSegmentedBar;
|
using Q = QskSegmentedBar;
|
||||||
|
|
||||||
// get Minimum / Maximum right:
|
|
||||||
QskSkinStateChanger stateChanger( bar );
|
|
||||||
const auto states = sampleStates( bar, Q::Segment, bar->selectedIndex() );
|
|
||||||
stateChanger.setStates( states );
|
|
||||||
|
|
||||||
const auto splashRect = bar->subControlRect( Q::Splash );
|
const auto splashRect = bar->subControlRect( Q::Splash );
|
||||||
if ( splashRect.isEmpty() )
|
if ( splashRect.isEmpty() )
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
|
||||||
auto panelClipNode = updateBoxClipNode(
|
auto clipNode = updateBoxClipNode(
|
||||||
bar, node, bar->subControlRect( Q::Panel ), Q::Panel );
|
bar, node, bar->subControlRect( Q::Panel ), Q::Panel );
|
||||||
|
|
||||||
if ( panelClipNode )
|
if ( clipNode )
|
||||||
{
|
{
|
||||||
const auto segmentRect = sampleRect(
|
auto boxNode = updateBoxNode( bar, clipNode->firstChild(), splashRect, Q::Splash );
|
||||||
bar, bar->contentsRect(), Q::Segment, bar->selectedIndex() );
|
|
||||||
|
|
||||||
auto segmentClipNode = updateBoxClipNode(
|
|
||||||
bar, panelClipNode->firstChild(), segmentRect, Q::Segment );
|
|
||||||
|
|
||||||
if ( segmentClipNode == nullptr )
|
|
||||||
return nullptr;
|
|
||||||
|
|
||||||
if ( segmentClipNode->parent() == nullptr )
|
|
||||||
panelClipNode->appendChildNode( segmentClipNode );
|
|
||||||
|
|
||||||
auto boxNode = segmentClipNode->firstChild();
|
|
||||||
boxNode = updateBoxNode( bar, boxNode, splashRect, Q::Splash );
|
|
||||||
|
|
||||||
if ( boxNode == nullptr )
|
|
||||||
return nullptr;
|
|
||||||
|
|
||||||
if ( boxNode->parent() == nullptr )
|
if ( boxNode->parent() == nullptr )
|
||||||
segmentClipNode->appendChildNode( boxNode );
|
clipNode->appendChildNode( boxNode );
|
||||||
}
|
}
|
||||||
|
|
||||||
return panelClipNode;
|
return clipNode;
|
||||||
}
|
}
|
||||||
|
|
||||||
#include "moc_QskSegmentedBarSkinlet.cpp"
|
#include "moc_QskSegmentedBarSkinlet.cpp"
|
||||||
|
|
Loading…
Reference in New Issue