From 4437210382475437da0bf2791571c60977b13437 Mon Sep 17 00:00:00 2001 From: Martin Rotter Date: Tue, 24 Oct 2017 06:45:50 +0200 Subject: [PATCH] All columns are now resizeable. --- resources/binaries | 2 +- src/core/message.cpp | 2 +- src/definitions/definitions.h | 2 +- src/gui/messagesview.cpp | 7 +++---- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/resources/binaries b/resources/binaries index ae7084718..4a01edaec 160000 --- a/resources/binaries +++ b/resources/binaries @@ -1 +1 @@ -Subproject commit ae7084718c41afc01919779e58cd449e0eebd401 +Subproject commit 4a01edaec7d67d3b2ae81aeea2a3c876216fbab8 diff --git a/src/core/message.cpp b/src/core/message.cpp index 199098964..04ef93cdd 100755 --- a/src/core/message.cpp +++ b/src/core/message.cpp @@ -55,7 +55,7 @@ Message::Message() { } Message Message::fromSqlRecord(const QSqlRecord& record, bool* result) { - if (record.count() != MSG_DB_FEED_CUSTOM_ID_INDEX + 1) { + if (record.count() != MSG_DB_HAS_ENCLOSURES + 1) { if (result != nullptr) { *result = false; } diff --git a/src/definitions/definitions.h b/src/definitions/definitions.h index 3a373dfb3..b0cc1fbe2 100755 --- a/src/definitions/definitions.h +++ b/src/definitions/definitions.h @@ -45,7 +45,7 @@ #define CLOSE_LOCK_TIMEOUT 500 #define DOWNLOAD_TIMEOUT 15000 #define MESSAGES_VIEW_DEFAULT_COL 170 -#define MESSAGES_VIEW_MINIMUM_COL 36 +#define MESSAGES_VIEW_MINIMUM_COL 16 #define FEEDS_VIEW_COLUMN_COUNT 2 #define FEED_DOWNLOADER_MAX_THREADS 6 #define DEFAULT_DAYS_TO_DELETE_MSG 14 diff --git a/src/gui/messagesview.cpp b/src/gui/messagesview.cpp index cddd6af1a..4b2f4afc1 100755 --- a/src/gui/messagesview.cpp +++ b/src/gui/messagesview.cpp @@ -558,10 +558,10 @@ void MessagesView::adjustColumns() { // Setup column resize strategies. header()->setSectionResizeMode(MSG_DB_ID_INDEX, QHeaderView::Interactive); - header()->setSectionResizeMode(MSG_DB_READ_INDEX, QHeaderView::ResizeToContents); + header()->setSectionResizeMode(MSG_DB_READ_INDEX, QHeaderView::Interactive); header()->setSectionResizeMode(MSG_DB_DELETED_INDEX, QHeaderView::Interactive); - header()->setSectionResizeMode(MSG_DB_HAS_ENCLOSURES, QHeaderView::ResizeToContents); - header()->setSectionResizeMode(MSG_DB_IMPORTANT_INDEX, QHeaderView::ResizeToContents); + header()->setSectionResizeMode(MSG_DB_HAS_ENCLOSURES, QHeaderView::Interactive); + header()->setSectionResizeMode(MSG_DB_IMPORTANT_INDEX, QHeaderView::Interactive); header()->setSectionResizeMode(MSG_DB_FEED_TITLE_INDEX, QHeaderView::Interactive); header()->setSectionResizeMode(MSG_DB_TITLE_INDEX, QHeaderView::Interactive); header()->setSectionResizeMode(MSG_DB_URL_INDEX, QHeaderView::Interactive); @@ -581,7 +581,6 @@ void MessagesView::adjustColumns() { hideColumn(MSG_DB_CUSTOM_ID_INDEX); hideColumn(MSG_DB_CUSTOM_HASH_INDEX); hideColumn(MSG_DB_FEED_CUSTOM_ID_INDEX); - qDebug("Adjusting column resize modes for MessagesView."); } }