ENH: webview dark mode

Change-Id: I0b58e759268d057d5942dd8726c37d1abbdd5930
This commit is contained in:
chunmao.guo authored and Lane.Wei committed 2022-12-15 04:38:15 -05:00
1 parent 65ee16f676
commit bf24a71b60
7 files changed
+87 -10

No files matched your search

+10
View File
@@ -81,6 +81,16 @@ MarkdownTip::MarkdownTip()
_timer = new wxTimer;
_timer->Bind(wxEVT_TIMER, &MarkdownTip::OnTimer, this);
Bind(EVT_WEBVIEW_RECREATED, [this](auto &evt) {
Hide();
_lastTip.clear();
#ifdef __WXMSW__
_tipView = dynamic_cast<wxWebView *>(evt.GetEventObject());
GetSizer()->Add(_tipView, wxSizerFlags().Expand().Proportion(1));
Layout();
#endif
});
}
MarkdownTip::~MarkdownTip() { delete _timer; }