mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Follow TitleControlsLayout in the PiP
This commit is contained in:
parent
07232e2520
commit
be133fce78
1 changed files with 5 additions and 1 deletions
|
@ -47,7 +47,11 @@ constexpr auto kPipLoaderPriority = 2;
|
||||||
constexpr auto kMsInSecond = 1000;
|
constexpr auto kMsInSecond = 1000;
|
||||||
|
|
||||||
[[nodiscard]] bool IsWindowControlsOnLeft() {
|
[[nodiscard]] bool IsWindowControlsOnLeft() {
|
||||||
return Platform::IsMac();
|
using Control = Ui::Platform::TitleControls::Control;
|
||||||
|
const auto controlsLayout = Ui::Platform::TitleControlsLayout();
|
||||||
|
return ranges::contains(controlsLayout.left, Control::Close)
|
||||||
|
|| (controlsLayout.left.size() > controlsLayout.right.size()
|
||||||
|
&& !ranges::contains(controlsLayout.right, Control::Close));
|
||||||
}
|
}
|
||||||
|
|
||||||
[[nodiscard]] QRect ScreenFromPosition(QPoint point) {
|
[[nodiscard]] QRect ScreenFromPosition(QPoint point) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue