Provided full style to share box from group calls.

This commit is contained in:
23rd 2022-03-06 15:48:00 +03:00
parent fa50a5962c
commit b5ab222e64
2 changed files with 68 additions and 2 deletions

View File

@ -1407,3 +1407,49 @@ groupCallRtmpKeyLabel: FlatLabel(boxLabel) {
minWidth: 230px;
}
groupCallDividerBg: groupCallMembersBgRipple;
groupCallScheduleDateField: InputField(groupCallField) {
textMargins: margins(2px, 0px, 2px, 0px);
placeholderScale: 0.;
heightMin: 30px;
textAlign: align(top);
font: font(14px);
}
groupCallScheduleTimeField: InputField(groupCallScheduleDateField) {
textBg: groupCallMembersBg;
border: 0px;
borderActive: 0px;
heightMin: 28px;
placeholderFont: font(14px);
}
//
groupCallCalendarPreviousDisabled: icon {{ "calendar_down-flip_vertical", groupCallMemberNotJoinedStatus }};
groupCallCalendarNextDisabled: icon {{ "calendar_down", groupCallMemberNotJoinedStatus }};
groupCallCalendarPrevious: IconButton(calendarPrevious) {
icon: icon {{ "calendar_down-flip_vertical", groupCallMembersFg }};
ripple: RippleAnimation(defaultRippleAnimation) {
color: groupCallMembersBgRipple;
}
}
groupCallCalendarNext: IconButton(groupCallCalendarPrevious) {
icon: icon {{ "calendar_down", groupCallMembersFg }};
}
groupCallCalendarColors: CalendarColors {
dayTextColor: groupCallMembersFg;
dayTextGrayedOutColor: groupCallMemberNotJoinedStatus;
iconButtonNext: groupCallCalendarNext;
iconButtonNextDisabled: groupCallCalendarNextDisabled;
iconButtonPrevious: groupCallCalendarPrevious;
iconButtonPreviousDisabled: groupCallCalendarPreviousDisabled;
iconButtonRippleColorDisabled: groupCallMembersBgRipple;
rippleColor: groupCallMembersBgRipple;
rippleColorHighlighted: groupCallMembersBgRipple;
rippleGrayedOutColor: groupCallMembersBgRipple;
titleTextColor: groupCallMembersFg;
}
//

View File

@ -23,6 +23,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "ui/toasts/common_toasts.h"
#include "lang/lang_keys.h"
#include "boxes/share_box.h"
#include "history/view/history_view_schedule_box.h"
#include "history/history_message.h" // GetErrorTextForSending.
#include "data/data_histories.h"
#include "data/data_session.h"
@ -196,6 +197,23 @@ object_ptr<ShareBox> ShareInviteLinkBox(
auto filterCallback = [](PeerData *peer) {
return peer->canWrite();
};
const auto scheduleStyle = [&] {
auto date = Ui::ChooseDateTimeStyleArgs();
date.labelStyle = &st::groupCallBoxLabel;
date.dateFieldStyle = &st::groupCallScheduleDateField;
date.timeFieldStyle = &st::groupCallScheduleTimeField;
date.separatorStyle = &st::callMuteButtonLabel;
date.atStyle = &st::callMuteButtonLabel;
date.calendarStyle = &st::groupCallCalendarColors;
auto st = HistoryView::ScheduleBoxStyleArgs();
st.topButtonStyle = &st::groupCallMenuToggle;
st.popupMenuStyle = &st::groupCallPopupMenu;
st.chooseDateTimeArgs = std::move(date);
return st;
};
auto result = Box<ShareBox>(ShareBox::Descriptor{
.session = &peer->session(),
.copyCallback = std::move(copyCallback),
@ -209,8 +227,10 @@ object_ptr<ShareBox> ShareInviteLinkBox(
tr::lng_group_call_copy_speaker_link(),
tr::lng_group_call_copy_listener_link()),
.stMultiSelect = &st::groupCallMultiSelect,
.stComment = &st::groupCallShareBoxComment,
.st = &st::groupCallShareBoxList });
.stComment = &/*st::groupCallShareBoxComment*/st::groupCallField,
.st = &st::groupCallShareBoxList,
.scheduleBoxStyle = scheduleStyle(),
});
*box = result.data();
return result;
}