Fixed text color of peer value in table on palette change.

This commit is contained in:
23rd
2025-12-13 04:09:03 +03:00
committed by John Preston
parent d35d425918
commit c45cf07b06

View File

@@ -174,7 +174,12 @@ object_ptr<RpWidget> MakePeerTableValue(
}, label->lifetime());
userpic->setAttribute(Qt::WA_TransparentForMouseEvents);
label->setAttribute(Qt::WA_TransparentForMouseEvents);
label->setTextColorOverride(table->st().defaultValue.palette.linkFg->c);
rpl::single(
rpl::empty_value()
) | rpl::then(style::PaletteChanged()) | rpl::on_next([=] {
label->setTextColorOverride(
table->st().defaultValue.palette.linkFg->c);
}, label->lifetime());
raw->setClickedCallback([=] {
show->showBox(PrepareShortInfoBox(peer, show));
@@ -289,7 +294,11 @@ object_ptr<RpWidget> MakeHiddenPeerTableValue(
userpic->setAttribute(Qt::WA_TransparentForMouseEvents);
label->setAttribute(Qt::WA_TransparentForMouseEvents);
label->setTextColorOverride(st::windowFg->c);
rpl::single(
rpl::empty_value()
) | rpl::then(style::PaletteChanged()) | rpl::on_next([=] {
label->setTextColorOverride(st::windowFg->c);
}, label->lifetime());
return result;
}