mirror of
https://github.com/YACReader/yacreader
synced 2025-06-04 01:28:55 -04:00
fixed fontSize in flow_gl in hdpi displays
This commit is contained in:
parent
d2de64d51a
commit
675adb526c
@ -97,8 +97,8 @@ void GridComicsView::setModel(ComicModel *model)
|
|||||||
ctxt->setContextProperty("textColor", "#E6E6E6");
|
ctxt->setContextProperty("textColor", "#E6E6E6");
|
||||||
ctxt->setContextProperty("dropShadow",false);
|
ctxt->setContextProperty("dropShadow",false);
|
||||||
//fonts settings
|
//fonts settings
|
||||||
ctxt->setContextProperty("fontSize", "none");
|
ctxt->setContextProperty("fontSize", "12");
|
||||||
ctxt->setContextProperty("fontFamily", "none");
|
ctxt->setContextProperty("fontFamily", "Arial");
|
||||||
ctxt->setContextProperty("fontSpacing", 0.5);
|
ctxt->setContextProperty("fontSpacing", 0.5);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -355,7 +355,8 @@ void YACReaderFlowGL::paintGL()
|
|||||||
|
|
||||||
void YACReaderFlowGL::resizeGL(int width, int height)
|
void YACReaderFlowGL::resizeGL(int width, int height)
|
||||||
{
|
{
|
||||||
fontSize = (width + height) * 0.010;
|
float pixelRatio = devicePixelRatio();
|
||||||
|
fontSize = (width + height) * 0.010 * pixelRatio;
|
||||||
if(fontSize < 10)
|
if(fontSize < 10)
|
||||||
fontSize = 10;
|
fontSize = 10;
|
||||||
|
|
||||||
|
@ -325,8 +325,8 @@ void YACReaderFlowGL::paintGL()
|
|||||||
|
|
||||||
void YACReaderFlowGL::resizeGL(int width, int height)
|
void YACReaderFlowGL::resizeGL(int width, int height)
|
||||||
{
|
{
|
||||||
|
float pixelRatio = devicePixelRatio();
|
||||||
fontSize = (width + height) * 0.010;
|
fontSize = (width + height) * 0.010 * pixelRatio;
|
||||||
if(fontSize < 10)
|
if(fontSize < 10)
|
||||||
fontSize = 10;
|
fontSize = 10;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user