Use separate window buttons only with QWindowContainer.

This commit is contained in:
John Preston 2024-11-19 13:16:54 +04:00
parent 0659ccc3f0
commit 1267bcd255
2 changed files with 7 additions and 9 deletions

View file

@ -857,6 +857,12 @@ bool Panel::createWebview(const Webview::ThemeParams &params) {
if (!raw->widget()) {
return false;
}
#if !defined Q_OS_WIN && !defined Q_OS_MAC
_widget->allowChildFullScreenControls(
!raw->widget()->inherits("QWindowContainer"));
#endif // !Q_OS_WIN && !Q_OS_MAC
QObject::connect(raw->widget(), &QObject::destroyed, [=] {
const auto parent = _webviewParent.data();
if (!_webview
@ -1613,14 +1619,6 @@ void Panel::overrideBodyColor(std::optional<QColor> color) {
raw->setTextColorOverride(std::nullopt);
return;
}
const auto set = [](const style::color &color, QColor value) {
color.set(
uchar(value.red()),
uchar(value.green()),
uchar(value.blue()),
uchar(value.alpha()));
};
const auto contrast = 2.5;
const auto luminance = 0.2126 * color->redF()
+ 0.7152 * color->greenF()

@ -1 +1 @@
Subproject commit 716986e75b3abc3329f75346aeff9062a58bf98f
Subproject commit c6710c2cfe68d3bc3c29ffbf6cd9d0a4cb168226