Browse Source

Fix layout problems

adaptive-webui-19844
Christophe Dumez 14 years ago
parent
commit
28b8f36f16
  1. 4
      src/mainwindow.cpp
  2. 2
      src/properties/propertieswidget.cpp
  3. 16
      src/properties/propertieswidget.ui
  4. 2
      src/properties/proptabbar.cpp
  5. 2
      src/transferlistfilterswidget.h

4
src/mainwindow.cpp

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

2
src/properties/propertieswidget.cpp

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

16
src/properties/propertieswidget.ui

@ -830,22 +830,6 @@ p, li { white-space: pre-wrap; } @@ -830,22 +830,6 @@ p, li { white-space: pre-wrap; }
</property>
</widget>
</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>
<action name="actionNormal">
<property name="text">

2
src/properties/proptabbar.cpp

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

2
src/transferlistfilterswidget.h

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

Loading…
Cancel
Save