File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -1503,7 +1503,9 @@ void Label::enableUnderline()
1503
1503
{
1504
1504
_lineDrawNode = DrawNode::create ();
1505
1505
_lineDrawNode->setGlobalZOrder (getGlobalZOrder ());
1506
- _lineDrawNode->properties .setFactor (_lineDrawNode->properties .getFactor () * 2 .0f ); // 2.0f: Makes the line smaller
1506
+ _lineDrawNode->setOpacity (_displayedOpacity);
1507
+ _lineDrawNode->properties .setFactor (_lineDrawNode->properties .getFactor () *
1508
+ 2 .0f ); // 2.0f: Makes the line smaller
1507
1509
addChild (_lineDrawNode, 100000 );
1508
1510
}
1509
1511
}
@@ -1520,7 +1522,9 @@ void Label::enableStrikethrough()
1520
1522
{
1521
1523
_lineDrawNode = DrawNode::create ();
1522
1524
_lineDrawNode->setGlobalZOrder (getGlobalZOrder ());
1523
- _lineDrawNode->properties .setFactor (_lineDrawNode->properties .getFactor () * 2 .0f ); // 2.0f: Makes the line smaller
1525
+ _lineDrawNode->setOpacity (_displayedOpacity);
1526
+ _lineDrawNode->properties .setFactor (_lineDrawNode->properties .getFactor () *
1527
+ 2 .0f ); // 2.0f: Makes the line smaller
1524
1528
addChild (_lineDrawNode, 100000 );
1525
1529
}
1526
1530
}
@@ -2424,6 +2428,12 @@ void Label::updateDisplayedOpacity(uint8_t parentOpacity)
2424
2428
{
2425
2429
it.second ->updateDisplayedOpacity (_displayedOpacity);
2426
2430
}
2431
+
2432
+ if (_lineDrawNode)
2433
+ {
2434
+ _lineDrawNode->setOpacity (_displayedOpacity);
2435
+ _contentDirty = true ;
2436
+ }
2427
2437
}
2428
2438
2429
2439
// FIXME: it is not clear what is the difference between setTextColor() and setColor()
You can’t perform that action at this time.
0 commit comments