From: Barış Metin Date: Sat, 11 Sep 2010 02:00:34 +0000 (+0200) Subject: layouts and styles X-Git-Tag: sface-0.1-1~60 X-Git-Url: http://git.onelab.eu/?p=sface.git;a=commitdiff_plain;h=af944fe917c3f4236a162b318d466f3948543019 layouts and styles --- 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)