mirror of
https://github.com/servo/servo.git
synced 2025-09-29 16:19:14 +01:00
servoshell: Ensure that the theme is applied properly on startup (#37128)
Instead of only applying the theme when it changes, apply it to both egui and all newly created `WebView`s. Reference Zulip thread: https://servo.zulipchat.com/#narrow/channel/437943-embedding/topic/Theme.20.28light.2Fdark.20mode.29.20support.20on.20initial.20page.20load/with/520082314 Testing: There are tests for servoshell currently, so all testing is manual. Fixes: #34913 Signed-off-by: Tony <legendmastertony@gmail.com>
This commit is contained in:
parent
d3e57a513c
commit
7147e06b53
4 changed files with 13 additions and 2 deletions
|
@ -113,6 +113,7 @@ impl RunningAppState {
|
|||
.delegate(self.clone())
|
||||
.build();
|
||||
|
||||
webview.notify_theme_change(self.inner().window.theme());
|
||||
webview.focus();
|
||||
webview.raise_to_top(true);
|
||||
|
||||
|
@ -475,6 +476,7 @@ impl WebViewDelegate for RunningAppState {
|
|||
.delegate(parent_webview.delegate())
|
||||
.build();
|
||||
|
||||
webview.notify_theme_change(self.inner().window.theme());
|
||||
webview.focus();
|
||||
webview.raise_to_top(true);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue