From af944fe917c3f4236a162b318d466f3948543019 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bar=C4=B1=C5=9F=20Metin?= Date: Sat, 11 Sep 2010 04:00:34 +0200 Subject: [PATCH] layouts and styles --- sface.py | 13 +++++++++++-- sface/screens/configscreen.py | 6 ++++-- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/sface.py b/sface.py index e6112cd..ae4770d 100644 --- a/sface.py +++ b/sface.py @@ -18,9 +18,18 @@ QTreeView, QLineEdit { margin: 2px; } -QLabel { + QPushButton { + background-color: white; + border: 2px solid gray; + border-radius: 4px; + padding: 6px; + margin: 5px; + } + + QPushButton:pressed { + background-color: #5599FF; + } -} ''') diff --git a/sface/screens/configscreen.py b/sface/screens/configscreen.py index 077ee1b..56391f1 100644 --- a/sface/screens/configscreen.py +++ b/sface/screens/configscreen.py @@ -25,13 +25,15 @@ class ConfigWidget(QWidget): setattr(self,field,edit) layout.addWidget (edit) + hlayout = QHBoxLayout() + hlayout.addStretch() for (action,label) in [('apply','Apply'), ('save','Apply && Save')]: button=QPushButton(label, self) button.setSizePolicy(QSizePolicy.Maximum, QSizePolicy.Maximum) - layout.addWidget(button, 0, Qt.AlignRight) - layout.addStretch() + hlayout.addWidget(button, 0, Qt.AlignRight) self.connect(button, SIGNAL('clicked()'), getattr(self,action)) + layout.addLayout(hlayout) self.setLayout(layout) -- 2.43.0