2006-12-19 00:35:13 +01:00
|
|
|
--- digikam/utilities/imageeditor/tools/imageprint.cpp
|
|
|
|
+++ digikam/utilities/imageeditor/tools/imageprint.cpp
|
2007-03-06 19:08:31 +01:00
|
|
|
@@ -149,20 +149,11 @@
|
2006-12-19 00:35:13 +01:00
|
|
|
|
|
|
|
int w, h; // will be set to the width and height of the printer
|
|
|
|
// when the orientation is decided.
|
2007-03-06 19:08:31 +01:00
|
|
|
w = metrics.width();
|
|
|
|
h = metrics.height();
|
2006-12-19 00:35:13 +01:00
|
|
|
- int filenameOffset = 0;
|
|
|
|
|
|
|
|
QSize size = image2Print.size();
|
|
|
|
|
|
|
|
- bool printFilename = m_printer.option( "app-imageeditor-printFilename" ) != f;
|
|
|
|
- if ( printFilename )
|
|
|
|
- {
|
|
|
|
- // filename goes into one line!
|
|
|
|
- filenameOffset = fm.lineSpacing() + 14;
|
|
|
|
- h -= filenameOffset;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
if ( m_printer.option( "app-imageeditor-scaleToFit" ) != f )
|
|
|
|
{
|
|
|
|
if ( m_printer.option( "app-imageeditor-auto-rotate" ) == t )
|
|
|
|
@@ -236,6 +227,7 @@
|
|
|
|
// Perform the actual drawing.
|
|
|
|
p.drawImage( QRect( x, y, size.width(), size.height()), image2Print );
|
|
|
|
|
|
|
|
+ bool printFilename = m_printer.option( "app-imageeditor-printFilename" ) != f;
|
|
|
|
if ( printFilename )
|
|
|
|
{
|
|
|
|
QString fname = minimizeString( d->filename, fm, w );
|
|
|
|
@@ -244,6 +236,8 @@
|
|
|
|
{
|
|
|
|
int fw = fm.width( fname );
|
|
|
|
int x = (w - fw)/2;
|
|
|
|
+ // filename goes into one line!
|
|
|
|
+ int filenameOffset = fm.lineSpacing() + 14;
|
|
|
|
int y = metrics.height() - filenameOffset/2;
|
|
|
|
p.drawText( x, y, fname );
|
|
|
|
}
|