[Fix] Qt 6 build fix
This commit is contained in:
parent
1ab39257cb
commit
31bfa9506c
4 changed files with 5 additions and 5 deletions
|
|
@ -531,7 +531,7 @@ void EditCaptionBox::emojiFilterForGeometry(not_null<QEvent*> event) {
|
||||||
|
|
||||||
void EditCaptionBox::updateEmojiPanelGeometry() {
|
void EditCaptionBox::updateEmojiPanelGeometry() {
|
||||||
const auto parent = _emojiPanel->parentWidget();
|
const auto parent = _emojiPanel->parentWidget();
|
||||||
const auto global = _emojiToggle->mapToGlobal({ 0, 0 });
|
const auto global = _emojiToggle->mapToGlobal(QPoint());
|
||||||
const auto local = parent->mapFromGlobal(global);
|
const auto local = parent->mapFromGlobal(global);
|
||||||
_emojiPanel->moveBottomRight(
|
_emojiPanel->moveBottomRight(
|
||||||
local.y(),
|
local.y(),
|
||||||
|
|
|
||||||
|
|
@ -970,8 +970,8 @@ void Content::setupContent(
|
||||||
const auto selectedCoords = [=] {
|
const auto selectedCoords = [=] {
|
||||||
const auto coords = [=](Rows *rows, int index) {
|
const auto coords = [=](Rows *rows, int index) {
|
||||||
const auto result = rows->rowScrollRequest(index);
|
const auto result = rows->rowScrollRequest(index);
|
||||||
const auto shift = rows->mapToGlobal({ 0, 0 }).y()
|
const auto shift = rows->mapToGlobal(QPoint()).y()
|
||||||
- mapToGlobal({ 0, 0 }).y();
|
- mapToGlobal(QPoint()).y();
|
||||||
return Ui::ScrollToRequest(
|
return Ui::ScrollToRequest(
|
||||||
result.ymin + shift,
|
result.ymin + shift,
|
||||||
result.ymax + shift);
|
result.ymax + shift);
|
||||||
|
|
|
||||||
|
|
@ -768,7 +768,7 @@ void SendFilesBox::emojiFilterForGeometry(not_null<QEvent*> event) {
|
||||||
|
|
||||||
void SendFilesBox::updateEmojiPanelGeometry() {
|
void SendFilesBox::updateEmojiPanelGeometry() {
|
||||||
const auto parent = _emojiPanel->parentWidget();
|
const auto parent = _emojiPanel->parentWidget();
|
||||||
const auto global = _emojiToggle->mapToGlobal({ 0, 0 });
|
const auto global = _emojiToggle->mapToGlobal(QPoint());
|
||||||
const auto local = parent->mapFromGlobal(global);
|
const auto local = parent->mapFromGlobal(global);
|
||||||
_emojiPanel->moveBottomRight(
|
_emojiPanel->moveBottomRight(
|
||||||
local.y(),
|
local.y(),
|
||||||
|
|
|
||||||
|
|
@ -121,7 +121,7 @@ object_ptr<Ui::RpWidget> InnerWidget::setupContent(
|
||||||
? request.ymin
|
? request.ymin
|
||||||
: mapFromGlobal(_members->mapToGlobal({ 0, request.ymin })).y();
|
: mapFromGlobal(_members->mapToGlobal({ 0, request.ymin })).y();
|
||||||
auto max = (request.ymin < 0)
|
auto max = (request.ymin < 0)
|
||||||
? mapFromGlobal(_members->mapToGlobal({ 0, 0 })).y()
|
? mapFromGlobal(_members->mapToGlobal(QPoint())).y()
|
||||||
: (request.ymax < 0)
|
: (request.ymax < 0)
|
||||||
? request.ymax
|
? request.ymax
|
||||||
: mapFromGlobal(_members->mapToGlobal({ 0, request.ymax })).y();
|
: mapFromGlobal(_members->mapToGlobal({ 0, request.ymax })).y();
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue