mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-03 21:54:05 +02:00
Use separate window buttons only with QWindowContainer.
This commit is contained in:
parent
0659ccc3f0
commit
1267bcd255
2 changed files with 7 additions and 9 deletions
|
@ -857,6 +857,12 @@ bool Panel::createWebview(const Webview::ThemeParams ¶ms) {
|
|||
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
|
Loading…
Add table
Reference in a new issue