Allow scale preview in separate window on Wayland

This commit is contained in:
Ilya Fedin 2024-09-09 01:10:22 +04:00 committed by John Preston
parent 0c4d03477e
commit 93587ddc3c

View file

@ -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()) {