From e53e7a993b0d256c44bd1225b5d4231c3647a292 Mon Sep 17 00:00:00 2001 From: Arin Alex Date: Wed, 31 Jul 2024 20:04:07 +0300 Subject: [PATCH] #467 Fixed --- CMakeLists.txt | 2 +- common.pri | 2 +- limereport/lrbasedesignintf.cpp | 4 ++++ limereport/lrbasedesignintf.h | 4 +--- limereport/lrpagedesignintf.cpp | 6 +----- limereport/scripteditor/lrscripthighlighter.cpp | 8 ++++---- 6 files changed, 12 insertions(+), 14 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e36701e..aff69f8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,7 +4,7 @@ project(limereport) set(DEFAULT_ITEM_PADDING 0) set(LIMEREPORT_VERSION_MAJOR 1) set(LIMEREPORT_VERSION_MINOR 7) -set(LIMEREPORT_VERSION_RELEASE 9) +set(LIMEREPORT_VERSION_RELEASE 14) option(ENABLE_ZINT "Enable libzint build for barcode support" OFF) option(LIMEREPORT_STATIC "Build LimeReport as static library" OFF) diff --git a/common.pri b/common.pri index e2a5df0..e87efa0 100644 --- a/common.pri +++ b/common.pri @@ -141,7 +141,7 @@ RCC_DIR = $${ARCH_DIR}/$${BUILD_TYPE}/rcc LIMEREPORT_VERSION_MAJOR = 1 LIMEREPORT_VERSION_MINOR = 7 -LIMEREPORT_VERSION_RELEASE = 9 +LIMEREPORT_VERSION_RELEASE = 14 LIMEREPORT_VERSION = '$${LIMEREPORT_VERSION_MAJOR}.$${LIMEREPORT_VERSION_MINOR}.$${LIMEREPORT_VERSION_RELEASE}' DEFINES *= LIMEREPORT_VERSION_STR=\\\"$${LIMEREPORT_VERSION}\\\" diff --git a/limereport/lrbasedesignintf.cpp b/limereport/lrbasedesignintf.cpp index ec9271b..62d47c2 100644 --- a/limereport/lrbasedesignintf.cpp +++ b/limereport/lrbasedesignintf.cpp @@ -1524,6 +1524,10 @@ void BaseDesignIntf::setPossibleMoveFlags(int directionsFlags) m_possibleMoveDirectionFlags = directionsFlags; } +int BaseDesignIntf::marginSize() const { + return m_margin + (m_reportSettings != 0 ? m_reportSettings->baseItemPadding() : 0); +} + void BaseDesignIntf::setMarginSize(int value) { if (m_margin!=value){ diff --git a/limereport/lrbasedesignintf.h b/limereport/lrbasedesignintf.h index 758e2cb..f3d563d 100644 --- a/limereport/lrbasedesignintf.h +++ b/limereport/lrbasedesignintf.h @@ -295,9 +295,7 @@ public: int possibleMoveDirectionFlags() const; void setPossibleMoveFlags(int directionsFlags); - int marginSize() const { - return m_margin + m_reportSettings != 0 ? m_reportSettings->baseItemPadding() : 0; - } + int marginSize() const; void setMarginSize(int value); QString itemTypeName() const; diff --git a/limereport/lrpagedesignintf.cpp b/limereport/lrpagedesignintf.cpp index 8119bc4..bde5df2 100644 --- a/limereport/lrpagedesignintf.cpp +++ b/limereport/lrpagedesignintf.cpp @@ -422,11 +422,6 @@ void PageDesignIntf::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) m_selectionRect = 0; m_multiSelectStarted = false; } -// if(m_infoPosRect) -// { -// delete m_infoPosRect; -// m_infoPosRect = 0; -// } QGraphicsScene::mouseReleaseEvent(event); } @@ -524,6 +519,7 @@ BaseDesignIntf *PageDesignIntf::addReportItem(const QString &itemType, QPointF p if (band) { BaseDesignIntf *reportItem = addReportItem(itemType, band, band); reportItem->setPos(placePosOnGrid(band->mapFromScene(pos))); + reportItem->setReportSettings(m_reportSettings); reportItem->setSize(placeSizeOnGrid(size)); reportItem->setUnitType(pageItem()->unitType()); return reportItem; diff --git a/limereport/scripteditor/lrscripthighlighter.cpp b/limereport/scripteditor/lrscripthighlighter.cpp index 1877223..37771fd 100644 --- a/limereport/scripteditor/lrscripthighlighter.cpp +++ b/limereport/scripteditor/lrscripthighlighter.cpp @@ -248,16 +248,16 @@ ScriptHighlighter::ScriptHighlighter(QTextDocument* parent): } if ( isColorDark(QPalette().window().color())){ - m_formats[NumberFormat].setForeground(Qt::darkBlue); + m_formats[NumberFormat].setForeground(QColor("#45c6d1")); m_formats[StringFormat].setForeground(Qt::darkGreen); - m_formats[KeywordFormat].setForeground(Qt::darkYellow); - m_formats[CommentFormat].setForeground(Qt::darkGreen); + m_formats[KeywordFormat].setForeground(QColor("#cd5125")); + m_formats[CommentFormat].setForeground(QColor("#80807e")); m_formats[CommentFormat].setFontItalic(true); } else { m_formats[NumberFormat].setForeground(QColor("#ff6aad")); m_formats[StringFormat].setForeground(QColor("#b27f40")); m_formats[KeywordFormat].setForeground(QColor("#45c5d5")); - m_formats[CommentFormat].setForeground(QColor("#a1a4a9")); + m_formats[CommentFormat].setForeground(QColor("#a8aaab")); m_formats[CommentFormat].setFontItalic(true); } }