Skip to content

Commit

Permalink
Merge pull request #9765 from elpaso/fix-webkit-build
Browse files Browse the repository at this point in the history
Fix build without webkit
  • Loading branch information
elpaso committed Apr 10, 2019
2 parents 9ce1093 + cce1d69 commit 2e613b4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/gui/editorwidgets/qgshtmlwidgetwrapper.cpp
Expand Up @@ -18,9 +18,9 @@
#include "qgsmessagelog.h"
#include "qgsexpressioncontextutils.h"
#include "qgsapplication.h"

#include "qgswebframe.h"


QgsHtmlWidgetWrapper::QgsHtmlWidgetWrapper( QgsVectorLayer *layer, QWidget *editor, QWidget *parent )
: QgsWidgetWrapper( layer, editor, parent )
{
Expand All @@ -45,6 +45,7 @@ void QgsHtmlWidgetWrapper::initWidget( QWidget *editor )
return;

mWidget->setHtml( mHtmlCode );
#ifdef WITH_QTWEBKIT
const int horizontalDpi = qApp->desktop()->screen()->logicalDpiX();
mWidget->setZoomFactor( horizontalDpi / 96.0 );

Expand All @@ -54,6 +55,7 @@ void QgsHtmlWidgetWrapper::initWidget( QWidget *editor )
auto docHeight { page->mainFrame()->contentsSize().height() };
mWidget->setFixedHeight( docHeight );
}, Qt::ConnectionType::UniqueConnection );
#endif

}

Expand Down

0 comments on commit 2e613b4

Please sign in to comment.