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