Skip to content

Commit

Permalink
Allow resizing window of web apps / games.
Browse files Browse the repository at this point in the history
  • Loading branch information
john-preston committed Sep 19, 2024
1 parent 7abc921 commit 4a84f9f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion Telegram/SourceFiles/ui/chat/attach/attach_bot_webview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ Panel::Panel(
, _widget(std::make_unique<SeparatePanel>())
, _allowClipboardRead(allowClipboardRead) {
_widget->setWindowFlag(Qt::WindowStaysOnTopHint, false);
_widget->setInnerSize(st::botWebViewPanelSize);
_widget->setInnerSize(st::botWebViewPanelSize, true);

_widget->closeRequests(
) | rpl::start_with_next([=] {
Expand Down Expand Up @@ -708,6 +708,9 @@ bool Panel::createWebview(const Webview::ThemeParams &params) {
) | rpl::start_with_next([=](QRect geometry, int footer) {
if (const auto view = raw->widget()) {
view->setGeometry(geometry.marginsRemoved({ 0, 0, 0, footer }));
crl::on_main(view, [=] {
sendViewport();
});
}
}, _webview->lifetime);

Expand Down

0 comments on commit 4a84f9f

Please sign in to comment.