feat(emote-popup): save size of popup (#5415)

* fix: remove added margins from emote window position

* chore: add changelog entry

* feat: store size of emote window

* chore: update changelog entry

* fix: disable layout save

* fix: PCH moment

* fix: multiply by scale
This commit is contained in:
nerix
2024-06-01 12:38:39 +02:00
committed by GitHub
parent c3bb99eb01
commit 65bfec963b
12 changed files with 138 additions and 45 deletions
+6 -3
View File
@@ -29,7 +29,9 @@
# pragma comment(lib, "Dwmapi.lib")
# include <QHBoxLayout>
# include <QMargins>
# include <QOperatingSystemVersion>
# include <QWindow>
#endif
#include "widgets/helper/TitlebarButton.hpp"
@@ -251,8 +253,9 @@ BaseWindow::~BaseWindow()
DebugCount::decrease("BaseWindow");
}
void BaseWindow::setInitialBounds(const QRect &bounds)
void BaseWindow::setInitialBounds(QRect bounds, widgets::BoundsChecking mode)
{
bounds = widgets::checkInitialBounds(bounds, mode);
#ifdef USEWINSDK
this->initalBounds_ = bounds;
#else
@@ -260,7 +263,7 @@ void BaseWindow::setInitialBounds(const QRect &bounds)
#endif
}
QRect BaseWindow::getBounds()
QRect BaseWindow::getBounds() const
{
#ifdef USEWINSDK
return this->currentBounds_;
@@ -444,7 +447,7 @@ QWidget *BaseWindow::getLayoutContainer()
}
}
bool BaseWindow::hasCustomWindowFrame()
bool BaseWindow::hasCustomWindowFrame() const
{
return BaseWindow::supportsCustomWindowFrame() && this->enableCustomFrame_;
}