Skip to content

Commit 0058f87

Browse files
committed
Updating background color of the QtWebEnginePage, to prevent white flash while loading
1 parent aa31e0e commit 0058f87

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/windows/views/timeline_webview.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737

3838
import openshot # Python module for libopenshot (required video editing module installed separately)
3939
from PyQt5.QtCore import QFileInfo, pyqtSlot, QUrl, Qt, QCoreApplication, QTimer
40-
from PyQt5.QtGui import QCursor, QKeySequence
40+
from PyQt5.QtGui import QCursor, QKeySequence, QColor
4141
from PyQt5.QtWebEngineWidgets import QWebEngineView
4242
from PyQt5.QtWebChannel import QWebChannel
4343
from PyQt5.QtWidgets import QMenu
@@ -3118,6 +3118,9 @@ def __init__(self, window):
31183118
self.last_position_frames = None
31193119
self.document_is_ready = False
31203120

3121+
# Set background color of timeline
3122+
self.page().setBackgroundColor(QColor("#363636"))
3123+
31213124
# Delete the webview when closed
31223125
self.setAttribute(Qt.WA_DeleteOnClose)
31233126

0 commit comments

Comments
 (0)