]> Shamusworld >> Repos - virtualjaguar/blobdiff - src/gui/filepicker.cpp
Fixes in the controller config for MacOSX, added option to turn off GPU.
[virtualjaguar] / src / gui / filepicker.cpp
index e01f365bb2d7bb8da210dc4b81a6a1eedec7decd..2082ee92fe5a7ca49f8aa4177ee1f54e47bb7fe8 100644 (file)
@@ -108,7 +108,9 @@ printf("VSB size: %u, %u\n", sbSize3.width(), sbSize3.height());
 //     fileList->verticalScrollBar()->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Preferred);
        // (488/4) + 4 is the width of the object in the filelistmodel. Dunno why the QListView
        // isn't picking that up. :-(
-       fileList->setFixedWidth((488/4) + 4 + sbWidth);//ick
+       // 488/4 + 4 = 126
+       // 126 + 17 + 4 = 147 <-- correct width
+       fileList->setFixedWidth((488/4) + 4 + sbWidth2 + sbWidth5 + 1);//ick
 //     fileList->setFixedWidth((488/4) + 4 + 17 + 4);//sbWidth);//ick
 
 //     fileList->setSpacing(4);
@@ -153,9 +155,9 @@ printf("VSB size: %u, %u\n", sbSize3.width(), sbSize3.height());
        dataLayout->addWidget(labels);
        data = new QLabel(QString(tr(
                "?MB Cartridge<br>"
-               "????????<br>"
-               "???<br>"
-               "???"
+               "00000000<br>"
+               "?<br>"
+               "?"
        )));
        data->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
        dataLayout->addWidget(data);
@@ -209,7 +211,10 @@ New sizes: 373x172 (label), 420x340 (cart)
 void FilePickerWindow::keyPressEvent(QKeyEvent * e)
 {
        if (e->key() == Qt::Key_Escape)
+       {
                hide();
+               emit(FilePickerHiding());
+       }
        else if (e->key() == Qt::Key_Return)
                LoadButtonPressed();
 }
@@ -420,7 +425,7 @@ void FilePickerWindow::UpdateSelection(const QModelIndex & current, const QModel
                else
                        fileTypeString = QString(tr("%1MB Alpine ROM"));
 
-               fileTypeString = fileTypeString.arg(fileSize / 1048576);
+               fileTypeString = fileTypeString.arg((fileSize + 8192) / 1048576);
        }
        else if (haveUnknown && (fileType == JST_ABS_TYPE1 || fileType == JST_ABS_TYPE2))
                fileTypeString = QString(tr("ABS/COF Executable (%1 bytes)")).arg(fileSize);