mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Provided full style to share box from group calls.
This commit is contained in:
parent
fa50a5962c
commit
b5ab222e64
2 changed files with 68 additions and 2 deletions
|
@ -1407,3 +1407,49 @@ groupCallRtmpKeyLabel: FlatLabel(boxLabel) {
|
||||||
minWidth: 230px;
|
minWidth: 230px;
|
||||||
}
|
}
|
||||||
groupCallDividerBg: groupCallMembersBgRipple;
|
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;
|
||||||
|
}
|
||||||
|
//
|
||||||
|
|
|
@ -23,6 +23,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "ui/toasts/common_toasts.h"
|
#include "ui/toasts/common_toasts.h"
|
||||||
#include "lang/lang_keys.h"
|
#include "lang/lang_keys.h"
|
||||||
#include "boxes/share_box.h"
|
#include "boxes/share_box.h"
|
||||||
|
#include "history/view/history_view_schedule_box.h"
|
||||||
#include "history/history_message.h" // GetErrorTextForSending.
|
#include "history/history_message.h" // GetErrorTextForSending.
|
||||||
#include "data/data_histories.h"
|
#include "data/data_histories.h"
|
||||||
#include "data/data_session.h"
|
#include "data/data_session.h"
|
||||||
|
@ -196,6 +197,23 @@ object_ptr<ShareBox> ShareInviteLinkBox(
|
||||||
auto filterCallback = [](PeerData *peer) {
|
auto filterCallback = [](PeerData *peer) {
|
||||||
return peer->canWrite();
|
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{
|
auto result = Box<ShareBox>(ShareBox::Descriptor{
|
||||||
.session = &peer->session(),
|
.session = &peer->session(),
|
||||||
.copyCallback = std::move(copyCallback),
|
.copyCallback = std::move(copyCallback),
|
||||||
|
@ -209,8 +227,10 @@ object_ptr<ShareBox> ShareInviteLinkBox(
|
||||||
tr::lng_group_call_copy_speaker_link(),
|
tr::lng_group_call_copy_speaker_link(),
|
||||||
tr::lng_group_call_copy_listener_link()),
|
tr::lng_group_call_copy_listener_link()),
|
||||||
.stMultiSelect = &st::groupCallMultiSelect,
|
.stMultiSelect = &st::groupCallMultiSelect,
|
||||||
.stComment = &st::groupCallShareBoxComment,
|
.stComment = &/*st::groupCallShareBoxComment*/st::groupCallField,
|
||||||
.st = &st::groupCallShareBoxList });
|
.st = &st::groupCallShareBoxList,
|
||||||
|
.scheduleBoxStyle = scheduleStyle(),
|
||||||
|
});
|
||||||
*box = result.data();
|
*box = result.data();
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue