summaryrefslogtreecommitdiffstats
path: root/module
diff options
context:
space:
mode:
authorGravatar mkaay <mkaay@mkaay.de> 2011-01-26 18:54:28 +0100
committerGravatar mkaay <mkaay@mkaay.de> 2011-01-26 18:54:28 +0100
commit159f8418fc33080146d360eab45390efb8c5ef6b (patch)
tree066028be8626f38c85c7d42949cb95950814e4be /module
parentgui status frame facelift (diff)
downloadpyload-159f8418fc33080146d360eab45390efb8c5ef6b.tar.xz
gui style optimizations
Diffstat (limited to 'module')
-rw-r--r--module/gui/MainWindow.py47
-rw-r--r--module/gui/Overview.py2
-rw-r--r--module/gui/SettingsWidget.py16
3 files changed, 25 insertions, 40 deletions
diff --git a/module/gui/MainWindow.py b/module/gui/MainWindow.py
index 86d82c8e7..7a3dfe098 100644
--- a/module/gui/MainWindow.py
+++ b/module/gui/MainWindow.py
@@ -79,6 +79,7 @@ class MainWindow(QMainWindow):
f = self.font()
f.setBold(True)
self.setFont(f)
+ self.setAlignment(Qt.AlignRight)
class Seperator(QFrame):
def __init__(self):
@@ -87,40 +88,32 @@ class MainWindow(QMainWindow):
self.setFrameShadow(QFrame.Sunken)
l.addWidget(BoldLabel(_("Packages:")), 0, 0)
- l.addWidget(BoldLabel(_("Files:")), 1, 0)
self.packageCount = QLabel("0")
- self.fileCount = QLabel("0")
l.addWidget(self.packageCount, 0, 1)
- l.addWidget(self.fileCount, 1, 1)
- l.addWidget(Seperator(), 0, 2, 2, 1)
+ l.addWidget(BoldLabel(_("Files:")), 0, 2)
+ self.fileCount = QLabel("0")
+ l.addWidget(self.fileCount, 0, 3)
- l.addWidget(BoldLabel(_("Status:")), 0, 3)
- l.addWidget(BoldLabel(_("IP:")), 1, 3)
+ l.addWidget(BoldLabel(_("Status:")), 0, 4)
self.status = QLabel("running")
- self.ip = QLabel("")
- l.addWidget(self.status, 0, 4)
- l.addWidget(self.ip, 1, 4)
-
- l.addWidget(Seperator(), 0, 5, 2, 1)
+ l.addWidget(self.status, 0, 5)
- l.addWidget(BoldLabel(_("Speed:")), 0, 6)
- l.addWidget(BoldLabel(_("Space:")), 1, 6)
- self.speed = QLabel("")
+ l.addWidget(BoldLabel(_("Space:")), 0, 6)
self.space = QLabel("")
- l.addWidget(self.speed, 0, 7)
- l.addWidget(self.space, 1, 7)
-
- l.addWidget(Seperator(), 0, 8, 2, 1)
-
- l.addWidget(BoldLabel(_("Max. downloads:")), 0, 9)
- l.addWidget(BoldLabel(_("Max. chunks:")), 1, 9)
- self.maxDownloads = QSpinBox()
- self.maxDownloads.setEnabled(False)
- self.maxChunks = QSpinBox()
- self.maxChunks.setEnabled(False)
- l.addWidget(self.maxDownloads, 0, 10)
- l.addWidget(self.maxChunks, 1, 10)
+ l.addWidget(self.space, 0, 7)
+ l.addWidget(BoldLabel(_("Speed:")), 0, 8)
+ self.speed = QLabel("")
+ l.addWidget(self.speed, 0, 9)
+
+ #l.addWidget(BoldLabel(_("Max. downloads:")), 0, 9)
+ #l.addWidget(BoldLabel(_("Max. chunks:")), 1, 9)
+ #self.maxDownloads = QSpinBox()
+ #self.maxDownloads.setEnabled(False)
+ #self.maxChunks = QSpinBox()
+ #self.maxChunks.setEnabled(False)
+ #l.addWidget(self.maxDownloads, 0, 10)
+ #l.addWidget(self.maxChunks, 1, 10)
#set menubar and statusbar
self.menubar = self.menuBar()
diff --git a/module/gui/Overview.py b/module/gui/Overview.py
index da5f3214f..c4a2e7947 100644
--- a/module/gui/Overview.py
+++ b/module/gui/Overview.py
@@ -186,4 +186,4 @@ class OverviewDelegate(QItemDelegate):
QApplication.style().drawControl(QStyle.CE_ProgressBar, opts, painter)
def sizeHint(self, option, index):
- return QSize(self.parent.width(), 59+16)
+ return QSize(self.parent.width()-2, 59+16)
diff --git a/module/gui/SettingsWidget.py b/module/gui/SettingsWidget.py
index 8b4d34bbf..cdb5fba93 100644
--- a/module/gui/SettingsWidget.py
+++ b/module/gui/SettingsWidget.py
@@ -29,7 +29,6 @@ class SettingsWidget(QWidget):
self.data = None
self.pdata = None
self.setSizePolicy(QSizePolicy.Ignored, QSizePolicy.Ignored)
- self.setStyleSheet("QTabWidget::pane { border: 0px solid black;}")
def setConnector(self, connector):
self.connector = connector
@@ -161,7 +160,7 @@ class Section(QGroupBox):
self.labels = {}
self.inputs = {}
self.ctype = ctype
- layout = QGridLayout(self)
+ layout = QFormLayout(self)
self.setLayout(layout)
sw = QWidget()
@@ -171,18 +170,13 @@ class Section(QGroupBox):
sa = QScrollArea()
sa.setWidgetResizable(True)
sa.setWidget(sw)
- #sa.setFrameShape(sa.NoFrame)
+ sa.setFrameShape(sa.NoFrame)
parent.addTab(sa, data["desc"])
- row = 0
for k, option in self.data.iteritems():
if k == "desc":
continue
- l = QLabel(option["desc"], self)
- l.setMinimumWidth(400)
- self.labels[k] = l
- layout.addWidget(l, row, 0)
if option["type"] == "int":
i = QSpinBox(self)
i.setMaximum(999999)
@@ -203,7 +197,5 @@ class Section(QGroupBox):
else:
i = QLineEdit(self)
i.setText(option["value"])
- self.inputs[k] = i
- #i.setMaximumWidth(300)
- layout.addWidget(i, row, 1)
- row += 1
+ layout.addRow(option["desc"], i)
+ layout.setFieldGrowthPolicy(QFormLayout.AllNonFixedFieldsGrow)