mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-18 07:07:08 +02:00
Allow scale preview in separate window on Wayland
This commit is contained in:
parent
0c4d03477e
commit
93587ddc3c
1 changed files with 1 additions and 6 deletions
|
@ -133,16 +133,11 @@ private:
|
|||
|
||||
};
|
||||
|
||||
[[nodiscard]] bool UseSeparateWindow() {
|
||||
return !Platform::IsWayland()
|
||||
&& Ui::Platform::TranslucentWindowsSupported();
|
||||
}
|
||||
|
||||
Preview::Preview(QWidget *slider, rpl::producer<QImage> userpic)
|
||||
: _widget(slider->window())
|
||||
, _slider(slider)
|
||||
, _ratio(style::DevicePixelRatio())
|
||||
, _window(UseSeparateWindow()) {
|
||||
, _window(Ui::Platform::TranslucentWindowsSupported()) {
|
||||
std::move(userpic) | rpl::start_with_next([=](QImage &&userpic) {
|
||||
_userpicOriginal = std::move(userpic);
|
||||
if (!_userpicImage.isNull()) {
|
||||
|
|
Loading…
Add table
Reference in a new issue