diff options
author | mkaay <mkaay@mkaay.de> | 2011-01-26 18:30:34 +0100 |
---|---|---|
committer | mkaay <mkaay@mkaay.de> | 2011-01-26 18:30:34 +0100 |
commit | ec0d3e6be7738890707afd8947140f9d9631454d (patch) | |
tree | 6054175833314e8b35b226eff0323305fbbe474d /module/gui/MainWindow.py | |
parent | little improvments (diff) | |
download | pyload-ec0d3e6be7738890707afd8947140f9d9631454d.tar.xz |
gui status frame facelift
Diffstat (limited to 'module/gui/MainWindow.py')
-rw-r--r-- | module/gui/MainWindow.py | 56 |
1 files changed, 40 insertions, 16 deletions
diff --git a/module/gui/MainWindow.py b/module/gui/MainWindow.py index b000f6fc7..86d82c8e7 100644 --- a/module/gui/MainWindow.py +++ b/module/gui/MainWindow.py @@ -67,43 +67,67 @@ class MainWindow(QMainWindow): self.statusw.setFrameStyle(QFrame.StyledPanel | QFrame.Raised) self.statusw.setLineWidth(2) self.statusw.setLayout(QGridLayout()) + palette = self.statusw.palette() + palette.setColor(QPalette.Window, QColor(255, 255, 255)) + self.statusw.setPalette(palette) + self.statusw.setAutoFillBackground(True) l = self.statusw.layout() - l.addWidget(QLabel(_("packages:")), 0, 0) - l.addWidget(QLabel(_("files:")), 1, 0) + + class BoldLabel(QLabel): + def __init__(self, text): + QLabel.__init__(self, text) + f = self.font() + f.setBold(True) + self.setFont(f) + + class Seperator(QFrame): + def __init__(self): + QFrame.__init__(self) + self.setFrameShape(QFrame.VLine) + 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(QLabel(_("status:")), 0, 3) - l.addWidget(QLabel(_("ip:")), 1, 3) + l.addWidget(Seperator(), 0, 2, 2, 1) + + l.addWidget(BoldLabel(_("Status:")), 0, 3) + l.addWidget(BoldLabel(_("IP:")), 1, 3) self.status = QLabel("running") self.ip = QLabel("") l.addWidget(self.status, 0, 4) l.addWidget(self.ip, 1, 4) - l.addWidget(QLabel(_("speed:")), 0, 5) - l.addWidget(QLabel(_("space:")), 1, 5) + l.addWidget(Seperator(), 0, 5, 2, 1) + + l.addWidget(BoldLabel(_("Speed:")), 0, 6) + l.addWidget(BoldLabel(_("Space:")), 1, 6) self.speed = QLabel("") self.space = QLabel("") - l.addWidget(self.speed, 0, 6) - l.addWidget(self.space, 1, 6) + l.addWidget(self.speed, 0, 7) + l.addWidget(self.space, 1, 7) + + l.addWidget(Seperator(), 0, 8, 2, 1) - l.addWidget(QLabel(_("max. downloads:")), 0, 7) - l.addWidget(QLabel(_("max. chunks:")), 1, 7) + 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, 8) - l.addWidget(self.maxChunks, 1, 8) + l.addWidget(self.maxDownloads, 0, 10) + l.addWidget(self.maxChunks, 1, 10) #set menubar and statusbar self.menubar = self.menuBar() - self.statusbar = self.statusBar() - self.connect(self.statusbar, SIGNAL("showMsg"), self.statusbar.showMessage) - self.serverStatus = QLabel(_("Status: Not Connected")) - self.statusbar.addPermanentWidget(self.serverStatus) + #self.statusbar = self.statusBar() + #self.connect(self.statusbar, SIGNAL("showMsg"), self.statusbar.showMessage) + #self.serverStatus = QLabel(_("Status: Not Connected")) + #self.statusbar.addPermanentWidget(self.serverStatus) #menu self.menus = {} |