mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-22 20:44:15 +00:00
- Polish torrent properties
This commit is contained in:
parent
998b161696
commit
611e33bf80
@ -98,12 +98,14 @@ public:
|
||||
qDebug("Unhandled priority, setting NORMAL");
|
||||
newopt.currentText = tr("Normal", "Normal (priority)");
|
||||
}
|
||||
newopt.state |= QStyle::State_Enabled;
|
||||
newopt.subControls = QStyle::SC_All;
|
||||
//newopt.state |= QStyle::State_Enabled;
|
||||
//newopt.subControls = QStyle::SC_All;
|
||||
//painter->translate(QPoint(opt.rect.x()*-1,opt.rect.y()*-1));
|
||||
//QApplication::style()->drawComplexControl(QStyle::CC_ComboBox, &newopt, painter);
|
||||
//painter->translate(QPoint(opt.rect.x(),opt.rect.y()));
|
||||
QApplication::style()->drawControl(QStyle::CE_ComboBoxLabel, &newopt, painter);
|
||||
//QApplication::style()->drawControl(QStyle::CE_ComboBoxLabel, &newopt, painter);
|
||||
QItemDelegate::drawBackground(painter, opt, index);
|
||||
QItemDelegate::drawDisplay(painter, opt, option.rect, newopt.currentText);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
@ -153,7 +155,7 @@ public:
|
||||
QFontMetrics fontMetrics(fnt);
|
||||
const QString text = index.data(Qt::DisplayRole).toString();
|
||||
QRect textRect = QRect(0, 0, 0, fontMetrics.lineSpacing() * (text.count(QLatin1Char('\n')) + 1));
|
||||
textRect.setHeight(textRect.height()+10);
|
||||
textRect.setHeight(textRect.height()+4);
|
||||
return textRect.size();
|
||||
}
|
||||
|
||||
|
@ -7,11 +7,11 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>756</width>
|
||||
<height>303</height>
|
||||
<height>291</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
@ -37,6 +37,18 @@
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QStackedWidget" name="stackedProperties">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>260</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
</property>
|
||||
@ -44,6 +56,9 @@
|
||||
<layout class="QVBoxLayout" name="verticalLayout_4">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupTorrentInfos">
|
||||
<property name="font">
|
||||
@ -57,6 +72,9 @@
|
||||
<string>Torrent information</string>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<item>
|
||||
@ -259,12 +277,18 @@
|
||||
<string>Current session</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="_2">
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="margin">
|
||||
<property name="leftMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="_3">
|
||||
<property name="spacing">
|
||||
@ -905,6 +929,7 @@
|
||||
border: 1px solid rgb(85, 81, 91);
|
||||
border-radius: 3px;
|
||||
padding: 2px;
|
||||
margin-left: 3px; margin-right: 3px;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
@ -929,6 +954,7 @@ padding: 2px;
|
||||
border: 1px solid rgb(85, 81, 91);
|
||||
border-radius: 3px;
|
||||
padding: 2px;
|
||||
margin-left: 3px; margin-right: 3px;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
@ -953,6 +979,7 @@ padding: 2px;
|
||||
border: 1px solid rgb(85, 81, 91);
|
||||
border-radius: 3px;
|
||||
padding: 2px;
|
||||
margin-left: 3px; margin-right: 3px;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
@ -977,6 +1004,7 @@ padding: 2px;
|
||||
border: 1px solid rgb(85, 81, 91);
|
||||
border-radius: 3px;
|
||||
padding: 2px;
|
||||
margin-left: 3px; margin-right: 3px;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
|
@ -50,8 +50,8 @@
|
||||
#include "PropListDelegate.h"
|
||||
#include "TrackersAdditionDlg.h"
|
||||
|
||||
#define DEFAULT_BUTTON_CSS "QPushButton {border: 1px solid rgb(85, 81, 91);border-radius: 3px;padding: 2px;}"
|
||||
#define SELECTED_BUTTON_CSS "QPushButton {border: 1px solid rgb(85, 81, 91);border-radius: 3px;padding: 2px;background-color: rgb(255, 208, 105);}"
|
||||
#define DEFAULT_BUTTON_CSS "QPushButton {border: 1px solid rgb(85, 81, 91);border-radius: 3px;padding: 2px; margin-left: 3px; margin-right: 3px;}"
|
||||
#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: 3px; margin-right: 3px;}"
|
||||
|
||||
PropertiesWidget::PropertiesWidget(QWidget *parent, TransferListWidget *transferList, bittorrent* BTSession): QWidget(parent), transferList(transferList), BTSession(BTSession) {
|
||||
setupUi(this);
|
||||
@ -141,7 +141,7 @@ void PropertiesWidget::reduce() {
|
||||
|
||||
void PropertiesWidget::slide() {
|
||||
if(state == REDUCED) {
|
||||
stackedProperties->setFixedHeight(232);
|
||||
stackedProperties->setFixedHeight(260);
|
||||
state = VISIBLE;
|
||||
}
|
||||
}
|
||||
|
@ -38,6 +38,7 @@ RealProgressBar::RealProgressBar(QWidget *parent)
|
||||
{
|
||||
background = Qt::white;
|
||||
foreground = Qt::black;
|
||||
setFixedHeight(20);
|
||||
active = false;
|
||||
array[0] = 0.;
|
||||
drawPixmap();
|
||||
|
Loading…
x
Reference in New Issue
Block a user