# HG changeset patch # User Matti Hamalainen # Date 1505816091 -10800 # Node ID c54ad71c1205a6470b896a586da1dab5ac7e53ec # Parent 9511e2f250be6c0e73364ec9824c28b2a1984185 Apply (kludgey) adjustment scales for printed page to avoid overflow .. diff -r 9511e2f250be -r c54ad71c1205 src/printing.cpp --- a/src/printing.cpp Tue Sep 19 13:01:29 2017 +0300 +++ b/src/printing.cpp Tue Sep 19 13:14:51 2017 +0300 @@ -13,6 +13,9 @@ #define APP_PRINT_WIDTH 1000 #define APP_PRINT_HEIGHT 1300 +#define APP_PRINT_WSCALE 1.01f +#define APP_PRINT_HSCALE 1.00f + void SyntilistaMainWindow::on_button_Print_clicked() { @@ -137,8 +140,8 @@ pt->save(); pt->scale( - pt->device()->width() / (float) APP_PRINT_WIDTH, - pt->device()->height() / (float) APP_PRINT_HEIGHT); + pt->device()->width() / ((float) APP_PRINT_WIDTH * APP_PRINT_WSCALE), + pt->device()->height() /((float) APP_PRINT_HEIGHT * APP_PRINT_HSCALE)); QFont font1; font1.setFamily("Arial");