beginning Downloads layout

This commit is contained in:
Micah Lee 2014-08-27 16:43:18 -07:00
parent d519e62b93
commit e7af77b3f7
4 changed files with 44 additions and 2 deletions

View file

@ -6,6 +6,7 @@ from onionshare import strings, helpers
class ServerStatus(QtGui.QVBoxLayout):
def __init__(self):
super(ServerStatus, self).__init__()
self.addSpacing(10)
# server layout
self.status_image = QtGui.QImage('{0}/server_stopped.png'.format(common.onionshare_gui_dir))
@ -22,12 +23,21 @@ class ServerStatus(QtGui.QVBoxLayout):
server_layout.addWidget(self.stop_server_button)
# url layout
self.url_label = QtGui.QLabel('http://mry2aqolyzxwfxpt.onion/x6justoparr5ayreqj6zyf6w2e')
url_font = QtGui.QFont()
url_font.setPointSize(8)
self.url_label = QtGui.QLabel('http://mry2aqolyzxwfxpt.onion/ x6justoparr5ayreqj6zyf6w2e')
self.url_label.setFont(url_font)
self.url_label.setWordWrap(True)
self.url_label.setAlignment(QtCore.Qt.AlignCenter)
self.url_label.setMargin(3)
self.copy_url_button = QtGui.QPushButton(strings._('gui_copy_url'))
self.copy_url_button.clicked.connect(self.copy_url)
url_layout = QtGui.QHBoxLayout()
url_layout.addWidget(self.url_label)
url_layout.addWidget(self.copy_url_button)
# url fields start hidden, until there's a URL
self.url_label.hide()
self.copy_url_button.hide()
# add the widgets
self.addLayout(server_layout)