39 lines
1.3 KiB
Diff
39 lines
1.3 KiB
Diff
--- digikam/utilities/imageeditor/tools/imageprint.cpp
|
|
+++ digikam/utilities/imageeditor/tools/imageprint.cpp
|
|
@@ -149,18 +149,9 @@
|
|
|
|
int w, h; // will be set to the width and height of the printer
|
|
// when the orientation is decided.
|
|
- 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 );
|
|
}
|