diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2012-12-11 13:46:04 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2012-12-11 13:46:04 -0600 |
commit | e8cbbedf46da493d2c206444a7e18e5777402905 (patch) | |
tree | 8252315f3a8f7f12db0eb5f355118ad8a223dc16 | |
parent | e863a01b9b25bb426f1475d8e1e7a05f10f75177 (diff) | |
download | tqt3-e8cbbedf46da493d2c206444a7e18e5777402905.tar.gz tqt3-e8cbbedf46da493d2c206444a7e18e5777402905.zip |
Automated update from Qt3
-rw-r--r-- | src/kernel/qpaintdevice_x11.cpp | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/kernel/qpaintdevice_x11.cpp b/src/kernel/qpaintdevice_x11.cpp index 2521ffb1e..f3c1747c0 100644 --- a/src/kernel/qpaintdevice_x11.cpp +++ b/src/kernel/qpaintdevice_x11.cpp @@ -529,11 +529,16 @@ static void create_dpis() TQ_CHECK_PTR( dpisX ); TQ_CHECK_PTR( dpisY ); for ( i = 0; i < screens; i++ ) { - dpisX[ i ] = (DisplayWidth(dpy,i) * 254 + DisplayWidthMM(dpy,i)*5) - - / (DisplayWidthMM(dpy,i)*10); - dpisY[ i ] = (DisplayHeight(dpy,i) * 254 + DisplayHeightMM(dpy,i)*5) - / (DisplayHeightMM(dpy,i)*10); + if (DisplayWidthMM(dpy,i) < 1) + dpisX[ i ] = 75; // default the dpi to 75. + else + dpisX[ i ] = (DisplayWidth(dpy,i) * 254 + DisplayWidthMM(dpy,i)*5) + / (DisplayWidthMM(dpy,i)*10); + if (DisplayHeightMM(dpy,i) < 1) + dpisY[ i ] = 75; // default the dpi to 75. + else + dpisY[ i ] = (DisplayHeight(dpy,i) * 254 + DisplayHeightMM(dpy,i)*5) + / (DisplayHeightMM(dpy,i)*10); } } |