Merge pull request #1451 from rusko124/fix/hardcode-host-for-local-assets

Edits: logs for the viewer
This commit is contained in:
Viktor Petersson
2020-12-18 17:11:41 +00:00
committed by GitHub
2 changed files with 3 additions and 0 deletions

View File

@@ -280,6 +280,7 @@ def view_image(uri):
browser_bus.loadImage(uri)
current_browser_url = uri
logging.info('Current url is {0}'.format(current_browser_url))
logging.info(browser.process.stdout)
def view_video(uri, duration):

View File

@@ -54,6 +54,8 @@ void View::loadImage(const QString &preUri)
src = preUri;
}
qDebug() << "Current src: " + src;
QString script = "window.setimg=function(n){var o=new Image;o.onload=function()"
"{document.body.style.backgroundSize=o.width>window.innerWidth||o.height>window.innerHeight?\"contain\":\"auto\",document.body.style.backgroundImage=\"url('\"+n+\"')\"},o.src=n};";
QString styles = "background: #000 center no-repeat";