diff options
Diffstat (limited to 'printing')
-rw-r--r-- | printing/print_job_constants.cc | 6 | ||||
-rw-r--r-- | printing/print_settings.cc | 5 |
2 files changed, 6 insertions, 5 deletions
diff --git a/printing/print_job_constants.cc b/printing/print_job_constants.cc index fa99f25..3efb488 100644 --- a/printing/print_job_constants.cc +++ b/printing/print_job_constants.cc @@ -68,9 +68,9 @@ const int kSettingHeaderFooterFontSize = 8; // Number of horizontal regions for headers and footers. const float kSettingHeaderFooterHorizontalRegions = 3; -// Interstice or gap between different header footer components. -// Hardcoded to 0.25cm = 1/10" = 7.2points. -const float kSettingHeaderFooterInterstice = 7.2f; +// Interstice or gap between different header footer components. Hardcoded to +// about 0.5cm, match the value in PrintSettings::SetPrinterPrintableArea. +const float kSettingHeaderFooterInterstice = 14.2f; // Key that specifies the date of the page that will be printed in the headers // and footers. diff --git a/printing/print_settings.cc b/printing/print_settings.cc index 97de679..d08d02f5 100644 --- a/printing/print_settings.cc +++ b/printing/print_settings.cc @@ -5,6 +5,7 @@ #include "printing/print_settings.h" #include "base/atomic_sequence_num.h" +#include "printing/print_job_constants.h" #include "printing/units.h" namespace printing { @@ -54,8 +55,8 @@ void PrintSettings::SetPrinterPrintableArea( int margin_printer_units = 0; if (use_overlays) { // Hard-code text_height = 0.5cm = ~1/5 of inch. - header_footer_text_height = ConvertUnit(500, kHundrethsMMPerInch, - units_per_inch); + header_footer_text_height = ConvertUnit(kSettingHeaderFooterInterstice, + kPointsPerInch, units_per_inch); // Default margins 1.0cm = ~2/5 of an inch. margin_printer_units = ConvertUnit(1000, kHundrethsMMPerInch, units_per_inch); |