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:
@@ -3,6 +3,7 @@
|
||||
class QWidget;
|
||||
class QPoint;
|
||||
class QScreen;
|
||||
class QRect;
|
||||
|
||||
namespace chatterino::widgets {
|
||||
|
||||
@@ -17,6 +18,14 @@ enum class BoundsChecking {
|
||||
DesiredPosition,
|
||||
};
|
||||
|
||||
/// Applies bounds checking to @a initialBounds.
|
||||
///
|
||||
/// @param initialBounds The bounds to check.
|
||||
/// @param mode The desired bounds checking.
|
||||
/// @returns The potentially modified bounds.
|
||||
QRect checkInitialBounds(QRect initialBounds,
|
||||
BoundsChecking mode = BoundsChecking::DesiredPosition);
|
||||
|
||||
/// Moves the `window` to the (global) `position`
|
||||
/// while doing bounds-checking according to `mode` to ensure the window stays on one screen.
|
||||
///
|
||||
|
||||
Reference in New Issue
Block a user