mirror of
https://github.com/Quill-OS/quill.git
synced 2024-12-28 08:37:22 -08:00
Reader: Set wordWrap on bookInfoLabel when book isn't an ePUB
This commit is contained in:
parent
4d5a8b6857
commit
139aa78738
1 changed files with 22 additions and 1 deletions
23
reader.cpp
23
reader.cpp
|
@ -562,7 +562,10 @@ reader::reader(QWidget *parent) :
|
||||||
if(checkconfig_str_val == "n705\n") {
|
if(checkconfig_str_val == "n705\n") {
|
||||||
infoLabelDefinedLength = 35;
|
infoLabelDefinedLength = 35;
|
||||||
}
|
}
|
||||||
if(checkconfig_str_val == "n905\n") {
|
else if(checkconfig_str_val == "n905\n" or checkconfig_str_val == "n613\n" or checkconfig_str_val == "n236\n" or checkconfig_str_val == "n437\n" or checkconfig_str_val == "n306\n") {
|
||||||
|
infoLabelDefinedLength = 50;
|
||||||
|
}
|
||||||
|
else {
|
||||||
infoLabelDefinedLength = 50;
|
infoLabelDefinedLength = 50;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -583,6 +586,24 @@ reader::reader(QWidget *parent) :
|
||||||
else {
|
else {
|
||||||
bookReadRelativePath = book_file.split("/").last();
|
bookReadRelativePath = book_file.split("/").last();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int infoLabelDefinedLength;
|
||||||
|
if(checkconfig_str_val == "n705\n") {
|
||||||
|
infoLabelDefinedLength = 35;
|
||||||
|
}
|
||||||
|
else if(checkconfig_str_val == "n905\n" or checkconfig_str_val == "n613\n" or checkconfig_str_val == "n236\n" or checkconfig_str_val == "n437\n" or checkconfig_str_val == "n306\n") {
|
||||||
|
infoLabelDefinedLength = 50;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
infoLabelDefinedLength = 50;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(bookReadRelativePath <= infoLabelDefinedLength) {
|
||||||
|
ui->bookInfoLabel->setWordWrap(false);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
ui->bookInfoLabel->setWordWrap(true);
|
||||||
|
}
|
||||||
ui->bookInfoLabel->setText(bookReadRelativePath);
|
ui->bookInfoLabel->setText(bookReadRelativePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue