From f530bb75378d465c0437867112b28498eab0be1f Mon Sep 17 00:00:00 2001 From: Chocobo1 Date: Mon, 29 Jun 2015 02:33:43 +0800 Subject: [PATCH] Fix availability label & progress label clipped on high DPI displays, closes #3237. --- src/gui/properties/propertieswidget.cpp | 10 +- src/gui/properties/propertieswidget.ui | 537 ++++++++++-------------- 2 files changed, 231 insertions(+), 316 deletions(-) diff --git a/src/gui/properties/propertieswidget.cpp b/src/gui/properties/propertieswidget.cpp index 4cea02a0a..59f60c96b 100644 --- a/src/gui/properties/propertieswidget.cpp +++ b/src/gui/properties/propertieswidget.cpp @@ -113,13 +113,19 @@ PropertiesWidget::PropertiesWidget(QWidget *parent, MainWindow* main_window, Tra #endif // Downloaded pieces progress bar + tempProgressBarArea->setVisible(false); downloaded_pieces = new DownloadedPiecesBar(this); - ProgressHLayout->insertWidget(1, downloaded_pieces); + groupBarLayout->addWidget(downloaded_pieces, 0, 1); downloaded_pieces->setFixedHeight(barHeight); + downloaded_pieces->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); + // Pieces availability bar + tempAvailabilityBarArea->setVisible(false); pieces_availability = new PieceAvailabilityBar(this); - ProgressHLayout_2->insertWidget(1, pieces_availability); + groupBarLayout->addWidget(pieces_availability, 1, 1); pieces_availability->setFixedHeight(barHeight); + pieces_availability->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); + // Tracker list trackerList = new TrackerList(this); connect(trackerUpButton, SIGNAL(clicked()), trackerList, SLOT(moveSelectionUp())); diff --git a/src/gui/properties/propertieswidget.ui b/src/gui/properties/propertieswidget.ui index 2340f5e32..7ad836036 100644 --- a/src/gui/properties/propertieswidget.ui +++ b/src/gui/properties/propertieswidget.ui @@ -10,14 +10,20 @@ 452 - - Form - 0 - + + 0 + + + 0 + + + 0 + + 0 @@ -25,22 +31,25 @@ 0 - + 0 - + + 0 + + + 0 + + + 0 + + 0 - - - 0 - 0 - - true @@ -55,137 +64,16 @@ - - - QLayout::SetDefaultConstraint - - - - - - 0 - 0 - - - - - 100 - 16777215 - - - - Progress: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - 0 - 0 - - - - - 50 - 16777215 - - - - - - - Qt::PlainText - - - Qt::AlignLeading - - - 0 - - - - - - - - - QLayout::SetDefaultConstraint - - - - - - 0 - 0 - - - - - 100 - 16777215 - - - - Availability: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - 0 - 0 - - - - - 50 - 16777215 - - - - - - - Qt::PlainText - - - Qt::AlignLeading - - - - - - - - - Qt::Horizontal - - - - - - - - 0 - 0 - - - - Transfer - - + + + + 4 + + + 4 + - + 0 @@ -193,31 +81,28 @@ - Time Active: + Progress: Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - + + - + 0 0 - - - Qt::PlainText - - + + 0 @@ -225,31 +110,77 @@ - ETA: + Availability: Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - + + - + 0 0 - - + + Qt::PlainText + + + + + + + Qt::PlainText + + + + Qt::PlainText - - + + + + + + + Qt::Horizontal + + + + + + + Transfer + + + + 4 + + + 4 + + + + + + 0 + 0 + + + + Qt::PlainText + + + + + 0 @@ -257,31 +188,28 @@ - Connections: + Upload Speed: Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - + + 0 0 - - - Qt::PlainText - - + + 0 @@ -289,63 +217,57 @@ - Downloaded: + Peers: Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - + + - + 0 0 - + Connections: - - Qt::PlainText + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - + + - + 0 0 - - Uploaded: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + Qt::PlainText - - + + 0 0 - - - Qt::PlainText - - + + 0 @@ -353,63 +275,57 @@ - Seeds: + Download Limit: Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - + + - + 0 0 - + Share Ratio: - - Qt::PlainText + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - + + - + 0 0 - - Download Speed: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + Qt::PlainText - - + + 0 0 - - - Qt::PlainText - - + + 0 @@ -417,31 +333,31 @@ - Upload Speed: + Downloaded: Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - + + - + 0 0 - + Upload Limit: - - Qt::PlainText + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - + + 0 @@ -449,31 +365,41 @@ - Peers: + Last Seen Complete: Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - + + 0 0 - - + + Qt::PlainText + + + + + + + + 0 + 0 + Qt::PlainText - - + + 0 @@ -481,31 +407,28 @@ - Download Limit: + Reannounce In: Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - + + 0 0 - - - Qt::PlainText - - + + 0 @@ -513,63 +436,70 @@ - Upload Limit: + Seeds: Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - + + - + 0 0 - + Download Speed: - - Qt::PlainText + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - + + - + 0 0 - - Wasted: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + Qt::PlainText - + 0 0 - - + + Qt::PlainText + + + + + + + + 0 + 0 + Qt::PlainText - - + + 0 @@ -577,31 +507,41 @@ - Share Ratio: + Uploaded: Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - + + 0 0 - - + + Qt::PlainText + + + + + + + + 0 + 0 + Qt::PlainText - - + + 0 @@ -609,31 +549,28 @@ - Reannounce In: + Time Active: Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - + + 0 0 - - - Qt::PlainText - - + + 0 @@ -641,26 +578,26 @@ - Last Seen Complete: + ETA: Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - + + - + 0 0 - + Wasted: - - Qt::PlainText + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter @@ -668,17 +605,17 @@ - - - - 0 - 0 - - + Information + + 4 + + + 2 + @@ -703,9 +640,6 @@ 0 - - - Qt::PlainText @@ -735,9 +669,6 @@ 0 - - - Qt::PlainText @@ -767,9 +698,6 @@ 0 - - - Qt::PlainText @@ -799,9 +727,6 @@ 0 - - - Qt::PlainText @@ -831,9 +756,6 @@ 0 - - - Qt::PlainText @@ -863,9 +785,6 @@ 0 - - - Qt::PlainText @@ -895,9 +814,6 @@ 0 - - - Qt::PlainText @@ -930,15 +846,9 @@ 0 - - - Qt::PlainText - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop - true @@ -1000,7 +910,7 @@ - + @@ -1169,8 +1079,7 @@ - - +