mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-08-14 10:34:14 +02:00
Apply minimal title block fix to zh (from c77f78e4a)
This commit is contained in:
@@ -450,9 +450,13 @@ QRect ProjectPrintWindow::diagramRect(Diagram *diagram, const ExportProperties &
|
||||
{
|
||||
auto diagram_rect = diagram->border_and_titleblock.borderAndTitleBlockRect();
|
||||
if (!option.draw_titleblock) {
|
||||
auto titleblock_height = diagram->border_and_titleblock.titleBlockRect().height();
|
||||
diagram_rect.setHeight(diagram_rect.height() - titleblock_height);
|
||||
}
|
||||
auto tbt_rect = diagram->border_and_titleblock.titleBlockRect();
|
||||
if (diagram->border_and_titleblock.titleBlockEdge() == Qt::BottomEdge)
|
||||
diagram_rect.setHeight(diagram_rect.height() - tbt_rect.height());
|
||||
else
|
||||
diagram_rect.setWidth(diagram_rect.width() - tbt_rect.width());
|
||||
}
|
||||
|
||||
|
||||
//Adjust the border of diagram to 1px (width of the line)
|
||||
diagram_rect.adjust(0,0,1,1);
|
||||
|
||||
Reference in New Issue
Block a user