forked from quickshell/quickshell
core/window: add implicit size properties to window types
This commit is contained in:
parent
ead9141aca
commit
6a8284dae3
10 changed files with 140 additions and 57 deletions
|
@ -1,4 +1,5 @@
|
|||
#include "surface.hpp"
|
||||
#include <algorithm>
|
||||
#include <any>
|
||||
|
||||
#include <private/qhighdpiscaling_p.h>
|
||||
|
@ -61,8 +62,8 @@ toWaylandKeyboardFocus(const WlrKeyboardFocus::Enum& focus) noexcept {
|
|||
|
||||
[[nodiscard]] QSize constrainedSize(const Anchors& anchors, const QSize& size) noexcept {
|
||||
return QSize(
|
||||
anchors.horizontalConstraint() ? 0 : size.width(),
|
||||
anchors.verticalConstraint() ? 0 : size.height()
|
||||
anchors.horizontalConstraint() ? 0 : std::max(1, size.width()),
|
||||
anchors.verticalConstraint() ? 0 : std::max(1, size.height())
|
||||
);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue