mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-16 14:17:12 +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;
|
||||
|
||||
[[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) {
|
||||
|
|
Loading…
Add table
Reference in a new issue