mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Version 4.11: Fix build with GCC.
This commit is contained in:
parent
c46b659aa5
commit
1a503e5f1d
9 changed files with 0 additions and 51 deletions
|
@ -376,12 +376,9 @@ void PreviewWrap::paintEvent(QPaintEvent *e) {
|
||||||
_element->draw(p, context);
|
_element->draw(p, context);
|
||||||
|
|
||||||
if (_element->displayFromPhoto()) {
|
if (_element->displayFromPhoto()) {
|
||||||
auto userpicMinBottomSkip = st::historyPaddingBottom
|
|
||||||
+ st::msgMargin.bottom();
|
|
||||||
auto userpicBottom = height()
|
auto userpicBottom = height()
|
||||||
- _element->marginBottom()
|
- _element->marginBottom()
|
||||||
- _element->marginTop();
|
- _element->marginTop();
|
||||||
const auto item = _element->data();
|
|
||||||
const auto userpicTop = userpicBottom - st::msgPhotoSize;
|
const auto userpicTop = userpicBottom - st::msgPhotoSize;
|
||||||
_peer->paintUserpicLeft(
|
_peer->paintUserpicLeft(
|
||||||
p,
|
p,
|
||||||
|
@ -631,15 +628,12 @@ int ColorSelector::resizeGetHeight(int newWidth) {
|
||||||
}
|
}
|
||||||
const auto count = int(_samples.size());
|
const auto count = int(_samples.size());
|
||||||
const auto columns = Ui::kSimpleColorIndexCount;
|
const auto columns = Ui::kSimpleColorIndexCount;
|
||||||
const auto rows = (count + columns - 1) / columns;
|
|
||||||
const auto skip = st::settingsColorRadioSkip;
|
const auto skip = st::settingsColorRadioSkip;
|
||||||
const auto size = (newWidth - skip * (columns - 1)) / float64(columns);
|
const auto size = (newWidth - skip * (columns - 1)) / float64(columns);
|
||||||
const auto isize = int(base::SafeRound(size));
|
const auto isize = int(base::SafeRound(size));
|
||||||
auto top = 0;
|
auto top = 0;
|
||||||
auto left = 0.;
|
auto left = 0.;
|
||||||
for (auto i = 0; i != count; ++i) {
|
for (auto i = 0; i != count; ++i) {
|
||||||
const auto row = i / columns;
|
|
||||||
const auto column = i % columns;
|
|
||||||
_samples[i]->resize(isize, isize);
|
_samples[i]->resize(isize, isize);
|
||||||
_samples[i]->move(int(base::SafeRound(left)), top);
|
_samples[i]->move(int(base::SafeRound(left)), top);
|
||||||
left += size + skip;
|
left += size + skip;
|
||||||
|
|
|
@ -4474,8 +4474,6 @@ void HistoryItem::setServiceMessageByAction(const MTPmessageAction &action) {
|
||||||
auto prepareGiftCode = [&](const MTPDmessageActionGiftCode &action) {
|
auto prepareGiftCode = [&](const MTPDmessageActionGiftCode &action) {
|
||||||
auto result = PreparedServiceText();
|
auto result = PreparedServiceText();
|
||||||
_history->session().giftBoxStickersPacks().load();
|
_history->session().giftBoxStickersPacks().load();
|
||||||
const auto months = action.vmonths().v;
|
|
||||||
|
|
||||||
result.text = {
|
result.text = {
|
||||||
(action.is_unclaimed()
|
(action.is_unclaimed()
|
||||||
? tr::lng_prize_unclaimed_about
|
? tr::lng_prize_unclaimed_about
|
||||||
|
|
|
@ -103,22 +103,6 @@ using SetHistoryArgs = ComposeControls::SetHistoryArgs;
|
||||||
using VoiceRecordBar = Controls::VoiceRecordBar;
|
using VoiceRecordBar = Controls::VoiceRecordBar;
|
||||||
using ForwardPanel = Controls::ForwardPanel;
|
using ForwardPanel = Controls::ForwardPanel;
|
||||||
|
|
||||||
[[nodiscard]] auto ShowWebPagePreview(WebPageData *page) {
|
|
||||||
return page && !page->failed;
|
|
||||||
}
|
|
||||||
|
|
||||||
WebPageText ProcessWebPageData(WebPageData *page) {
|
|
||||||
auto previewText = HistoryView::TitleAndDescriptionFromWebPage(page);
|
|
||||||
if (previewText.title.isEmpty()) {
|
|
||||||
if (page->document) {
|
|
||||||
previewText.title = tr::lng_attach_file(tr::now);
|
|
||||||
} else if (page->photo) {
|
|
||||||
previewText.title = tr::lng_attach_photo(tr::now);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return previewText;
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
class FieldHeader final : public Ui::RpWidget {
|
class FieldHeader final : public Ui::RpWidget {
|
||||||
|
@ -428,17 +412,6 @@ void FieldHeader::setShownMessage(HistoryItem *item) {
|
||||||
_shownMessage = item;
|
_shownMessage = item;
|
||||||
if (item) {
|
if (item) {
|
||||||
updateShownMessageText();
|
updateShownMessageText();
|
||||||
//if (item->fullId() == _editMsgId.current()) {
|
|
||||||
// _preview = {};
|
|
||||||
// if (const auto media = item->media()) {
|
|
||||||
// if (const auto page = media->webpage()) {
|
|
||||||
// const auto preview = ProcessWebPageData(page);
|
|
||||||
// _title = preview.title;
|
|
||||||
// _description = preview.description;
|
|
||||||
// _preview.data = page;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
} else {
|
} else {
|
||||||
_shownMessageText.clear();
|
_shownMessageText.clear();
|
||||||
resolveMessageData();
|
resolveMessageData();
|
||||||
|
|
|
@ -357,8 +357,6 @@ void PreviewWrap::paintEvent(QPaintEvent *e) {
|
||||||
_element->draw(p, context);
|
_element->draw(p, context);
|
||||||
|
|
||||||
if (_element->displayFromPhoto()) {
|
if (_element->displayFromPhoto()) {
|
||||||
auto userpicMinBottomSkip = st::historyPaddingBottom
|
|
||||||
+ st::msgMargin.bottom();
|
|
||||||
auto userpicBottom = height()
|
auto userpicBottom = height()
|
||||||
- _element->marginBottom()
|
- _element->marginBottom()
|
||||||
- _element->marginTop();
|
- _element->marginTop();
|
||||||
|
|
|
@ -610,7 +610,6 @@ bool AddReplyToMessageAction(
|
||||||
? tr::lng_context_reply_msg(tr::now)
|
? tr::lng_context_reply_msg(tr::now)
|
||||||
: tr::lng_context_quote_and_reply(tr::now);
|
: tr::lng_context_quote_and_reply(tr::now);
|
||||||
text.replace('&', u"&&"_q);
|
text.replace('&', u"&&"_q);
|
||||||
const auto owner = &item->history()->owner();
|
|
||||||
const auto itemId = item->fullId();
|
const auto itemId = item->fullId();
|
||||||
menu->addAction(text, [=] {
|
menu->addAction(text, [=] {
|
||||||
if (!item) {
|
if (!item) {
|
||||||
|
|
|
@ -1386,7 +1386,6 @@ void Message::paintFromName(
|
||||||
const auto from = item->displayFrom();
|
const auto from = item->displayFrom();
|
||||||
const auto info = from ? nullptr : item->hiddenSenderInfo();
|
const auto info = from ? nullptr : item->hiddenSenderInfo();
|
||||||
Assert(from || info);
|
Assert(from || info);
|
||||||
const auto st = context.st;
|
|
||||||
const auto nameFg = !context.outbg
|
const auto nameFg = !context.outbg
|
||||||
? FromNameFg(context, colorIndex())
|
? FromNameFg(context, colorIndex())
|
||||||
: stm->msgServiceFg->c;
|
: stm->msgServiceFg->c;
|
||||||
|
@ -2683,7 +2682,6 @@ TextWithEntities Message::selectedQuote(
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
auto modified = selection;
|
auto modified = selection;
|
||||||
const auto &modifications = text.modifications();
|
|
||||||
for (const auto &modification : text.modifications()) {
|
for (const auto &modification : text.modifications()) {
|
||||||
if (modification.position >= selection.to) {
|
if (modification.position >= selection.to) {
|
||||||
break;
|
break;
|
||||||
|
@ -2777,7 +2775,6 @@ TextSelection Message::selectionFromQuote(
|
||||||
}
|
}
|
||||||
offset = i + 1;
|
offset = i + 1;
|
||||||
}
|
}
|
||||||
const auto &modifications = text.modifications();
|
|
||||||
//for (const auto &modification : text.modifications()) {
|
//for (const auto &modification : text.modifications()) {
|
||||||
// if (modification.position >= selection.to) {
|
// if (modification.position >= selection.to) {
|
||||||
// break;
|
// break;
|
||||||
|
|
|
@ -251,12 +251,8 @@ QSize Giveaway::countCurrentSize(int newWidth) {
|
||||||
void Giveaway::draw(Painter &p, const PaintContext &context) const {
|
void Giveaway::draw(Painter &p, const PaintContext &context) const {
|
||||||
if (width() < st::msgPadding.left() + st::msgPadding.right() + 1) return;
|
if (width() < st::msgPadding.left() + st::msgPadding.right() + 1) return;
|
||||||
|
|
||||||
const auto st = context.st;
|
|
||||||
const auto sti = context.imageStyle();
|
|
||||||
const auto stm = context.messageStyle();
|
const auto stm = context.messageStyle();
|
||||||
|
|
||||||
auto &semibold = stm->msgServiceFg;
|
|
||||||
|
|
||||||
auto padding = inBubblePadding();
|
auto padding = inBubblePadding();
|
||||||
|
|
||||||
const auto outer = width();
|
const auto outer = width();
|
||||||
|
@ -343,7 +339,6 @@ void Giveaway::paintChannels(
|
||||||
}
|
}
|
||||||
|
|
||||||
const auto size = _channels[0].geometry.height();
|
const auto size = _channels[0].geometry.height();
|
||||||
const auto ratio = style::DevicePixelRatio();
|
|
||||||
const auto st = context.st;
|
const auto st = context.st;
|
||||||
const auto stm = context.messageStyle();
|
const auto stm = context.messageStyle();
|
||||||
const auto selected = context.selected();
|
const auto selected = context.selected();
|
||||||
|
@ -491,8 +486,6 @@ void Giveaway::clickHandlerPressedChanged(
|
||||||
}
|
}
|
||||||
if (pressed) {
|
if (pressed) {
|
||||||
if (!channel.ripple) {
|
if (!channel.ripple) {
|
||||||
const auto full = QRect(0, 0, width(), height());
|
|
||||||
const auto outer = full.marginsRemoved(inBubblePadding());
|
|
||||||
const auto owner = &parent()->history()->owner();
|
const auto owner = &parent()->history()->owner();
|
||||||
channel.ripple = std::make_unique<Ui::RippleAnimation>(
|
channel.ripple = std::make_unique<Ui::RippleAnimation>(
|
||||||
st::defaultRippleAnimation,
|
st::defaultRippleAnimation,
|
||||||
|
|
|
@ -260,8 +260,6 @@ void AskBoostBox(
|
||||||
box->setWidth(st::boxWideWidth);
|
box->setWidth(st::boxWideWidth);
|
||||||
box->setStyle(st::boostBox);
|
box->setStyle(st::boostBox);
|
||||||
|
|
||||||
const auto full = !data.boost.nextLevelBoosts;
|
|
||||||
|
|
||||||
struct State {
|
struct State {
|
||||||
rpl::variable<bool> you = false;
|
rpl::variable<bool> you = false;
|
||||||
bool submitted = false;
|
bool submitted = false;
|
||||||
|
|
|
@ -685,7 +685,6 @@ void SessionNavigation::applyBoost(
|
||||||
done(false);
|
done(false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
auto already = false;
|
|
||||||
auto different = PeerId();
|
auto different = PeerId();
|
||||||
auto earliest = TimeId(-1);
|
auto earliest = TimeId(-1);
|
||||||
const auto now = base::unixtime::now();
|
const auto now = base::unixtime::now();
|
||||||
|
|
Loading…
Add table
Reference in a new issue