Removed the valid icon and make the text green or red instead
authorMaran <maran.hidskes@gmail.com>
Tue, 31 Jul 2012 16:13:37 +0000 (18:13 +0200)
committerMaran <maran.hidskes@gmail.com>
Tue, 31 Jul 2012 16:13:37 +0000 (18:13 +0200)
data/style.css
lib/gui_lite.py

index 2f3a3f2..2ce441d 100644 (file)
@@ -56,20 +56,14 @@ MiniWindow QPushButton {
     width: 225px;
     margin-top: 4px;
 }
-
-#valid_address::indicator
-{
-    width: 24px;
-    height: 24px;
-    margin-top: 2px;
-}
-#valid_address::indicator:checked
+#address_input[isValid=true]
 {
-    image: url(icons/confirmed.png);
+  color: #4D9948
 }
-#valid_address::indicator:unchecked
+
+#address_input[isValid=false]
 {
-    image: url(icons/unconfirmed.png);
+  color: #CE4141
 }
 
 #balance_label
index 93fcd6b..321fd86 100644 (file)
@@ -167,14 +167,8 @@ class MiniWindow(QDialog):
         address_completer.setModel(self.address_completions)
         self.address_input.setCompleter(address_completer)
 
-        self.valid_address = QCheckBox()
-        self.valid_address.setObjectName("valid_address")
-        self.valid_address.setEnabled(False)
-        self.valid_address.setChecked(False)
-
         address_layout = QHBoxLayout()
         address_layout.addWidget(self.address_input)
-        address_layout.addWidget(self.valid_address)
 
         self.amount_input = TextedLineEdit(_("... and amount"))
         self.amount_input.setObjectName("amount_input")
@@ -220,6 +214,10 @@ class MiniWindow(QDialog):
         self.layout().setSizeConstraint(QLayout.SetFixedSize)
         self.setObjectName("main_window")
         self.show()
+    
+    def recompute_style(self):
+        qApp.style().unpolish(self)
+        qApp.style().polish(self)
 
     def closeEvent(self, event):
         super(MiniWindow, self).closeEvent(event)
@@ -311,11 +309,15 @@ class MiniWindow(QDialog):
 
     def address_field_changed(self, address):
         if self.actuator.is_valid(address):
-            self.valid_address.setChecked(True)
             self.check_button_status()
+            self.address_input.setProperty("isValid", True)
+            self.style().unpolish(self.address_input)
+            self.style().polish(self.address_input)
         else:
-            self.valid_address.setChecked(False)
             self.send_button.setDisabled(True)
+            self.address_input.setProperty("isValid", False)
+            self.style().unpolish(self.address_input)
+            self.style().polish(self.address_input)
 
     def copy_address(self):
         receive_popup = ReceivePopup(self.receive_button)