mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Allow resizing window of web apps / games.
This commit is contained in:
parent
7abc921d20
commit
4a84f9fa00
2 changed files with 5 additions and 2 deletions
|
@ -375,7 +375,7 @@ Panel::Panel(
|
||||||
, _widget(std::make_unique<SeparatePanel>())
|
, _widget(std::make_unique<SeparatePanel>())
|
||||||
, _allowClipboardRead(allowClipboardRead) {
|
, _allowClipboardRead(allowClipboardRead) {
|
||||||
_widget->setWindowFlag(Qt::WindowStaysOnTopHint, false);
|
_widget->setWindowFlag(Qt::WindowStaysOnTopHint, false);
|
||||||
_widget->setInnerSize(st::botWebViewPanelSize);
|
_widget->setInnerSize(st::botWebViewPanelSize, true);
|
||||||
|
|
||||||
_widget->closeRequests(
|
_widget->closeRequests(
|
||||||
) | rpl::start_with_next([=] {
|
) | rpl::start_with_next([=] {
|
||||||
|
@ -708,6 +708,9 @@ bool Panel::createWebview(const Webview::ThemeParams ¶ms) {
|
||||||
) | rpl::start_with_next([=](QRect geometry, int footer) {
|
) | rpl::start_with_next([=](QRect geometry, int footer) {
|
||||||
if (const auto view = raw->widget()) {
|
if (const auto view = raw->widget()) {
|
||||||
view->setGeometry(geometry.marginsRemoved({ 0, 0, 0, footer }));
|
view->setGeometry(geometry.marginsRemoved({ 0, 0, 0, footer }));
|
||||||
|
crl::on_main(view, [=] {
|
||||||
|
sendViewport();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}, _webview->lifetime);
|
}, _webview->lifetime);
|
||||||
|
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit c1d40351208d70c79a2238740fc359238ed028b7
|
Subproject commit 650a50ef30c0581f28abeb7afc12d8427e971c22
|
Loading…
Add table
Reference in a new issue