|
|
|
@ -52,8 +52,6 @@
@@ -52,8 +52,6 @@
|
|
|
|
|
#include "downloadedpiecesbar.h" |
|
|
|
|
#include "pieceavailabilitybar.h" |
|
|
|
|
|
|
|
|
|
Q_DECLARE_METATYPE(QList<int>) |
|
|
|
|
|
|
|
|
|
#ifdef Q_WS_MAC |
|
|
|
|
#define DEFAULT_BUTTON_CSS "QPushButton {border: 1px solid rgb(85, 81, 91);border-radius: 3px;padding: 2px; margin-left: 8px; margin-right: 8px;}" |
|
|
|
|
#define SELECTED_BUTTON_CSS "QPushButton {border: 1px solid rgb(85, 81, 91);border-radius: 3px;padding: 2px;background-color: rgb(255, 208, 105); margin-left: 8px; margin-right: 8px;}" |
|
|
|
@ -267,7 +265,7 @@ void PropertiesWidget::loadTorrentInfos(QTorrentHandle &_h) {
@@ -267,7 +265,7 @@ void PropertiesWidget::loadTorrentInfos(QTorrentHandle &_h) {
|
|
|
|
|
|
|
|
|
|
void PropertiesWidget::readSettings() { |
|
|
|
|
QSettings settings(QString::fromUtf8("qBittorrent"), QString::fromUtf8("qBittorrent")); |
|
|
|
|
QList<int> contentColsWidths = settings.value(QString::fromUtf8("TorrentProperties/filesColsWidth"), QVariantList()).value<QList<int> >(); |
|
|
|
|
QList<int> contentColsWidths = misc::intListfromStringList(settings.value(QString::fromUtf8("TorrentProperties/filesColsWidth")).toStringList()); |
|
|
|
|
if(contentColsWidths.empty()) { |
|
|
|
|
filesList->header()->resizeSection(0, 300); |
|
|
|
|
} else { |
|
|
|
@ -294,11 +292,11 @@ void PropertiesWidget::readSettings() {
@@ -294,11 +292,11 @@ void PropertiesWidget::readSettings() {
|
|
|
|
|
void PropertiesWidget::saveSettings() { |
|
|
|
|
QSettings settings(QString::fromUtf8("qBittorrent"), QString::fromUtf8("qBittorrent")); |
|
|
|
|
settings.setValue("TorrentProperties/Visible", state==VISIBLE); |
|
|
|
|
QList<int> contentColsWidths; |
|
|
|
|
QStringList contentColsWidths; |
|
|
|
|
for(int i=0; i<PropListModel->columnCount(); ++i) { |
|
|
|
|
contentColsWidths.append(filesList->columnWidth(i)); |
|
|
|
|
contentColsWidths << QString::number(filesList->columnWidth(i)); |
|
|
|
|
} |
|
|
|
|
settings.setValue(QString::fromUtf8("TorrentProperties/filesColsWidth"), QVariant::fromValue<QList<int> >(contentColsWidths)); |
|
|
|
|
settings.setValue(QString::fromUtf8("TorrentProperties/filesColsWidth"), contentColsWidths); |
|
|
|
|
// Splitter sizes
|
|
|
|
|
QSplitter *hSplitter = static_cast<QSplitter*>(parentWidget()); |
|
|
|
|
QList<int> sizes; |
|
|
|
|