forked from qt-creator/qt-creator
Help: Fix font point sizes with litehtml
Change-Id: Ia2d7434ed965b00075747c0bdd43d90a236b99dd Reviewed-by: Cristian Adam <cristian.adam@qt.io> Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -505,7 +505,8 @@ void DocumentContainer::draw_text(litehtml::uint_ptr hdc,
|
||||
|
||||
int DocumentContainer::pt_to_px(int pt)
|
||||
{
|
||||
return pt;
|
||||
// magic factor of 11/12 to account for differences to webengine/webkit
|
||||
return m_paintDevice->physicalDpiY() * pt * 11 / m_paintDevice->logicalDpiY() / 12;
|
||||
}
|
||||
|
||||
int DocumentContainer::get_default_font_size() const
|
||||
@@ -847,6 +848,11 @@ void DocumentContainer::get_language(litehtml::tstring &language, litehtml::tstr
|
||||
Q_UNUSED(culture)
|
||||
}
|
||||
|
||||
void DocumentContainer::setPaintDevice(QPaintDevice *paintDevice)
|
||||
{
|
||||
m_paintDevice = paintDevice;
|
||||
}
|
||||
|
||||
void DocumentContainer::setScrollPosition(const QPoint &pos)
|
||||
{
|
||||
m_scrollPosition = pos;
|
||||
|
||||
Reference in New Issue
Block a user