Fix label updating in RTMP settings.

This commit is contained in:
John Preston 2022-02-28 21:13:46 +03:00
parent 7a602690bb
commit d49649b3a3
2 changed files with 6 additions and 2 deletions

View file

@ -1008,6 +1008,7 @@ groupCallSettingsToggle: Toggle(defaultToggle) {
untoggledFg: groupCallMemberNotJoinedStatus; untoggledFg: groupCallMemberNotJoinedStatus;
} }
groupCallSettingsButton: SettingsButton(defaultSettingsButton) { groupCallSettingsButton: SettingsButton(defaultSettingsButton) {
padding: margins(24px, 10px, 24px, 8px);
textFg: groupCallMembersFg; textFg: groupCallMembersFg;
textFgOver: groupCallMembersFg; textFgOver: groupCallMembersFg;
textBg: groupCallMembersBg; textBg: groupCallMembersBg;
@ -1024,6 +1025,7 @@ groupCallSettingsAttentionButton: SettingsButton(groupCallSettingsButton) {
textFgOver: attentionButtonFgOver; textFgOver: attentionButtonFgOver;
} }
groupCallBoxLabel: FlatLabel(boxLabel) { groupCallBoxLabel: FlatLabel(boxLabel) {
minWidth: 200px;
textFg: groupCallMembersFg; textFg: groupCallMembersFg;
} }
groupCallJoinAsLabel: FlatLabel(defaultFlatLabel) { groupCallJoinAsLabel: FlatLabel(defaultFlatLabel) {

View file

@ -34,7 +34,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
namespace Calls::Group { namespace Calls::Group {
namespace { namespace {
constexpr auto kPasswordCharAmount = 28; constexpr auto kPasswordCharAmount = 24;
void StartWithBox( void StartWithBox(
not_null<Ui::GenericBox*> box, not_null<Ui::GenericBox*> box,
@ -261,7 +261,7 @@ void StartRtmpProcess::FillRtmpRows(
const style::FlatLabel &st) { const style::FlatLabel &st) {
const auto label = container->add( const auto label = container->add(
object_ptr<Ui::FlatLabel>(container, std::move(text), st), object_ptr<Ui::FlatLabel>(container, std::move(text), st),
st::boxRowPadding); st::boxRowPadding + QMargins(0, 0, showButtonStyle->width, 0));
label->setSelectable(true); label->setSelectable(true);
label->setBreakEverywhere(true); label->setBreakEverywhere(true);
if (disabledMenuForLabels) { if (disabledMenuForLabels) {
@ -323,6 +323,8 @@ void StartRtmpProcess::FillRtmpRows(
: hidden : hidden
? QString().fill(passChar, kPasswordCharAmount) ? QString().fill(passChar, kPasswordCharAmount)
: key; : key;
}) | rpl::after_next([=] {
container->resizeToWidth(container->widthNoMargins());
}); });
const auto streamKeyLabel = addLabel( const auto streamKeyLabel = addLabel(
std::move(keyLabelContent), std::move(keyLabelContent),