Start writing tabs tests

This commit is contained in:
Micah Lee 2019-11-03 00:47:51 -07:00
parent 2afb443246
commit 66aea71468
5 changed files with 455 additions and 25 deletions

View file

@ -67,23 +67,27 @@ class Tab(QtWidgets.QWidget):
self.app = OnionShare(common, self.common.gui.onion, self.common.gui.local_only)
# Widgets to display on a new tab
share_button = QtWidgets.QPushButton(strings._("gui_new_tab_share_button"))
share_button.setStyleSheet(self.common.gui.css["mode_new_tab_button"])
self.share_button = QtWidgets.QPushButton(strings._("gui_new_tab_share_button"))
self.share_button.setStyleSheet(self.common.gui.css["mode_new_tab_button"])
share_description = QtWidgets.QLabel(strings._("gui_new_tab_share_description"))
share_description.setWordWrap(True)
share_button.clicked.connect(self.share_mode_clicked)
self.share_button.clicked.connect(self.share_mode_clicked)
receive_button = QtWidgets.QPushButton(strings._("gui_new_tab_receive_button"))
receive_button.setStyleSheet(self.common.gui.css["mode_new_tab_button"])
receive_button.clicked.connect(self.receive_mode_clicked)
self.receive_button = QtWidgets.QPushButton(
strings._("gui_new_tab_receive_button")
)
self.receive_button.setStyleSheet(self.common.gui.css["mode_new_tab_button"])
self.receive_button.clicked.connect(self.receive_mode_clicked)
receive_description = QtWidgets.QLabel(
strings._("gui_new_tab_receive_description")
)
receive_description.setWordWrap(True)
website_button = QtWidgets.QPushButton(strings._("gui_new_tab_website_button"))
website_button.setStyleSheet(self.common.gui.css["mode_new_tab_button"])
website_button.clicked.connect(self.website_mode_clicked)
self.website_button = QtWidgets.QPushButton(
strings._("gui_new_tab_website_button")
)
self.website_button.setStyleSheet(self.common.gui.css["mode_new_tab_button"])
self.website_button.clicked.connect(self.website_mode_clicked)
website_description = QtWidgets.QLabel(
strings._("gui_new_tab_website_description")
)
@ -91,13 +95,13 @@ class Tab(QtWidgets.QWidget):
new_tab_layout = QtWidgets.QVBoxLayout()
new_tab_layout.addStretch(1)
new_tab_layout.addWidget(share_button)
new_tab_layout.addWidget(self.share_button)
new_tab_layout.addWidget(share_description)
new_tab_layout.addSpacing(50)
new_tab_layout.addWidget(receive_button)
new_tab_layout.addWidget(self.receive_button)
new_tab_layout.addWidget(receive_description)
new_tab_layout.addSpacing(50)
new_tab_layout.addWidget(website_button)
new_tab_layout.addWidget(self.website_button)
new_tab_layout.addWidget(website_description)
new_tab_layout.addStretch(3)