mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-09-03 16:05:57 +00:00
Use separate window buttons only with QWindowContainer.
This commit is contained in:
@@ -857,6 +857,12 @@ bool Panel::createWebview(const Webview::ThemeParams ¶ms) {
|
|||||||
if (!raw->widget()) {
|
if (!raw->widget()) {
|
||||||
return false;
|
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, [=] {
|
QObject::connect(raw->widget(), &QObject::destroyed, [=] {
|
||||||
const auto parent = _webviewParent.data();
|
const auto parent = _webviewParent.data();
|
||||||
if (!_webview
|
if (!_webview
|
||||||
@@ -1613,14 +1619,6 @@ void Panel::overrideBodyColor(std::optional<QColor> color) {
|
|||||||
raw->setTextColorOverride(std::nullopt);
|
raw->setTextColorOverride(std::nullopt);
|
||||||
return;
|
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 contrast = 2.5;
|
||||||
const auto luminance = 0.2126 * color->redF()
|
const auto luminance = 0.2126 * color->redF()
|
||||||
+ 0.7152 * color->greenF()
|
+ 0.7152 * color->greenF()
|
||||||
|
Submodule Telegram/lib_ui updated: 716986e75b...c6710c2cfe
Reference in New Issue
Block a user