Skip to content

Commit

Permalink
fix typo
Browse files Browse the repository at this point in the history
adjust columns dimensions
  • Loading branch information
alexbruy committed Sep 5, 2021
1 parent 3394970 commit 50cb706
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/gui/qgsconfigureshortcutsdialog.cpp
Expand Up @@ -50,7 +50,7 @@ QgsConfigureShortcutsDialog::QgsConfigureShortcutsDialog( QWidget *parent, QgsSh
mSaveMenu->addAction( mSaveUserShortcuts );
connect( mSaveUserShortcuts, &QAction::triggered, this, [this] { saveShortcuts( false ); } );

mSaveAllShortcuts = new QAction( tr( "Save All Shportcuts" ), this );
mSaveAllShortcuts = new QAction( tr( "Save All Shortcuts" ), this );
mSaveMenu->addAction( mSaveAllShortcuts );
connect( mSaveAllShortcuts, &QAction::triggered, this, [this] { saveShortcuts(); } );

Expand Down Expand Up @@ -554,9 +554,9 @@ void QgsConfigureShortcutsDialog::saveShortcutsPdf()
tableFormat.setHeaderRowCount( 1 );

QVector<QTextLength> constraints;
constraints << QTextLength( QTextLength::PercentageLength, 2 );
constraints << QTextLength( QTextLength::PercentageLength, 5 );
constraints << QTextLength( QTextLength::PercentageLength, 80 );
constraints << QTextLength( QTextLength::PercentageLength, 18 );
constraints << QTextLength( QTextLength::PercentageLength, 15 );
tableFormat.setColumnWidthConstraints( constraints );

QTextTableCellFormat headerFormat;
Expand Down Expand Up @@ -635,9 +635,12 @@ void QgsConfigureShortcutsDialog::saveShortcutsPdf()
table->cellAt( row, 2 ).firstCursorPosition().insertText( sequence );
}

QPrinter printer( QPrinter::PrinterResolution );
QPrinter printer( QPrinter::ScreenResolution );
printer.setOutputFormat( QPrinter::PdfFormat );
printer.setPaperSize( QPrinter::A4 );
printer.setPageOrientation( QPageLayout::Portrait );
printer.setPageMargins( QMarginsF( 20, 10, 10, 10 ), QPageLayout::Millimeter );
printer.setOutputFileName( fileName );
document->setPageSize( QSizeF( printer.pageRect().size() ) );
document->print( &printer );
}

0 comments on commit 50cb706

Please sign in to comment.