1. Adjust name start posY -10 pixel in customlogo.cpp 2. fix two word name issue.
This commit is contained in:
parent
60ecafb424
commit
74c515f78a
@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE QtCreatorProject>
|
<!DOCTYPE QtCreatorProject>
|
||||||
<!-- Written by QtCreator 14.0.1, 2024-09-28T10:42:56. -->
|
<!-- Written by QtCreator 14.0.1, 2024-09-28T11:46:19. -->
|
||||||
<qtcreator>
|
<qtcreator>
|
||||||
<data>
|
<data>
|
||||||
<variable>EnvironmentId</variable>
|
<variable>EnvironmentId</variable>
|
||||||
|
|||||||
@ -205,6 +205,7 @@
|
|||||||
<ClInclude Include="BirthdayCreater.h" />
|
<ClInclude Include="BirthdayCreater.h" />
|
||||||
<QtMoc Include="customlogo.h" />
|
<QtMoc Include="customlogo.h" />
|
||||||
<QtMoc Include="customlogo2.h" />
|
<QtMoc Include="customlogo2.h" />
|
||||||
|
<ClInclude Include="def.h" />
|
||||||
<ClInclude Include="FiveToSingle.h" />
|
<ClInclude Include="FiveToSingle.h" />
|
||||||
<ClInclude Include="HKHolderCreater.h" />
|
<ClInclude Include="HKHolderCreater.h" />
|
||||||
<ClInclude Include="INameCreater.h" />
|
<ClInclude Include="INameCreater.h" />
|
||||||
|
|||||||
@ -96,6 +96,9 @@
|
|||||||
<ClInclude Include="HKHolderCreater.h">
|
<ClInclude Include="HKHolderCreater.h">
|
||||||
<Filter>Creaters</Filter>
|
<Filter>Creaters</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
<ClInclude Include="def.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ResourceCompile Include="NameCreater.rc">
|
<ResourceCompile Include="NameCreater.rc">
|
||||||
|
|||||||
@ -18,7 +18,7 @@ static qreal BG_WIDTH_OFFSET = 320;
|
|||||||
static int NAME_COUNT_IN_PAGE = 12;
|
static int NAME_COUNT_IN_PAGE = 12;
|
||||||
|
|
||||||
|
|
||||||
static QPointF NAME_OFFSET_START = QPointF(79, 377);
|
static QPointF NAME_OFFSET_START = QPointF(79, 365);
|
||||||
static qreal EACH_WORD_OFFSET = 142;
|
static qreal EACH_WORD_OFFSET = 142;
|
||||||
static QColor FONT_COLOR = QColor(0, 0, 0);
|
static QColor FONT_COLOR = QColor(0, 0, 0);
|
||||||
|
|
||||||
@ -171,8 +171,8 @@ void CustomLogo::gerneraImageFromList(const QList<NameInfo_t>& nameList, Name_Ty
|
|||||||
QPointF pos = NAME_OFFSET_START;
|
QPointF pos = NAME_OFFSET_START;
|
||||||
qreal y_offset = 0;
|
qreal y_offset = 0;
|
||||||
if (name_len == 2) {
|
if (name_len == 2) {
|
||||||
pos.setY(pos.y() + 82.0);
|
pos.setY(pos.y() + 65.0);
|
||||||
y_offset = 25;
|
y_offset = 55;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int k = 0; k < name_len; k++) {
|
for (int k = 0; k < name_len; k++) {
|
||||||
@ -180,7 +180,10 @@ void CustomLogo::gerneraImageFromList(const QList<NameInfo_t>& nameList, Name_Ty
|
|||||||
textItem->setFont(*customFont);
|
textItem->setFont(*customFont);
|
||||||
textItem->setDefaultTextColor(fontColor);
|
textItem->setDefaultTextColor(fontColor);
|
||||||
qreal _posX = name_rectItem->boundingRect().width() / 2 - textItem->boundingRect().width() / 2;
|
qreal _posX = name_rectItem->boundingRect().width() / 2 - textItem->boundingRect().width() / 2;
|
||||||
textItem->setPos(_posX, pos.y() + k * EACH_WORD_OFFSET + y_offset);
|
qreal _posY = pos.y() + k * (EACH_WORD_OFFSET + y_offset);
|
||||||
|
qDebug() << "Name num:" << QString::number(k) << "PosY:" << QString::number(_posY);
|
||||||
|
textItem->setPos(_posX, _posY);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
#ifndef DEF_H
|
#ifndef DEF_H
|
||||||
#define DEF_H
|
#define DEF_H
|
||||||
|
|
||||||
#define VERSION "v2.9.1"
|
#define VERSION "v2.9.2"
|
||||||
|
|
||||||
|
|
||||||
#endif // DEF_H
|
#endif // DEF_H
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user