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;
}
groupCallSettingsButton: SettingsButton(defaultSettingsButton) {
padding: margins(24px, 10px, 24px, 8px);
textFg: groupCallMembersFg;
textFgOver: groupCallMembersFg;
textBg: groupCallMembersBg;
@ -1024,6 +1025,7 @@ groupCallSettingsAttentionButton: SettingsButton(groupCallSettingsButton) {
textFgOver: attentionButtonFgOver;
}
groupCallBoxLabel: FlatLabel(boxLabel) {
minWidth: 200px;
textFg: groupCallMembersFg;
}
groupCallJoinAsLabel: FlatLabel(defaultFlatLabel) {

View File

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