mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-07 15:43:55 +02:00
Use separate styles for group call boxes.
This commit is contained in:
parent
e66ad89a2a
commit
d40768f6b0
34 changed files with 300 additions and 182 deletions
|
@ -153,74 +153,6 @@ contactsAboutFg: windowSubTextFgOver;
|
|||
contactsAboutTop: 60px;
|
||||
contactsAboutBottom: 19px;
|
||||
|
||||
contactsSearchField: InputField(defaultInputField) {
|
||||
textBg: transparent;
|
||||
textMargins: margins(2px, 7px, 2px, 0px);
|
||||
|
||||
placeholderFg: placeholderFg;
|
||||
placeholderFgActive: placeholderFgActive;
|
||||
placeholderFgError: placeholderFgActive;
|
||||
placeholderMargins: margins(2px, 0px, 2px, 0px);
|
||||
placeholderScale: 0.;
|
||||
placeholderFont: normalFont;
|
||||
|
||||
border: 0px;
|
||||
borderActive: 0px;
|
||||
|
||||
heightMin: 32px;
|
||||
|
||||
font: normalFont;
|
||||
}
|
||||
contactsSearchCancel: CrossButton {
|
||||
width: 44px;
|
||||
height: 44px;
|
||||
|
||||
cross: CrossAnimation {
|
||||
size: 36px;
|
||||
skip: 12px;
|
||||
stroke: 2px;
|
||||
minScale: 0.3;
|
||||
}
|
||||
crossFg: boxTitleCloseFg;
|
||||
crossFgOver: boxTitleCloseFgOver;
|
||||
crossPosition: point(4px, 4px);
|
||||
|
||||
duration: 150;
|
||||
loadingPeriod: 1000;
|
||||
ripple: RippleAnimation(defaultRippleAnimation) {
|
||||
color: windowBgOver;
|
||||
}
|
||||
}
|
||||
contactsMultiSelect: MultiSelect {
|
||||
bg: boxSearchBg;
|
||||
padding: margins(8px, 6px, 8px, 6px);
|
||||
maxHeight: 104px;
|
||||
scroll: ScrollArea(defaultSolidScroll) {
|
||||
deltat: 3px;
|
||||
deltab: 3px;
|
||||
round: 1px;
|
||||
width: 8px;
|
||||
deltax: 3px;
|
||||
hiding: 1000;
|
||||
}
|
||||
|
||||
item: defaultMultiSelectItem;
|
||||
itemSkip: 8px;
|
||||
|
||||
field: contactsSearchField;
|
||||
fieldMinWidth: 42px;
|
||||
fieldIcon: boxFieldSearchIcon;
|
||||
fieldIconSkip: 36px;
|
||||
|
||||
fieldCancel: contactsSearchCancel;
|
||||
fieldCancelSkip: 40px;
|
||||
}
|
||||
contactsPhotoCheckIcon: defaultPeerListCheckIcon;
|
||||
contactsPhotoCheck: defaultPeerListCheck;
|
||||
contactsPhotoCheckbox: defaultPeerListCheckbox;
|
||||
contactsPhotoDisabledCheckFg: menuIconFg;
|
||||
contactsRipple: defaultRippleAnimation;
|
||||
|
||||
contactsMarginTop: 4px;
|
||||
contactsMarginBottom: 4px;
|
||||
membersMarginTop: 10px;
|
||||
|
@ -241,7 +173,7 @@ peerListBox: PeerList(defaultPeerList) {
|
|||
button: OutlineButton(defaultPeerListButton) {
|
||||
textBg: contactsBg;
|
||||
textBgOver: contactsBgOver;
|
||||
ripple: contactsRipple;
|
||||
ripple: defaultRippleAnimation;
|
||||
}
|
||||
statusFg: contactsStatusFg;
|
||||
statusFgOver: contactsStatusFgOver;
|
||||
|
@ -282,7 +214,7 @@ localStorageLimitMargin: margins(22px, 5px, 20px, 10px);
|
|||
shareRowsTop: 12px;
|
||||
shareRowHeight: 108px;
|
||||
sharePhotoTop: 6px;
|
||||
sharePhotoCheckbox: RoundImageCheckbox(contactsPhotoCheckbox) {
|
||||
sharePhotoCheckbox: RoundImageCheckbox(defaultPeerListCheckbox) {
|
||||
imageRadius: 28px;
|
||||
imageSmallRadius: 24px;
|
||||
}
|
||||
|
@ -697,10 +629,10 @@ muteChatTitle: FlatLabel(boxLabel) {
|
|||
}
|
||||
muteChatTitleLeft: 50px;
|
||||
|
||||
groupStickersRemove: contactsSearchCancel;
|
||||
groupStickersRemove: defaultMultiSelectSearchCancel;
|
||||
groupStickersRemovePosition: point(6px, 6px);
|
||||
groupStickersFieldPadding: margins(8px, 6px, 8px, 6px);
|
||||
groupStickersField: InputField(contactsSearchField) {
|
||||
groupStickersField: InputField(defaultMultiSelectSearchField) {
|
||||
placeholderFont: boxTextFont;
|
||||
font: boxTextFont;
|
||||
placeholderMargins: margins(0px, 0px, 0px, 0px);
|
||||
|
@ -960,7 +892,7 @@ pollResultsVotesCount: FlatLabel(defaultFlatLabel) {
|
|||
textFg: windowSubTextFg;
|
||||
}
|
||||
pollResultsHeaderPadding: margins(22px, 22px, 22px, 8px);
|
||||
pollResultsShowMore: SettingsButton {
|
||||
pollResultsShowMore: SettingsButton(defaultSettingsButton) {
|
||||
textFg: lightButtonFg;
|
||||
textFgOver: lightButtonFgOver;
|
||||
textBg: windowBg;
|
||||
|
|
|
@ -91,7 +91,7 @@ QString StateDescription(const DictState &state) {
|
|||
auto CreateMultiSelect(QWidget *parent) {
|
||||
const auto result = Ui::CreateChild<Ui::MultiSelect>(
|
||||
parent,
|
||||
st::contactsMultiSelect,
|
||||
st::defaultMultiSelect,
|
||||
tr::lng_participant_filter());
|
||||
|
||||
result->resizeToWidth(st::boxWidth);
|
||||
|
|
|
@ -423,10 +423,10 @@ object_ptr<Ui::RpWidget> EditFilterChatsListController::prepareTypesList() {
|
|||
&session(),
|
||||
_options,
|
||||
_selected);
|
||||
controller->setStyleOverrides(&st::windowFilterSmallList);
|
||||
const auto content = result->add(object_ptr<PeerListContent>(
|
||||
container,
|
||||
controller,
|
||||
st::windowFilterSmallList));
|
||||
controller));
|
||||
delegate->setContent(content);
|
||||
controller->setDelegate(delegate);
|
||||
for (const auto flag : kAllTypes) {
|
||||
|
|
|
@ -880,7 +880,7 @@ void Content::setupContent(
|
|||
const auto inner = wrap->entity();
|
||||
inner->add(object_ptr<Ui::FixedHeightWidget>(
|
||||
inner,
|
||||
st::boxVerticalMargin));
|
||||
st::defaultBox.margin.top()));
|
||||
const auto rows = inner->add(object_ptr<Rows>(
|
||||
inner,
|
||||
list,
|
||||
|
@ -888,7 +888,7 @@ void Content::setupContent(
|
|||
areOfficial));
|
||||
inner->add(object_ptr<Ui::FixedHeightWidget>(
|
||||
inner,
|
||||
st::boxVerticalMargin));
|
||||
st::defaultBox.margin.top()));
|
||||
|
||||
rows->isEmpty() | rpl::start_with_next([=](bool empty) {
|
||||
wrap->toggle(!empty, anim::type::instant);
|
||||
|
@ -1153,7 +1153,7 @@ void LanguageBox::setInnerFocus() {
|
|||
not_null<Ui::MultiSelect*> LanguageBox::createMultiSelect() {
|
||||
const auto result = Ui::CreateChild<Ui::MultiSelect>(
|
||||
this,
|
||||
st::contactsMultiSelect,
|
||||
st::defaultMultiSelect,
|
||||
tr::lng_participant_filter());
|
||||
result->resizeToWidth(st::boxWidth);
|
||||
result->moveToLeft(0, 0);
|
||||
|
|
|
@ -360,7 +360,7 @@ void LocalStorageBox::clearByTag(uint16 tag) {
|
|||
void LocalStorageBox::setupControls() {
|
||||
const auto container = setInnerWidget(
|
||||
object_ptr<Ui::VerticalLayout>(this),
|
||||
st::contactsMultiSelect.scroll);
|
||||
st::defaultMultiSelect.scroll);
|
||||
const auto createRow = [&](
|
||||
uint16 tag,
|
||||
Fn<QString(size_type)> title,
|
||||
|
|
|
@ -67,7 +67,9 @@ void PeerListBox::createMultiSelect() {
|
|||
|
||||
auto entity = object_ptr<Ui::MultiSelect>(
|
||||
this,
|
||||
st::contactsMultiSelect,
|
||||
(_controller->selectSt()
|
||||
? *_controller->selectSt()
|
||||
: st::defaultMultiSelect),
|
||||
tr::lng_participant_filter());
|
||||
_select.create(this, std::move(entity));
|
||||
_select->heightValue(
|
||||
|
@ -117,8 +119,7 @@ void PeerListBox::prepare() {
|
|||
setContent(setInnerWidget(
|
||||
object_ptr<PeerListContent>(
|
||||
this,
|
||||
_controller.get(),
|
||||
st::peerListBox),
|
||||
_controller.get()),
|
||||
st::boxScroll));
|
||||
content()->resizeToWidth(_controller->contentWidth());
|
||||
|
||||
|
@ -178,8 +179,12 @@ void PeerListBox::resizeEvent(QResizeEvent *e) {
|
|||
|
||||
void PeerListBox::paintEvent(QPaintEvent *e) {
|
||||
Painter p(this);
|
||||
|
||||
const auto &bg = (_controller->listSt()
|
||||
? *_controller->listSt()
|
||||
: st::peerListBox).bg;
|
||||
for (const auto rect : e->region()) {
|
||||
p.fillRect(rect, st::contactsBg);
|
||||
p.fillRect(rect, bg);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -248,6 +253,14 @@ PeerListController::PeerListController(std::unique_ptr<PeerListSearchController>
|
|||
}
|
||||
}
|
||||
|
||||
const style::PeerList &PeerListController::computeListSt() const {
|
||||
return _listSt ? *_listSt : st::peerListBox;
|
||||
}
|
||||
|
||||
const style::MultiSelect &PeerListController::computeSelectSt() const {
|
||||
return _selectSt ? *_selectSt : st::defaultMultiSelect;
|
||||
}
|
||||
|
||||
bool PeerListController::hasComplexSearch() const {
|
||||
return (_searchController != nullptr);
|
||||
}
|
||||
|
@ -279,7 +292,8 @@ void PeerListController::setDescriptionText(const QString &text) {
|
|||
if (text.isEmpty()) {
|
||||
setDescription(nullptr);
|
||||
} else {
|
||||
setDescription(object_ptr<Ui::FlatLabel>(nullptr, text, st::membersAbout));
|
||||
const auto &st = _listSt ? *_listSt : st::peerListBox;
|
||||
setDescription(object_ptr<Ui::FlatLabel>(nullptr, text, computeListSt().about));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -353,17 +367,20 @@ void PeerListBox::addSelectItem(
|
|||
createMultiSelect();
|
||||
_select->hide(anim::type::instant);
|
||||
}
|
||||
const auto &activeBg = (_controller->selectSt()
|
||||
? *_controller->selectSt()
|
||||
: st::defaultMultiSelect).item.textActiveBg;
|
||||
if (animated == anim::type::instant) {
|
||||
_select->entity()->addItemInBunch(
|
||||
itemId,
|
||||
text,
|
||||
st::activeButtonBg,
|
||||
activeBg,
|
||||
std::move(paintUserpic));
|
||||
} else {
|
||||
_select->entity()->addItem(
|
||||
itemId,
|
||||
text,
|
||||
st::activeButtonBg,
|
||||
activeBg,
|
||||
std::move(paintUserpic));
|
||||
}
|
||||
}
|
||||
|
@ -606,21 +623,21 @@ void PeerListRow::paintDisabledCheckUserpic(
|
|||
int x,
|
||||
int y,
|
||||
int outerWidth) const {
|
||||
auto userpicRadius = st::contactsPhotoCheckbox.imageSmallRadius;
|
||||
auto userpicShift = st::contactsPhotoCheckbox.imageRadius - userpicRadius;
|
||||
auto userpicDiameter = st::contactsPhotoCheckbox.imageRadius * 2;
|
||||
auto userpicRadius = st.checkbox.imageSmallRadius;
|
||||
auto userpicShift = st.checkbox.imageRadius - userpicRadius;
|
||||
auto userpicDiameter = st.checkbox.imageRadius * 2;
|
||||
auto userpicLeft = x + userpicShift;
|
||||
auto userpicTop = y + userpicShift;
|
||||
auto userpicEllipse = style::rtlrect(x, y, userpicDiameter, userpicDiameter, outerWidth);
|
||||
auto userpicBorderPen = st::contactsPhotoDisabledCheckFg->p;
|
||||
userpicBorderPen.setWidth(st::contactsPhotoCheckbox.selectWidth);
|
||||
auto userpicBorderPen = st.disabledCheckFg->p;
|
||||
userpicBorderPen.setWidth(st.checkbox.selectWidth);
|
||||
|
||||
auto iconDiameter = st::contactsPhotoCheckbox.check.size;
|
||||
auto iconLeft = x + userpicDiameter + st::contactsPhotoCheckbox.selectWidth - iconDiameter;
|
||||
auto iconTop = y + userpicDiameter + st::contactsPhotoCheckbox.selectWidth - iconDiameter;
|
||||
auto iconDiameter = st.checkbox.check.size;
|
||||
auto iconLeft = x + userpicDiameter + st.checkbox.selectWidth - iconDiameter;
|
||||
auto iconTop = y + userpicDiameter + st.checkbox.selectWidth - iconDiameter;
|
||||
auto iconEllipse = style::rtlrect(iconLeft, iconTop, iconDiameter, iconDiameter, outerWidth);
|
||||
auto iconBorderPen = st::contactsPhotoCheckbox.check.border->p;
|
||||
iconBorderPen.setWidth(st::contactsPhotoCheckbox.selectWidth);
|
||||
auto iconBorderPen = st.checkbox.check.border->p;
|
||||
iconBorderPen.setWidth(st.checkbox.selectWidth);
|
||||
|
||||
if (_isSavedMessagesChat) {
|
||||
Ui::EmptyUserpic::PaintSavedMessages(p, userpicLeft, userpicTop, outerWidth, userpicRadius * 2);
|
||||
|
@ -638,11 +655,11 @@ void PeerListRow::paintDisabledCheckUserpic(
|
|||
p.drawEllipse(userpicEllipse);
|
||||
|
||||
p.setPen(iconBorderPen);
|
||||
p.setBrush(st::contactsPhotoDisabledCheckFg);
|
||||
p.setBrush(st.disabledCheckFg);
|
||||
p.drawEllipse(iconEllipse);
|
||||
}
|
||||
|
||||
st::contactsPhotoCheckbox.check.check.paint(p, iconEllipse.topLeft(), outerWidth);
|
||||
st.checkbox.check.check.paint(p, iconEllipse.topLeft(), outerWidth);
|
||||
}
|
||||
|
||||
void PeerListRow::setStatusText(const QString &text) {
|
||||
|
@ -679,10 +696,9 @@ void PeerListRow::setCheckedInternal(bool checked, anim::type animated) {
|
|||
|
||||
PeerListContent::PeerListContent(
|
||||
QWidget *parent,
|
||||
not_null<PeerListController*> controller,
|
||||
const style::PeerList &st)
|
||||
not_null<PeerListController*> controller)
|
||||
: RpWidget(parent)
|
||||
, _st(st)
|
||||
, _st(controller->computeListSt())
|
||||
, _controller(controller)
|
||||
, _rowHeight(_st.item.height) {
|
||||
_controller->session().downloaderTaskFinished(
|
||||
|
|
|
@ -17,6 +17,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
namespace style {
|
||||
struct PeerList;
|
||||
struct PeerListItem;
|
||||
struct MultiSelect;
|
||||
} // namespace style
|
||||
|
||||
namespace Main {
|
||||
|
@ -371,6 +372,21 @@ public:
|
|||
prepare();
|
||||
}
|
||||
|
||||
void setStyleOverrides(
|
||||
const style::PeerList *listSt,
|
||||
const style::MultiSelect *selectSt = nullptr) {
|
||||
_listSt = listSt;
|
||||
_selectSt = selectSt;
|
||||
}
|
||||
const style::PeerList *listSt() const {
|
||||
return _listSt;
|
||||
}
|
||||
const style::MultiSelect *selectSt() const {
|
||||
return _selectSt;
|
||||
}
|
||||
const style::PeerList &computeListSt() const;
|
||||
const style::MultiSelect &computeSelectSt() const;
|
||||
|
||||
virtual void prepare() = 0;
|
||||
virtual void rowClicked(not_null<PeerListRow*> row) = 0;
|
||||
virtual Main::Session &session() const = 0;
|
||||
|
@ -457,6 +473,9 @@ private:
|
|||
PeerListDelegate *_delegate = nullptr;
|
||||
std::unique_ptr<PeerListSearchController> _searchController = nullptr;
|
||||
|
||||
const style::PeerList *_listSt = nullptr;
|
||||
const style::MultiSelect *_selectSt = nullptr;
|
||||
|
||||
rpl::lifetime _lifetime;
|
||||
|
||||
};
|
||||
|
@ -478,8 +497,7 @@ class PeerListContent
|
|||
public:
|
||||
PeerListContent(
|
||||
QWidget *parent,
|
||||
not_null<PeerListController*> controller,
|
||||
const style::PeerList &st);
|
||||
not_null<PeerListController*> controller);
|
||||
|
||||
void selectSkip(int direction);
|
||||
void selectSkipPage(int height, int direction);
|
||||
|
|
|
@ -166,7 +166,7 @@ ShareBox::ShareBox(
|
|||
, _filterCallback(std::move(filterCallback))
|
||||
, _select(
|
||||
this,
|
||||
st::contactsMultiSelect,
|
||||
st::defaultMultiSelect,
|
||||
tr::lng_participant_filter())
|
||||
, _comment(
|
||||
this,
|
||||
|
|
|
@ -21,11 +21,15 @@ SingleChoiceBox::SingleChoiceBox(
|
|||
rpl::producer<QString> title,
|
||||
const std::vector<QString> &optionTexts,
|
||||
int initialSelection,
|
||||
Fn<void(int)> callback)
|
||||
Fn<void(int)> callback,
|
||||
const style::Checkbox *st,
|
||||
const style::Radio *radioSt)
|
||||
: _title(std::move(title))
|
||||
, _optionTexts(optionTexts)
|
||||
, _initialSelection(initialSelection)
|
||||
, _callback(callback) {
|
||||
, _callback(callback)
|
||||
, _st(st ? *st : st::defaultBoxCheckbox)
|
||||
, _radioSt(radioSt ? *radioSt : st::defaultRadio) {
|
||||
}
|
||||
|
||||
void SingleChoiceBox::prepare() {
|
||||
|
@ -47,7 +51,8 @@ void SingleChoiceBox::prepare() {
|
|||
group,
|
||||
i,
|
||||
text,
|
||||
st::defaultBoxCheckbox),
|
||||
_st,
|
||||
_radioSt),
|
||||
QMargins(
|
||||
st::boxPadding.left() + st::boxOptionListPadding.left(),
|
||||
0,
|
||||
|
|
|
@ -14,6 +14,10 @@ namespace Ui {
|
|||
class Radiobutton;
|
||||
} // namespace Ui
|
||||
|
||||
namespace style {
|
||||
struct Checkbox;
|
||||
} // namespace style
|
||||
|
||||
class SingleChoiceBox : public Ui::BoxContent {
|
||||
public:
|
||||
SingleChoiceBox(
|
||||
|
@ -21,7 +25,9 @@ public:
|
|||
rpl::producer<QString> title,
|
||||
const std::vector<QString> &optionTexts,
|
||||
int initialSelection,
|
||||
Fn<void(int)> callback);
|
||||
Fn<void(int)> callback,
|
||||
const style::Checkbox *st = nullptr,
|
||||
const style::Radio *radioSt = nullptr);
|
||||
|
||||
protected:
|
||||
void prepare() override;
|
||||
|
@ -31,6 +37,8 @@ private:
|
|||
std::vector<QString> _optionTexts;
|
||||
int _initialSelection = 0;
|
||||
Fn<void(int)> _callback;
|
||||
const style::Checkbox &_st;
|
||||
const style::Radio &_radioSt;
|
||||
|
||||
};
|
||||
|
||||
|
|
|
@ -1436,7 +1436,7 @@ void StickersBox::Inner::setPressed(SelectedRow pressed) {
|
|||
auto &set = _rows[pressedIndex];
|
||||
auto rippleMask = Ui::RippleAnimation::rectMask(QSize(width(), _rowHeight));
|
||||
if (!set->ripple) {
|
||||
set->ripple = std::make_unique<Ui::RippleAnimation>(st::contactsRipple, std::move(rippleMask), [this, pressedIndex] {
|
||||
set->ripple = std::make_unique<Ui::RippleAnimation>(st::defaultRippleAnimation, std::move(rippleMask), [this, pressedIndex] {
|
||||
update(0, _itemsTop + pressedIndex * _rowHeight, width(), _rowHeight);
|
||||
});
|
||||
}
|
||||
|
|
|
@ -8,6 +8,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
using "ui/basic.style";
|
||||
|
||||
using "ui/widgets/widgets.style";
|
||||
using "ui/layers/layers.style";
|
||||
using "window/window.style";
|
||||
|
||||
CallSignalBars {
|
||||
|
@ -408,8 +409,7 @@ groupCallHeight: 580px;
|
|||
groupCallRipple: RippleAnimation(defaultRippleAnimation) {
|
||||
color: groupCallMembersRipple;
|
||||
}
|
||||
groupCallMembersList: PeerList(defaultPeerList) {
|
||||
item: PeerListItem(defaultPeerListItem) {
|
||||
groupCallMembersListItem: PeerListItem(defaultPeerListItem) {
|
||||
button: OutlineButton(defaultPeerListButton) {
|
||||
textBg: groupCallMembersBg;
|
||||
textBgOver: groupCallMembersBg;
|
||||
|
@ -422,6 +422,15 @@ groupCallMembersList: PeerList(defaultPeerList) {
|
|||
|
||||
ripple: groupCallRipple;
|
||||
}
|
||||
disabledCheckFg: groupCallMemberNotJoinedStatus;
|
||||
checkbox: RoundImageCheckbox(defaultPeerListCheckbox) {
|
||||
selectFg: groupCallActiveFg;
|
||||
check: RoundCheckbox(defaultPeerListCheck) {
|
||||
border: groupCallMembersBg;
|
||||
bgActive: groupCallActiveFg;
|
||||
check: icon {{ "default_checkbox_check", groupCallMembersFg, point(3px, 6px) }};
|
||||
}
|
||||
}
|
||||
height: 52px;
|
||||
photoPosition: point(12px, 6px);
|
||||
namePosition: point(68px, 7px);
|
||||
|
@ -433,7 +442,43 @@ groupCallMembersList: PeerList(defaultPeerList) {
|
|||
statusFgOver: groupCallMemberInactiveStatus;
|
||||
statusFgActive: groupCallMemberActiveStatus;
|
||||
}
|
||||
groupCallMembersList: PeerList(defaultPeerList) {
|
||||
bg: groupCallMembersBg;
|
||||
about: FlatLabel(defaultPeerListAbout) {
|
||||
textFg: groupCallMemberInactiveStatus;
|
||||
}
|
||||
item: groupCallMembersListItem;
|
||||
}
|
||||
groupCallInviteMembersList: PeerList(groupCallMembersList) {
|
||||
item: PeerListItem(groupCallMembersListItem) {
|
||||
statusFg: groupCallMemberNotJoinedStatus;
|
||||
statusFgOver: groupCallMemberNotJoinedStatus;
|
||||
statusFgActive: groupCallMemberInactiveStatus;
|
||||
}
|
||||
}
|
||||
groupCallMultiSelect: MultiSelect(defaultMultiSelect) {
|
||||
bg: groupCallMembersBg;
|
||||
item: MultiSelectItem(defaultMultiSelectItem) {
|
||||
textBg: groupCallMembersRipple;
|
||||
textFg: groupCallMembersFg;
|
||||
textActiveBg: groupCallActiveFg;
|
||||
textActiveFg: groupCallMembersFg;
|
||||
deleteFg: groupCallMembersFg;
|
||||
}
|
||||
field: InputField(defaultMultiSelectSearchField) {
|
||||
textFg: groupCallMembersFg;
|
||||
placeholderFg: groupCallMemberNotJoinedStatus;
|
||||
placeholderFgActive: groupCallMemberNotJoinedStatus;
|
||||
placeholderFgError: groupCallMemberNotJoinedStatus;
|
||||
}
|
||||
fieldIcon: icon {{ "box_search", groupCallMemberNotJoinedStatus, point(10px, 9px) }};
|
||||
fieldCancel: CrossButton(defaultMultiSelectSearchCancel) {
|
||||
crossFg: groupCallMemberNotJoinedStatus;
|
||||
crossFgOver: groupCallMemberNotJoinedStatus;
|
||||
ripple: groupCallRipple;
|
||||
}
|
||||
}
|
||||
|
||||
groupCallMembersHeader: 47px;
|
||||
groupCallMembersMargin: margins(16px, 16px, 16px, 28px);
|
||||
groupCallAddMember: IconButton(defaultIconButton) {
|
||||
|
@ -505,3 +550,76 @@ groupCallTopBarJoin: RoundButton(defaultActiveButton) {
|
|||
height: 28px;
|
||||
textTop: 5px;
|
||||
}
|
||||
groupCallBox: Box(defaultBox) {
|
||||
button: RoundButton(defaultBoxButton) {
|
||||
textFg: groupCallActiveFg;
|
||||
textFgOver: groupCallActiveFg;
|
||||
numbersTextFg: groupCallActiveFg;
|
||||
numbersTextFgOver: groupCallActiveFg;
|
||||
textBg: groupCallMembersBg;
|
||||
textBgOver: groupCallBoxButtonBgOver;
|
||||
|
||||
ripple: RippleAnimation(defaultRippleAnimation) {
|
||||
color: groupCallBoxButtonBgRipple;
|
||||
}
|
||||
}
|
||||
margin: margins(0px, 56px, 0px, 10px);
|
||||
bg: groupCallMembersBg;
|
||||
title: FlatLabel(boxTitle) {
|
||||
textFg: groupCallMembersFg;
|
||||
}
|
||||
titleAdditionalFg: groupCallMemberNotJoinedStatus;
|
||||
}
|
||||
groupCallLayerBox: Box(groupCallBox) {
|
||||
buttonPadding: margins(8px, 8px, 8px, 8px);
|
||||
}
|
||||
groupCallLevelMeter: LevelMeter(defaultLevelMeter) {
|
||||
height: 18px;
|
||||
lineWidth: 3px;
|
||||
lineSpacing: 5px;
|
||||
lineCount: 44;
|
||||
activeFg: groupCallActiveFg;
|
||||
inactiveFg: groupCallMemberNotJoinedStatus;
|
||||
}
|
||||
groupCallCheckboxIcon: icon {{ "default_checkbox_check", groupCallMembersFg, point(4px, 7px) }};
|
||||
groupCallCheck: Check(defaultCheck) {
|
||||
untoggledFg: groupCallMemberNotJoinedStatus;
|
||||
toggledFg: groupCallActiveFg;
|
||||
icon: groupCallCheckboxIcon;
|
||||
}
|
||||
groupCallRadio: Radio(defaultRadio) {
|
||||
untoggledFg: groupCallMemberNotJoinedStatus;
|
||||
toggledFg: groupCallActiveFg;
|
||||
}
|
||||
groupCallCheckbox: Checkbox(defaultBoxCheckbox) {
|
||||
textFg: groupCallMembersFg;
|
||||
textFgActive: groupCallMembersFg;
|
||||
rippleBg: groupCallMembersRipple;
|
||||
rippleBgActive: groupCallBoxButtonBgRipple;
|
||||
}
|
||||
|
||||
groupCallSettingsButton: SettingsButton {
|
||||
textFg: groupCallMembersFg;
|
||||
textFgOver: groupCallMembersFg;
|
||||
textBg: groupCallMembersBg;
|
||||
textBgOver: groupCallBoxButtonBgOver;
|
||||
|
||||
font: boxTextFont;
|
||||
rightLabel: FlatLabel(defaultSettingsRightLabel) {
|
||||
textFg: groupCallActiveFg;
|
||||
}
|
||||
|
||||
height: 20px;
|
||||
padding: margins(22px, 10px, 22px, 8px);
|
||||
|
||||
ripple: RippleAnimation(defaultRippleAnimation) {
|
||||
color: groupCallBoxButtonBgRipple;
|
||||
}
|
||||
}
|
||||
groupCallSettingsAttentionButton: SettingsButton(groupCallSettingsButton) {
|
||||
textFg: attentionButtonFg;
|
||||
textFgOver: attentionButtonFgOver;
|
||||
}
|
||||
groupCallBoxLabel: FlatLabel(boxLabel) {
|
||||
textFg: groupCallMembersFg;
|
||||
}
|
||||
|
|
|
@ -733,10 +733,11 @@ void GroupMembers::setupButtons(not_null<GroupCall*> call) {
|
|||
|
||||
void GroupMembers::setupList() {
|
||||
auto topSkip = _header ? _header->height() : 0;
|
||||
|
||||
_listController->setStyleOverrides(&st::groupCallMembersList);
|
||||
_list = _scroll->setOwnedWidget(object_ptr<ListWidget>(
|
||||
this,
|
||||
_listController.get(),
|
||||
st::groupCallMembersList));
|
||||
_listController.get()));
|
||||
|
||||
sizeValue(
|
||||
) | rpl::start_with_next([=](QSize size) {
|
||||
|
|
|
@ -173,16 +173,18 @@ void LeaveGroupCallBox(
|
|||
bool discardChecked,
|
||||
BoxContext context) {
|
||||
box->setTitle(tr::lng_group_call_leave_title());
|
||||
const auto inCall = (context == BoxContext::GroupCallPanel);
|
||||
box->addRow(object_ptr<Ui::FlatLabel>(
|
||||
box.get(),
|
||||
tr::lng_group_call_leave_sure(),
|
||||
st::boxLabel));
|
||||
(inCall ? st::groupCallBoxLabel : st::boxLabel)));
|
||||
const auto discard = call->channel()->canManageCall()
|
||||
? box->addRow(object_ptr<Ui::Checkbox>(
|
||||
box.get(),
|
||||
tr::lng_group_call_end(),
|
||||
discardChecked,
|
||||
st::defaultBoxCheckbox),
|
||||
(inCall ? st::groupCallCheckbox : st::defaultBoxCheckbox),
|
||||
(inCall ? st::groupCallCheck : st::defaultCheck)),
|
||||
style::margins(
|
||||
st::boxRowPadding.left(),
|
||||
st::boxRowPadding.left(),
|
||||
|
@ -224,6 +226,8 @@ GroupPanel::GroupPanel(not_null<GroupCall*> call)
|
|||
.type = Ui::CallMuteButtonType::Connecting,
|
||||
}))
|
||||
, _hangup(widget(), st::callHangup) {
|
||||
_layerBg->setStyleOverrides(&st::groupCallBox, &st::groupCallLayerBox);
|
||||
|
||||
initWindow();
|
||||
initWidget();
|
||||
initControls();
|
||||
|
@ -412,6 +416,10 @@ void GroupPanel::addMembers() {
|
|||
_channel,
|
||||
std::move(alreadyIn),
|
||||
real->fullCount());
|
||||
controller->setStyleOverrides(
|
||||
&st::groupCallInviteMembersList,
|
||||
&st::groupCallMultiSelect);
|
||||
|
||||
const auto weak = base::make_weak(_call);
|
||||
auto initBox = [=, controller = controller.get()](
|
||||
not_null<PeerListBox*> box) {
|
||||
|
|
|
@ -89,7 +89,9 @@ void GroupCallSettingsBox(
|
|||
? box->addRow(object_ptr<Ui::Checkbox>(
|
||||
box.get(),
|
||||
tr::lng_group_call_new_muted(),
|
||||
joinMuted))
|
||||
joinMuted,
|
||||
st::groupCallCheckbox,
|
||||
st::groupCallCheck))
|
||||
: nullptr;
|
||||
if (muteJoined) {
|
||||
AddSkip(layout);
|
||||
|
@ -107,13 +109,13 @@ void GroupCallSettingsBox(
|
|||
) | rpl::then(
|
||||
state->outputNameStream.events()
|
||||
),
|
||||
st::settingsButton
|
||||
st::groupCallSettingsButton
|
||||
)->addClickHandler([=] {
|
||||
box->getDelegate()->show(ChooseAudioInputBox(crl::guard(box, [=](
|
||||
const QString &id,
|
||||
const QString &name) {
|
||||
state->outputNameStream.fire_copy(name);
|
||||
})));
|
||||
}), &st::groupCallCheckbox, &st::groupCallRadio));
|
||||
});
|
||||
|
||||
AddButtonWithLabel(
|
||||
|
@ -124,20 +126,20 @@ void GroupCallSettingsBox(
|
|||
) | rpl::then(
|
||||
state->inputNameStream.events()
|
||||
),
|
||||
st::settingsButton
|
||||
st::groupCallSettingsButton
|
||||
)->addClickHandler([=] {
|
||||
box->getDelegate()->show(ChooseAudioInputBox(crl::guard(box, [=](
|
||||
const QString &id,
|
||||
const QString &name) {
|
||||
state->inputNameStream.fire_copy(name);
|
||||
state->micTester->setDeviceId(id);
|
||||
})));
|
||||
}), &st::groupCallCheckbox, &st::groupCallRadio));
|
||||
});
|
||||
|
||||
state->micTestLevel = box->addRow(
|
||||
object_ptr<Ui::LevelMeter>(
|
||||
box.get(),
|
||||
st::defaultLevelMeter),
|
||||
st::groupCallLevelMeter),
|
||||
st::settingsLevelMeterPadding);
|
||||
state->micTestLevel->resize(QSize(0, st::defaultLevelMeter.height));
|
||||
|
||||
|
@ -174,7 +176,7 @@ void GroupCallSettingsBox(
|
|||
AddButton(
|
||||
layout,
|
||||
tr::lng_group_call_share(),
|
||||
st::settingsButton
|
||||
st::groupCallSettingsButton
|
||||
)->addClickHandler([=] {
|
||||
if (!copyLink() && !state->generatingLink) {
|
||||
state->generatingLink = true;
|
||||
|
@ -195,7 +197,7 @@ void GroupCallSettingsBox(
|
|||
AddButton(
|
||||
layout,
|
||||
tr::lng_group_call_end(),
|
||||
st::settingsAttentionButton
|
||||
st::groupCallSettingsAttentionButton
|
||||
)->addClickHandler([=] {
|
||||
if (const auto call = weakCall.get()) {
|
||||
box->getDelegate()->show(Box(
|
||||
|
|
|
@ -231,9 +231,9 @@ inlineBotsScroll: ScrollArea(defaultSolidScroll) {
|
|||
deltab: stickerPanPadding;
|
||||
}
|
||||
|
||||
gifsSearchField: contactsSearchField;
|
||||
gifsSearchField: defaultMultiSelectSearchField;
|
||||
gifsSearchFieldPosition: point(42px, 7px);
|
||||
gifsSearchCancel: contactsSearchCancel;
|
||||
gifsSearchCancel: defaultMultiSelectSearchCancel;
|
||||
gifsSearchCancelPosition: point(1px, 1px);
|
||||
gifsSearchIcon: boxFieldSearchIcon;
|
||||
gifsSearchIconPosition: point(6px, 7px);
|
||||
|
|
|
@ -221,7 +221,7 @@ void Inner::setupContent() {
|
|||
}
|
||||
|
||||
Row::Row(QWidget *widget, not_null<Main::Session*> session, const Set &set)
|
||||
: RippleButton(widget, st::contactsRipple)
|
||||
: RippleButton(widget, st::defaultRippleAnimation)
|
||||
, _session(session)
|
||||
, _id(set.id)
|
||||
, _state(Available{ set.size }) {
|
||||
|
|
|
@ -180,9 +180,6 @@ void GroupCall::reload() {
|
|||
void GroupCall::applyParticipantsSlice(
|
||||
const QVector<MTPGroupCallParticipant> &list,
|
||||
ApplySliceSource sliceSource) {
|
||||
if (sliceSource != ApplySliceSource::UnknownLoaded) {
|
||||
return;
|
||||
}
|
||||
auto changedCount = _fullCount.current();
|
||||
for (const auto &participant : list) {
|
||||
participant.match([&](const MTPDgroupCallParticipant &data) {
|
||||
|
|
|
@ -213,10 +213,10 @@ int InnerWidget::desiredHeight() const {
|
|||
object_ptr<InnerWidget::ListWidget> InnerWidget::setupList(
|
||||
RpWidget *parent,
|
||||
not_null<PeerListController*> controller) const {
|
||||
controller->setStyleOverrides(&st::infoCommonGroupsList);
|
||||
auto result = object_ptr<ListWidget>(
|
||||
parent,
|
||||
controller,
|
||||
st::infoCommonGroupsList);
|
||||
controller);
|
||||
result->scrollToRequests(
|
||||
) | rpl::start_with_next([this](Ui::ScrollToRequest request) {
|
||||
auto addmin = (request.ymin < 0)
|
||||
|
|
|
@ -44,14 +44,14 @@ infoScroll: ScrollArea(defaultScrollArea) {
|
|||
infoMediaSearch: SearchFieldRow {
|
||||
height: 44px;
|
||||
padding: margins(8px, 6px, 8px, 6px);
|
||||
field: contactsSearchField;
|
||||
field: defaultMultiSelectSearchField;
|
||||
fieldIcon: icon {{
|
||||
"box_search-flip_horizontal",
|
||||
menuIconFg,
|
||||
point(6px, 8px)
|
||||
}};
|
||||
fieldIconSkip: 36px;
|
||||
fieldCancel: contactsSearchCancel;
|
||||
fieldCancel: defaultMultiSelectSearchCancel;
|
||||
fieldCancelSkip: 40px;
|
||||
}
|
||||
infoLayerMediaSearch: SearchFieldRow(infoMediaSearch) {
|
||||
|
@ -62,7 +62,7 @@ infoLayerMediaSearch: SearchFieldRow(infoMediaSearch) {
|
|||
point(9px, 9px)
|
||||
}};
|
||||
fieldIconSkip: 34px;
|
||||
fieldCancel: CrossButton(contactsSearchCancel) {
|
||||
fieldCancel: CrossButton(defaultMultiSelectSearchCancel) {
|
||||
width: 50px;
|
||||
cross: CrossAnimation {
|
||||
size: 38px;
|
||||
|
@ -77,7 +77,7 @@ infoLayerMediaSearch: SearchFieldRow(infoMediaSearch) {
|
|||
infoTopBarSearchRow: SearchFieldRow(infoLayerMediaSearch) {
|
||||
height: 52px;
|
||||
padding: margins(0px, 12px, 8px, 10px);
|
||||
fieldCancel: CrossButton(contactsSearchCancel) {
|
||||
fieldCancel: CrossButton(defaultMultiSelectSearchCancel) {
|
||||
width: 51px;
|
||||
height: 52px;
|
||||
cross: CrossAnimation {
|
||||
|
@ -402,7 +402,7 @@ infoProfileToggle: Toggle(defaultToggle) {
|
|||
infoProfileToggleOver: Toggle(infoProfileToggle) {
|
||||
untoggledFg: menuIconFgOver;
|
||||
}
|
||||
infoProfileButton: SettingsButton {
|
||||
infoProfileButton: SettingsButton(defaultSettingsButton) {
|
||||
textFg: windowBoldFg;
|
||||
textFgOver: windowBoldFgOver;
|
||||
textBg: windowBg;
|
||||
|
@ -496,7 +496,7 @@ infoMembersSearchActiveLayer: icon {
|
|||
infoMembersButtonIconPosition
|
||||
}
|
||||
};
|
||||
infoMembersSearchField: InputField(contactsSearchField) {
|
||||
infoMembersSearchField: InputField(defaultMultiSelectSearchField) {
|
||||
}
|
||||
infoMembersCancelSearch: CrossButton {
|
||||
width: 44px;
|
||||
|
|
|
@ -501,10 +501,10 @@ ListController *CreateAnswerRows(
|
|||
container,
|
||||
st::boxLittleSkip));
|
||||
|
||||
controller->setStyleOverrides(&st::infoCommonGroupsList);
|
||||
const auto content = container->add(object_ptr<PeerListContent>(
|
||||
container,
|
||||
controller,
|
||||
st::infoCommonGroupsList));
|
||||
controller));
|
||||
delegate->setContent(content);
|
||||
controller->setDelegate(delegate);
|
||||
|
||||
|
|
|
@ -212,10 +212,10 @@ void Members::setupButtons() {
|
|||
|
||||
void Members::setupList() {
|
||||
auto topSkip = _header ? _header->height() : 0;
|
||||
_listController->setStyleOverrides(&st::infoMembersList);
|
||||
_list = object_ptr<ListWidget>(
|
||||
this,
|
||||
_listController.get(),
|
||||
st::infoMembersList);
|
||||
_listController.get());
|
||||
_list->scrollToRequests(
|
||||
) | rpl::start_with_next([this](Ui::ScrollToRequest request) {
|
||||
auto addmin = (request.ymin < 0 || !_header)
|
||||
|
|
|
@ -47,7 +47,7 @@ overviewCheck: RoundCheckbox(defaultRoundCheckbox) {
|
|||
sizeSmall: 0.3;
|
||||
check: icon {{ "overview_photo_check", overviewCheckFgActive, point(4px, 8px) }};
|
||||
}
|
||||
overviewSmallCheck: RoundCheckbox(contactsPhotoCheck) {
|
||||
overviewSmallCheck: RoundCheckbox(defaultPeerListCheck) {
|
||||
border: overviewCheckBorder;
|
||||
}
|
||||
overviewCheckSkip: 5px;
|
||||
|
|
|
@ -123,7 +123,7 @@ passportRowTitleFg: windowFg;
|
|||
passportRowDescriptionFg: windowSubTextFg;
|
||||
|
||||
passportScansHeaderPadding: margins(22px, 10px, 22px, 10px);
|
||||
passportUploadButton: SettingsButton {
|
||||
passportUploadButton: SettingsButton(defaultSettingsButton) {
|
||||
textFg: windowActiveTextFg;
|
||||
textFgOver: windowActiveTextFg;
|
||||
textBg: windowBg;
|
||||
|
|
|
@ -25,11 +25,6 @@ settingsSectionSkip: 9px;
|
|||
settingsSectionIconLeft: 22px;
|
||||
settingsSeparatorPadding: margins(22px, infoProfileSkip, 0px, infoProfileSkip);
|
||||
settingsButtonRightSkip: 28px;
|
||||
settingsButtonRight: FlatLabel(defaultFlatLabel) {
|
||||
textFg: windowActiveTextFg;
|
||||
style: boxTextStyle;
|
||||
maxHeight: 20px;
|
||||
}
|
||||
settingsScalePadding: margins(79px, 10px, 28px, 8px);
|
||||
settingsBigScalePadding: margins(22px, 10px, 22px, 8px);
|
||||
settingsSlider: SettingsSlider(defaultSettingsSlider) {
|
||||
|
|
|
@ -327,7 +327,9 @@ QString CurrentAudioInputName() {
|
|||
}
|
||||
|
||||
object_ptr<SingleChoiceBox> ChooseAudioOutputBox(
|
||||
Fn<void(QString id, QString name)> chosen) {
|
||||
Fn<void(QString id, QString name)> chosen,
|
||||
const style::Checkbox *st,
|
||||
const style::Radio *radioSt) {
|
||||
const auto &devices = Webrtc::GetAudioOutputList();
|
||||
const auto options = ranges::view::concat(
|
||||
ranges::view::single(tr::lng_settings_call_device_default(tr::now)),
|
||||
|
@ -351,11 +353,15 @@ object_ptr<SingleChoiceBox> ChooseAudioOutputBox(
|
|||
tr::lng_settings_call_output_device(),
|
||||
options,
|
||||
currentOption,
|
||||
save);
|
||||
save,
|
||||
st,
|
||||
radioSt);
|
||||
}
|
||||
|
||||
object_ptr<SingleChoiceBox> ChooseAudioInputBox(
|
||||
Fn<void(QString id, QString name)> chosen) {
|
||||
Fn<void(QString id, QString name)> chosen,
|
||||
const style::Checkbox *st,
|
||||
const style::Radio *radioSt) {
|
||||
const auto devices = Webrtc::GetAudioInputList();
|
||||
const auto options = ranges::view::concat(
|
||||
ranges::view::single(tr::lng_settings_call_device_default(tr::now)),
|
||||
|
@ -379,7 +385,9 @@ object_ptr<SingleChoiceBox> ChooseAudioInputBox(
|
|||
tr::lng_settings_call_input_device(),
|
||||
options,
|
||||
currentOption,
|
||||
save);
|
||||
save,
|
||||
st,
|
||||
radioSt);
|
||||
}
|
||||
|
||||
} // namespace Settings
|
||||
|
|
|
@ -11,6 +11,11 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
#include "ui/effects/animations.h"
|
||||
#include "base/timer.h"
|
||||
|
||||
namespace style {
|
||||
struct Checkbox;
|
||||
struct Radio;
|
||||
} // namespace style
|
||||
|
||||
namespace Calls {
|
||||
class Call;
|
||||
} // namespace Calls
|
||||
|
@ -57,9 +62,13 @@ inline constexpr auto kMicTestAnimationDuration = crl::time(200);
|
|||
[[nodiscard]] QString CurrentAudioOutputName();
|
||||
[[nodiscard]] QString CurrentAudioInputName();
|
||||
[[nodiscard]] object_ptr<SingleChoiceBox> ChooseAudioOutputBox(
|
||||
Fn<void(QString id, QString name)> chosen);
|
||||
Fn<void(QString id, QString name)> chosen,
|
||||
const style::Checkbox *st = nullptr,
|
||||
const style::Radio *radioSt = nullptr);
|
||||
[[nodiscard]] object_ptr<SingleChoiceBox> ChooseAudioInputBox(
|
||||
Fn<void(QString id, QString name)> chosen);
|
||||
Fn<void(QString id, QString name)> chosen,
|
||||
const style::Checkbox *st = nullptr,
|
||||
const style::Radio *radioSt = nullptr);
|
||||
|
||||
} // namespace Settings
|
||||
|
||||
|
|
|
@ -137,7 +137,7 @@ void CreateRightLabel(
|
|||
rpl::producer<QString> buttonText) {
|
||||
const auto name = Ui::CreateChild<Ui::FlatLabel>(
|
||||
button.get(),
|
||||
st::settingsButtonRight);
|
||||
st.rightLabel);
|
||||
rpl::combine(
|
||||
button->widthValue(),
|
||||
std::move(buttonText),
|
||||
|
|
|
@ -148,12 +148,12 @@ void CountryInput::setText(const QString &newText) {
|
|||
}
|
||||
|
||||
CountrySelectBox::CountrySelectBox(QWidget*)
|
||||
: _select(this, st::contactsMultiSelect, tr::lng_country_ph()) {
|
||||
: _select(this, st::defaultMultiSelect, tr::lng_country_ph()) {
|
||||
}
|
||||
|
||||
CountrySelectBox::CountrySelectBox(QWidget*, const QString &iso, Type type)
|
||||
: _type(type)
|
||||
, _select(this, st::contactsMultiSelect, tr::lng_country_ph()) {
|
||||
, _select(this, st::defaultMultiSelect, tr::lng_country_ph()) {
|
||||
if (Data::CountriesByISO2().contains(iso)) {
|
||||
LastValidISO = iso;
|
||||
}
|
||||
|
|
|
@ -650,9 +650,9 @@ Editor::Editor(
|
|||
: _window(window)
|
||||
, _cloud(cloud)
|
||||
, _scroll(this, st::themesScroll)
|
||||
, _close(this, st::contactsMultiSelect.fieldCancel)
|
||||
, _close(this, st::defaultMultiSelect.fieldCancel)
|
||||
, _menuToggle(this, st::themesMenuToggle)
|
||||
, _select(this, st::contactsMultiSelect, tr::lng_country_ph())
|
||||
, _select(this, st::defaultMultiSelect, tr::lng_country_ph())
|
||||
, _leftShadow(this)
|
||||
, _topShadow(this)
|
||||
, _save(this, tr::lng_theme_editor_save_button(tr::now).toUpper(), st::dialogsUpdateButton) {
|
||||
|
|
|
@ -233,7 +233,7 @@ windowOutdatedClose: IconButton(defaultIconButton) {
|
|||
iconPosition: point(-1px, -1px);
|
||||
}
|
||||
|
||||
createThemeImportButton: SettingsButton {
|
||||
createThemeImportButton: SettingsButton(defaultSettingsButton) {
|
||||
textFg: lightButtonFg;
|
||||
textFgOver: lightButtonFgOver;
|
||||
textBg: windowBg;
|
||||
|
|
|
@ -208,7 +208,8 @@ QSize MediaPreviewWidget::currentDimensions() const {
|
|||
QSize result, box;
|
||||
if (_photo) {
|
||||
result = QSize(_photo->width(), _photo->height());
|
||||
box = QSize(width() - 2 * st::boxVerticalMargin, height() - 2 * st::boxVerticalMargin);
|
||||
const auto skip = st::defaultBox.margin.top();
|
||||
box = QSize(width() - 2 * skip, height() - 2 * skip);
|
||||
} else {
|
||||
result = _document->dimensions;
|
||||
if (result.isEmpty()) {
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 41bae1eba67801eb8768887100c17b7e84e7daf7
|
||||
Subproject commit 7287e235e0205fd878cd35329d08aa1aa1c218fa
|
Loading…
Add table
Reference in a new issue