summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArno <arno@disconnect.de>2023-03-04 13:02:23 +0100
committerArno <arno@disconnect.de>2023-03-04 13:02:23 +0100
commit32f130d46605bab585a695e1306f516abe6c6914 (patch)
treee5c374205c634d3844b16c2141e6ed5beef6442f
parent3f14c4198dd29b3428e37befe5aec5fa8c5bcf68 (diff)
downloadSheMov-32f130d46605bab585a695e1306f516abe6c6914.tar.gz
SheMov-32f130d46605bab585a695e1306f516abe6c6914.tar.bz2
SheMov-32f130d46605bab585a695e1306f516abe6c6914.zip
Fix dialog when copying files to USB
It changed size according to the length of the file name, so restrict it.
-rw-r--r--archivebrowser.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/archivebrowser.cpp b/archivebrowser.cpp
index a30db3d..1cae7cf 100644
--- a/archivebrowser.cpp
+++ b/archivebrowser.cpp
@@ -268,9 +268,12 @@ void ArchiveBrowser::moveToUSB(){
mCopyWorker->appendData(source, child.data(ArchiveBrowserModel::GenericIdRole));
}
}
+ QString lt;
+ lt.fill(QChar(0x26A4), 32);
mUSBProgress = new QProgressDialog(this);
+ mUSBProgress->setWindowTitle(tr("Copying Files..."));
+ mUSBProgress->setLabelText(lt);
connect(mCopyWorker, &CopyWorker::bytesRead, mUSBProgress, &QProgressDialog::setValue);
- mUSBProgress->setLabelText(tr("Copying files..."));
mUSBProgress->setMinimum(0);
mUSBProgress->setMaximum(mCopyWorker->max());
mUSBProgress->show();
@@ -379,7 +382,12 @@ void ArchiveBrowser::copySuccess(QString success){
}
void ArchiveBrowser::setCopyFile(QString file){
- QString msg = QString(tr("Copying %1")).arg(file);
+ QString msg = QString("%1").arg(file);
+ if(msg.length() > 32){
+ msg.truncate(28);
+ msg.append("...");
+
+ }
mUSBProgress->setLabelText(msg);
}