1
0
mirror of https://github.com/d47081/qBittorrent.git synced 2025-01-11 07:18:08 +00:00

Fix layout problems

This commit is contained in:
Christophe Dumez 2011-02-05 21:27:13 +00:00
parent 35c1389794
commit 28b8f36f16
5 changed files with 5 additions and 21 deletions

View File

@ -155,6 +155,7 @@ MainWindow::MainWindow(QWidget *parent, QStringList torrentCmdLine) : QMainWindo
//vSplitter->setChildrenCollapsible(false); //vSplitter->setChildrenCollapsible(false);
hSplitter = new QSplitter(Qt::Vertical); hSplitter = new QSplitter(Qt::Vertical);
hSplitter->setChildrenCollapsible(false); hSplitter->setChildrenCollapsible(false);
hSplitter->setContentsMargins(0, 4, 0, 0);
// Transfer List tab // Transfer List tab
transferList = new TransferListWidget(hSplitter, this, QBtSession::instance()); transferList = new TransferListWidget(hSplitter, this, QBtSession::instance());
@ -235,7 +236,6 @@ MainWindow::MainWindow(QWidget *parent, QStringList torrentCmdLine) : QMainWindo
// Load Window state and sizes // Load Window state and sizes
readSettings(); readSettings();
properties->readSettings();
if(!ui_locked) { if(!ui_locked) {
if(pref.startMinimized()) if(pref.startMinimized())
@ -247,6 +247,8 @@ MainWindow::MainWindow(QWidget *parent, QStringList torrentCmdLine) : QMainWindo
} }
} }
properties->readSettings();
// Start watching the executable for updates // Start watching the executable for updates
executable_watcher = new QFileSystemWatcher(); executable_watcher = new QFileSystemWatcher();
connect(executable_watcher, SIGNAL(fileChanged(QString)), this, SLOT(notifyOfUpdate(QString))); connect(executable_watcher, SIGNAL(fileChanged(QString)), this, SLOT(notifyOfUpdate(QString)));

View File

@ -114,7 +114,6 @@ PropertiesWidget::PropertiesWidget(QWidget *parent, MainWindow* main_window, Tra
// Tab bar // Tab bar
m_tabBar = new PropTabBar(); m_tabBar = new PropTabBar();
verticalLayout->addLayout(m_tabBar); verticalLayout->addLayout(m_tabBar);
verticalLayout->setMargin(0);
connect(m_tabBar, SIGNAL(tabChanged(int)), stackedProperties, SLOT(setCurrentIndex(int))); connect(m_tabBar, SIGNAL(tabChanged(int)), stackedProperties, SLOT(setCurrentIndex(int)));
connect(m_tabBar, SIGNAL(visibilityToggled(bool)), SLOT(setVisibility(bool))); connect(m_tabBar, SIGNAL(visibilityToggled(bool)), SLOT(setVisibility(bool)));
// Dynamic data refresher // Dynamic data refresher
@ -159,7 +158,6 @@ void PropertiesWidget::setVisibility(bool visible) {
hSplitter->handle(1)->setDisabled(true); hSplitter->handle(1)->setDisabled(true);
QList<int> sizes = QList<int>() << hSplitter->geometry().height()-30 << 30; QList<int> sizes = QList<int>() << hSplitter->geometry().height()-30 << 30;
hSplitter->setSizes(sizes); hSplitter->setSizes(sizes);
hSplitter->updateGeometry();
state = REDUCED; state = REDUCED;
return; return;
} }

View File

@ -830,22 +830,6 @@ p, li { white-space: pre-wrap; }
</property> </property>
</widget> </widget>
</item> </item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="leftMargin">
<number>5</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>5</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
</layout>
</item>
</layout> </layout>
<action name="actionNormal"> <action name="actionNormal">
<property name="text"> <property name="text">

View File

@ -50,7 +50,7 @@ PropTabBar::PropTabBar(QWidget *parent) :
QHBoxLayout(parent), m_currentIndex(-1) QHBoxLayout(parent), m_currentIndex(-1)
{ {
m_btnGroup = new QButtonGroup(this); m_btnGroup = new QButtonGroup(this);
setContentsMargins(0, 0, 0, 0); setContentsMargins(0, 4, 0, 4);
// General tab // General tab
QPushButton *main_infos_button = new QPushButton(IconProvider::instance()->getIcon("document-properties"), tr("General"), parent); QPushButton *main_infos_button = new QPushButton(IconProvider::instance()->getIcon("document-properties"), tr("General"), parent);
main_infos_button->setShortcut(QKeySequence(QString::fromUtf8("Alt+P"))); main_infos_button->setShortcut(QKeySequence(QString::fromUtf8("Alt+P")));

View File

@ -206,7 +206,7 @@ public:
TransferListFiltersWidget(QWidget *parent, TransferListWidget *transferList): QFrame(parent), transferList(transferList), nb_labeled(0), nb_torrents(0) { TransferListFiltersWidget(QWidget *parent, TransferListWidget *transferList): QFrame(parent), transferList(transferList), nb_labeled(0), nb_torrents(0) {
// Construct lists // Construct lists
vLayout = new QVBoxLayout(); vLayout = new QVBoxLayout();
vLayout->setContentsMargins(0, 0, 0, 0); vLayout->setContentsMargins(0, 4, 0, 4);
statusFilters = new StatusFiltersWidget(this); statusFilters = new StatusFiltersWidget(this);
vLayout->addWidget(statusFilters); vLayout->addWidget(statusFilters);
labelFilters = new LabelFiltersList(this); labelFilters = new LabelFiltersList(this);