mirror of
https://github.com/fralx/LimeReport.git
synced 2024-12-24 00:33:02 +03:00
fixed border render when scaling
This commit is contained in:
parent
cb66b1fd2a
commit
52f43f946b
@ -1172,7 +1172,9 @@ QPen BaseDesignIntf::borderPen(BorderSide side/*, bool selected*/) const
|
||||
if (m_borderLinesFlags & side) {
|
||||
pen.setColor(m_borderColor);
|
||||
pen.setStyle(m_borderStyle);
|
||||
pen.setWidthF(m_borderLineSize*1.333);
|
||||
pen.setCosmetic(true);
|
||||
pen.setWidthF(m_borderLineSize);
|
||||
|
||||
} else {
|
||||
pen.setColor(Qt::darkGray);
|
||||
pen.setStyle(Qt::SolidLine);
|
||||
|
@ -98,6 +98,7 @@ PageDesignIntf::PageDesignIntf(QObject *parent):
|
||||
updatePageRect();
|
||||
connect(this, SIGNAL(selectionChanged()), this, SLOT(slotSelectionChanged()));
|
||||
setBackgroundBrush(QBrush(Qt::white));
|
||||
|
||||
}
|
||||
|
||||
PageDesignIntf::~PageDesignIntf()
|
||||
@ -355,7 +356,7 @@ void PageDesignIntf::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
|
||||
);
|
||||
}
|
||||
} else {
|
||||
if (m_insertMode) m_itemInsertRect->setVisible(false);
|
||||
if (m_insertMode) m_itemInsertRect->setVisible(false);
|
||||
}
|
||||
|
||||
QGraphicsScene::mouseMoveEvent(event);
|
||||
@ -751,7 +752,7 @@ void PageDesignIntf::dropEvent(QGraphicsSceneDragDropEvent* event)
|
||||
bool isVar = event->mimeData()->text().indexOf("variable:")==0;
|
||||
BaseDesignIntf* item = addReportItem("TextItem",event->scenePos(),QSize(250, 50));
|
||||
TextItem* ti = dynamic_cast<TextItem*>(item);
|
||||
QString data = event->mimeData()->text().remove(0,event->mimeData()->text().indexOf(":")+1);
|
||||
QString data = event->mimeData()->text().remove(0,event->mimeData()->text().indexOf(":")+1);
|
||||
#if (QT_VERSION < QT_VERSION_CHECK(5, 15, 1))
|
||||
if (isVar) data = data.remove(QRegExp(" \\[.*\\]"));
|
||||
#else
|
||||
@ -944,7 +945,7 @@ CommandIf::Ptr PageDesignIntf::createChangePosCommand()
|
||||
newPos.pos = reportItem->pos();
|
||||
newPoses.append(newPos);
|
||||
}
|
||||
}
|
||||
}
|
||||
return PosChangedCommand::create(this, m_positionStamp, newPoses);
|
||||
}
|
||||
|
||||
@ -2651,7 +2652,7 @@ bool BandMoveFromToCommand::doIt()
|
||||
void BandMoveFromToCommand::undoIt()
|
||||
{
|
||||
if (page() && page()->pageItem())
|
||||
page()->pageItem()->moveBandFromTo(reverceFrom, reverceTo);
|
||||
page()->pageItem()->moveBandFromTo(reverceFrom, reverceTo);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -21,7 +21,7 @@ namespace LimeReport {
|
||||
|
||||
bool PreviewReportWidgetPrivate::pageIsVisible(){
|
||||
QGraphicsView* view = q_ptr->ui->graphicsView;
|
||||
if ( m_currentPage-1 >= m_reportPages.size() || m_currentPage <= 0 )
|
||||
if ( m_currentPage-1 >= m_reportPages.size() || m_currentPage <= 0 )
|
||||
return false;
|
||||
PageItemDesignIntf::Ptr page = m_reportPages.at(m_currentPage-1);
|
||||
return page->mapToScene(page->rect()).boundingRect().intersects(
|
||||
@ -103,6 +103,7 @@ PreviewReportWidget::PreviewReportWidget(ReportEngine *report, QWidget *parent)
|
||||
d_ptr->m_zoomer = new GraphicsViewZoomer(ui->graphicsView);
|
||||
connect(d_ptr->m_zoomer, SIGNAL(zoomed(double)), this, SLOT(slotZoomed(double)));
|
||||
connect(&m_resizeTimer, SIGNAL(timeout()), this, SLOT(resizeDone()));
|
||||
|
||||
}
|
||||
|
||||
PreviewReportWidget::~PreviewReportWidget()
|
||||
@ -151,6 +152,7 @@ void PreviewReportWidget::initPreview()
|
||||
ui->graphicsView->centerOn(0, 0);
|
||||
ui->graphicsView->scene()->setBackgroundBrush(QColor(m_previewPageBackgroundColor));
|
||||
setScalePercent(d_ptr->m_scalePercent);
|
||||
|
||||
PageDesignIntf* page = dynamic_cast<PageDesignIntf*>(ui->graphicsView->scene());
|
||||
if (page)
|
||||
connect(page, SIGNAL(itemInserted(LimeReport::PageDesignIntf*, QPointF, QString)),
|
||||
@ -236,7 +238,7 @@ void PreviewReportWidget::printPages(QPrinter* printer)
|
||||
}
|
||||
|
||||
void PreviewReportWidget::print()
|
||||
{
|
||||
{
|
||||
QPrinterInfo pi;
|
||||
QPrinter lp(QPrinter::HighResolution);
|
||||
|
||||
|
@ -1119,6 +1119,7 @@ bool PageView::viewportEvent(QEvent *event)
|
||||
m_verticalRuller->setGeometry(0, y+20, 20, (height - y));
|
||||
m_verticalRuller->update();
|
||||
m_horizontalRuller->update();
|
||||
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
@ -554,53 +554,53 @@ p, li { white-space: pre-wrap; }
|
||||
<context>
|
||||
<name>LimeReport::BaseDesignIntf</name>
|
||||
<message>
|
||||
<location filename="../limereport/lrbasedesignintf.cpp" line="1383"/>
|
||||
<location filename="../limereport/lrbasedesignintf.cpp" line="1811"/>
|
||||
<location filename="../limereport/lrbasedesignintf.cpp" line="1385"/>
|
||||
<location filename="../limereport/lrbasedesignintf.cpp" line="1813"/>
|
||||
<source>Lock item geometry</source>
|
||||
<translation>Verrouiller la géométrie d'un élément</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../limereport/lrbasedesignintf.cpp" line="1389"/>
|
||||
<location filename="../limereport/lrbasedesignintf.cpp" line="1391"/>
|
||||
<source>Copy</source>
|
||||
<translation>Copier</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../limereport/lrbasedesignintf.cpp" line="1391"/>
|
||||
<location filename="../limereport/lrbasedesignintf.cpp" line="1393"/>
|
||||
<source>Cut</source>
|
||||
<translation>Couper</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../limereport/lrbasedesignintf.cpp" line="1393"/>
|
||||
<location filename="../limereport/lrbasedesignintf.cpp" line="1395"/>
|
||||
<source>Paste</source>
|
||||
<translation>Coller</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../limereport/lrbasedesignintf.cpp" line="1403"/>
|
||||
<location filename="../limereport/lrbasedesignintf.cpp" line="1405"/>
|
||||
<source>Bring to top</source>
|
||||
<translation>Placer au premier-plan</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../limereport/lrbasedesignintf.cpp" line="1404"/>
|
||||
<location filename="../limereport/lrbasedesignintf.cpp" line="1406"/>
|
||||
<source>Send to back</source>
|
||||
<translation>Placer en arrière-plan</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../limereport/lrbasedesignintf.cpp" line="1407"/>
|
||||
<location filename="../limereport/lrbasedesignintf.cpp" line="1409"/>
|
||||
<source>Create Horizontal Layout</source>
|
||||
<translation>Créer une disposition horizontale</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../limereport/lrbasedesignintf.cpp" line="1411"/>
|
||||
<location filename="../limereport/lrbasedesignintf.cpp" line="1413"/>
|
||||
<source>Create Vertical Layout</source>
|
||||
<translation>Créer une disposition verticale</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../limereport/lrbasedesignintf.cpp" line="1414"/>
|
||||
<location filename="../limereport/lrbasedesignintf.cpp" line="1416"/>
|
||||
<source>No borders</source>
|
||||
<translation>Aucune bordure</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../limereport/lrbasedesignintf.cpp" line="1415"/>
|
||||
<location filename="../limereport/lrbasedesignintf.cpp" line="1417"/>
|
||||
<source>All borders</source>
|
||||
<translation>Toutes les bordures</translation>
|
||||
</message>
|
||||
@ -1740,12 +1740,12 @@ p, li { white-space: pre-wrap; }
|
||||
<translation>Formulaire</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../limereport/lrpreviewreportwidget.cpp" line="129"/>
|
||||
<location filename="../limereport/lrpreviewreportwidget.cpp" line="130"/>
|
||||
<source>%1 file name</source>
|
||||
<translation>%1 nom de fichier</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../limereport/lrpreviewreportwidget.cpp" line="288"/>
|
||||
<location filename="../limereport/lrpreviewreportwidget.cpp" line="289"/>
|
||||
<source>Report file name</source>
|
||||
<translation>Nom du fichier du rapport</translation>
|
||||
</message>
|
||||
@ -4185,14 +4185,14 @@ Cet aperçu n'est plus valide.</translation>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../limereport/lrpagedesignintf.cpp" line="1675"/>
|
||||
<location filename="../limereport/lrpagedesignintf.cpp" line="1717"/>
|
||||
<location filename="../limereport/lrpagedesignintf.cpp" line="1676"/>
|
||||
<location filename="../limereport/lrpagedesignintf.cpp" line="1718"/>
|
||||
<source>Attention!</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../limereport/lrpagedesignintf.cpp" line="1675"/>
|
||||
<location filename="../limereport/lrpagedesignintf.cpp" line="1717"/>
|
||||
<location filename="../limereport/lrpagedesignintf.cpp" line="1676"/>
|
||||
<location filename="../limereport/lrpagedesignintf.cpp" line="1718"/>
|
||||
<source>Selected elements have different parent containers</source>
|
||||
<translation>Les éléments sélectionnés ont un parent différent</translation>
|
||||
</message>
|
||||
|
@ -566,53 +566,53 @@ p, li { white-space: pre-wrap; }
|
||||
<context>
|
||||
<name>LimeReport::BaseDesignIntf</name>
|
||||
<message>
|
||||
<location filename="../limereport/lrbasedesignintf.cpp" line="1383"/>
|
||||
<location filename="../limereport/lrbasedesignintf.cpp" line="1811"/>
|
||||
<location filename="../limereport/lrbasedesignintf.cpp" line="1385"/>
|
||||
<location filename="../limereport/lrbasedesignintf.cpp" line="1813"/>
|
||||
<source>Lock item geometry</source>
|
||||
<translation>Zablokuj geometrię pozycji</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../limereport/lrbasedesignintf.cpp" line="1389"/>
|
||||
<location filename="../limereport/lrbasedesignintf.cpp" line="1391"/>
|
||||
<source>Copy</source>
|
||||
<translation>Kopiuj</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../limereport/lrbasedesignintf.cpp" line="1391"/>
|
||||
<location filename="../limereport/lrbasedesignintf.cpp" line="1393"/>
|
||||
<source>Cut</source>
|
||||
<translation>Wytnij</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../limereport/lrbasedesignintf.cpp" line="1393"/>
|
||||
<location filename="../limereport/lrbasedesignintf.cpp" line="1395"/>
|
||||
<source>Paste</source>
|
||||
<translation>Wklej</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../limereport/lrbasedesignintf.cpp" line="1403"/>
|
||||
<location filename="../limereport/lrbasedesignintf.cpp" line="1405"/>
|
||||
<source>Bring to top</source>
|
||||
<translation>Przenieś na górę</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../limereport/lrbasedesignintf.cpp" line="1404"/>
|
||||
<location filename="../limereport/lrbasedesignintf.cpp" line="1406"/>
|
||||
<source>Send to back</source>
|
||||
<translation>Przenieś na dół</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../limereport/lrbasedesignintf.cpp" line="1407"/>
|
||||
<location filename="../limereport/lrbasedesignintf.cpp" line="1409"/>
|
||||
<source>Create Horizontal Layout</source>
|
||||
<translation>Utwórz układ poziomy</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../limereport/lrbasedesignintf.cpp" line="1411"/>
|
||||
<location filename="../limereport/lrbasedesignintf.cpp" line="1413"/>
|
||||
<source>Create Vertical Layout</source>
|
||||
<translation>Utwórz układ pionowy</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../limereport/lrbasedesignintf.cpp" line="1414"/>
|
||||
<location filename="../limereport/lrbasedesignintf.cpp" line="1416"/>
|
||||
<source>No borders</source>
|
||||
<translation>Bez obramowania</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../limereport/lrbasedesignintf.cpp" line="1415"/>
|
||||
<location filename="../limereport/lrbasedesignintf.cpp" line="1417"/>
|
||||
<source>All borders</source>
|
||||
<translation>Pełne obramowanie</translation>
|
||||
</message>
|
||||
@ -1752,12 +1752,12 @@ p, li { white-space: pre-wrap; }
|
||||
<translation>Formatka</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../limereport/lrpreviewreportwidget.cpp" line="129"/>
|
||||
<location filename="../limereport/lrpreviewreportwidget.cpp" line="130"/>
|
||||
<source>%1 file name</source>
|
||||
<translation>%1 nazwa pliku</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../limereport/lrpreviewreportwidget.cpp" line="288"/>
|
||||
<location filename="../limereport/lrpreviewreportwidget.cpp" line="289"/>
|
||||
<source>Report file name</source>
|
||||
<translation>Nazwa pliku raportu</translation>
|
||||
</message>
|
||||
@ -4197,14 +4197,14 @@ Ten podgląd nie jest już prawidłowy.</translation>
|
||||
<translation>Ciąg znaków</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../limereport/lrpagedesignintf.cpp" line="1675"/>
|
||||
<location filename="../limereport/lrpagedesignintf.cpp" line="1717"/>
|
||||
<location filename="../limereport/lrpagedesignintf.cpp" line="1676"/>
|
||||
<location filename="../limereport/lrpagedesignintf.cpp" line="1718"/>
|
||||
<source>Attention!</source>
|
||||
<translation>Uwaga!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../limereport/lrpagedesignintf.cpp" line="1675"/>
|
||||
<location filename="../limereport/lrpagedesignintf.cpp" line="1717"/>
|
||||
<location filename="../limereport/lrpagedesignintf.cpp" line="1676"/>
|
||||
<location filename="../limereport/lrpagedesignintf.cpp" line="1718"/>
|
||||
<source>Selected elements have different parent containers</source>
|
||||
<translation>Wybrane elementy mają różne pojemniki nadrzędne</translation>
|
||||
</message>
|
||||
|
Loading…
Reference in New Issue
Block a user