Modified styling, removed obsolete styles and added wether we have are displaying...
authorMaran <maran.hidskes@gmail.com>
Thu, 10 Jan 2013 20:51:27 +0000 (21:51 +0100)
committerMaran <maran.hidskes@gmail.com>
Thu, 10 Jan 2013 20:51:27 +0000 (21:51 +0100)
data/cleanlook/style.css
lib/gui_lite.py

index eda2117..888cbcf 100644 (file)
@@ -9,19 +9,18 @@ MiniWindow QPushButton {
   border-radius: 0px;
   background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
   stop: 0 white, stop: 1 #E6E6E6);
-  min-height: 25px;
+  min-height: 30px;
   min-width: 30px;
 }
 
 #send_button{
-  color: #E5F2FF;
+  color: #FFF;
   border: 1px solid #3786E6;
   border-radius: 4px;
   background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
   stop: 0 #72B2F8, stop: 1 #3484E6);
-  min-width: 80px;
-  min-height: 23px;
   padding: 2px;
+  width: 20px;
 }
 
 #send_button:disabled{
@@ -30,65 +29,27 @@ MiniWindow QPushButton {
   border-radius: 4px;
   background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
   stop: 0 #A5CFFA, stop: 1 #72B2F8);
-  min-width: 80px;
-  min-height: 23px;
-  padding: 2px;
 }
-#receive_button
-{
-  color: #777;
-  border: 1px solid #CCC;
-  border-radius: 0px;
-  background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
-  stop: 0 white, stop: 1 #E6E6E6);
-  min-height: 25px;
-  min-width: 30px;
-}          
-#receive_button[isActive=true]
-{
-  color: #575757;
-  background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
-  stop: 0 white, stop: 1 #D1D1D1);
-}          
-
 #address_input, #amount_input, #label_input
 {
     color: #000;
     padding: 5px;
-    border-radius: 4px;
+    border-radius: 5px;
+    min-height: 23px;
     border: 1px solid #AAA9A9;
-    width: 225px;
+    width: 200px;
 }
 
 #address_input[isValid=true]
 {
   color: #4D9948;
-  padding: 5px;
-  border-radius: 4px;
-  border: 1px solid #AAA9A9;
-  width: 225px;
-  margin-top: 4px;
 }
 
 #address_input[isValid=false]
 {
   color: #CE4141;
-  padding: 5px;
-  border-radius: 4px;
-  border: 1px solid #AAA9A9;
-  width: 225px;
-  margin-top: 4px;
 }
 
-#address_input[isValid=placeholder]
-{
-  color: blue;
-  padding: 5px;
-  border-radius: 4px;
-  border: 1px solid #AAA9A9;
-  width: 225px;
-  margin-top: 4px;
-}
 #balance_label
 {
     color: #333;
index 7908d6f..fc4199d 100644 (file)
@@ -312,13 +312,14 @@ class MiniWindow(QDialog):
         main_layout.addWidget(self.amount_input, 2, 0, 1, 2)
         main_layout.addWidget(self.send_button, 2, 2, 1, 2)
 
+        self.send_button.setMaximumWidth(125)
+
         self.history_list = history_widget.HistoryWidget()
         self.history_list.setObjectName("history")
         self.history_list.hide()
         self.history_list.setAlternatingRowColors(True)
 
         main_layout.addWidget(self.history_list, 3, 0, 1, 4)
-        
 
         self.receiving = receiving_widget.ReceivingWidget(self)
         self.receiving.setObjectName("receiving")
@@ -337,6 +338,7 @@ class MiniWindow(QDialog):
         self.receiving.itemDoubleClicked.connect(self.receiving.edit_label)
         self.receiving.itemChanged.connect(self.receiving.update_label)
 
+
         # Label
         extra_layout.addWidget( QLabel(_('Selecting an address will copy it to the clipboard.\nDouble clicking the label will allow you to edit it.') ),0,0)
 
@@ -391,9 +393,16 @@ class MiniWindow(QDialog):
             theme_group.addAction(theme_action)
         view_menu.addSeparator()
 
-        show_history = view_menu.addAction(_("Receive"))
-        show_history.setCheckable(True)
-        show_history.toggled.connect(self.toggle_receiving_layout)
+        show_receiving = view_menu.addAction(_("Show Receiving addresses"))
+        show_receiving.setCheckable(True)
+        show_receiving.toggled.connect(self.toggle_receiving_layout)
+
+        show_receiving_toggle = self.config.get("gui_show_receiving",False)
+        show_receiving.setChecked(show_receiving_toggle)
+        self.show_receiving = show_receiving
+
+        self.toggle_receiving_layout(show_receiving_toggle )
+
 
         show_history = view_menu.addAction(_("Show History"))
         show_history.setCheckable(True)
@@ -429,11 +438,6 @@ class MiniWindow(QDialog):
         self.setObjectName("main_window")
         self.show()
 
-    def toggle_receiving_layout(self):
-        if self.receiving_box.isVisible():
-            self.receiving_box.hide()
-        else:
-            self.receiving_box.show()
 
     def toggle_theme(self, theme_name):
         old_path = QDir.currentPath()
@@ -447,6 +451,7 @@ class MiniWindow(QDialog):
         g = self.geometry()
         self.config.set_key("winpos-lite", [g.left(),g.top(),g.width(),g.height()],True)
         self.config.set_key("gui_show_history", self.history_list.isVisible(),True)
+        self.config.set_key("gui_show_receiving", self.show_receiving.isVisible(),True)
         
         super(MiniWindow, self).closeEvent(event)
         qApp.quit()
@@ -601,6 +606,12 @@ class MiniWindow(QDialog):
         QMessageBox.information(self, "Electrum - " + _("Reporting Bugs"),
             _("Please report any bugs as issues on github: <a href=\"https://github.com/spesmilo/electrum/issues\">https://github.com/spesmilo/electrum/issues</a>"))
 
+    def toggle_receiving_layout(self, toggle_state):
+        if toggle_state:
+          self.receiving_box.show()
+        else:
+          self.receiving_box.hide()
+
     def show_history(self, toggle_state):
         if toggle_state:
             self.main_layout.setRowMinimumHeight(3,200)