mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-09-05 09:05:14 +00:00
Custom scroll bar in WebKit / Chromium.
This commit is contained in:
@@ -783,15 +783,20 @@ void Panel::showWebviewError(
|
||||
showCriticalError(rich);
|
||||
}
|
||||
|
||||
void Panel::updateThemeParams(const QByteArray &json) {
|
||||
void Panel::updateThemeParams(const Webview::ThemeParams ¶ms) {
|
||||
if (!_webview || !_webview->window.widget()) {
|
||||
return;
|
||||
}
|
||||
_webview->window.updateTheme(
|
||||
params.scrollBg,
|
||||
params.scrollBgOver,
|
||||
params.scrollBarBg,
|
||||
params.scrollBarBgOver);
|
||||
_webview->window.eval(R"(
|
||||
if (window.TelegramGameProxy) {
|
||||
window.TelegramGameProxy.receiveEvent(
|
||||
"theme_changed",
|
||||
{ "theme_params": )" + json + R"( });
|
||||
{ "theme_params": )" + params.json + R"( });
|
||||
}
|
||||
)");
|
||||
}
|
||||
|
Reference in New Issue
Block a user