summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--archivetreeview.cpp1
-rw-r--r--shemov.cpp10
2 files changed, 8 insertions, 3 deletions
diff --git a/archivetreeview.cpp b/archivetreeview.cpp
index 0fa471d..191081c 100644
--- a/archivetreeview.cpp
+++ b/archivetreeview.cpp
@@ -115,6 +115,7 @@ void ArchiveTreeView::setFileViewMode(int mode){
void ArchiveTreeView::showAllFiles(bool toggled){
mShowAllFiles = toggled;
if(mShowAllFiles){
+ mFilesWidget->resetSize();
int seriesRow = 0;
QModelIndex series = mSeriesModel->index(seriesRow, 0, QModelIndex());
QList<int> ids;
diff --git a/shemov.cpp b/shemov.cpp
index 212642b..96e2399 100644
--- a/shemov.cpp
+++ b/shemov.cpp
@@ -278,10 +278,14 @@ void SheMov::newMovieWizardWithFiles(){
void SheMov::setSize(qint64 size){
QLocale l;
QString val;
- if(size < Q_INT64_C(4707319808)){
- val = QString("<span style=\"color:#008000\">%1</span>").arg(l.toString(size));
+ const qint64 dvdSize = Q_INT64_C(4707319808);
+ qint64 free = dvdSize - size;
+ QString selectedSize = l.toString(size / 1024.0 / 1024.0, 'f', 2);
+ QString freeSize = l.toString(free / 1024.0 / 1024.0, 'f', 2);
+ if(size < dvdSize){
+ val = QString("<span style=\"color:#008000\">%1 (%2) MiB</span>").arg(selectedSize).arg(freeSize);
}else{
- val = QString("<span style=\"color:#ff0000\">%1</span>").arg(l.toString(size));
+ val = QString("<span style=\"color:#ff0000\">%1 (%2) MiB</span>").arg(selectedSize).arg(freeSize);
}
mSelectedSize->setText(val);
}