From 625144afe6e0f791dd49d345ccee4adbaf3b81da Mon Sep 17 00:00:00 2001 From: Saptak S Date: Thu, 24 Feb 2022 21:02:08 +0530 Subject: Adds styles for the tab bar --- desktop/onionshare/gui_common.py | 9 +++++++++ desktop/onionshare/resources/locale/en.json | 2 +- desktop/onionshare/settings_parent_tab.py | 6 ++++-- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/desktop/onionshare/gui_common.py b/desktop/onionshare/gui_common.py index 4cf0f010..c717fd22 100644 --- a/desktop/onionshare/gui_common.py +++ b/desktop/onionshare/gui_common.py @@ -121,6 +121,15 @@ class GuiCommon: font-weight: bold; font-size: 20px; }""", + "settings_subtab_bar": """ + QTabBar::tab { + background: transparent; + } + QTabBar::tab:selected { + border-bottom: 3px solid; + border-color: #4E064F; + padding: 3px + }""", "mode_new_tab_button": """ QPushButton { font-weight: bold; diff --git a/desktop/onionshare/resources/locale/en.json b/desktop/onionshare/resources/locale/en.json index bce88b2b..9627b4d9 100644 --- a/desktop/onionshare/resources/locale/en.json +++ b/desktop/onionshare/resources/locale/en.json @@ -60,7 +60,7 @@ "gui_autoconnect_circumventing_censorship_got_bridges": "Got bridges! Trying to reconnect to Tor", "gui_autoconnect_could_not_connect_to_tor_api": "Could not connect to the Tor API. Make sure you are connected to the internet before trying again.", "gui_settings_window_title": "Settings", - "gui_general_settings_window_title": "Settings", + "gui_general_settings_window_title": "General", "gui_settings_autoupdate_label": "Check for new version", "gui_settings_autoupdate_option": "Notify me when a new version is available", "gui_settings_autoupdate_timestamp": "Last checked: {}", diff --git a/desktop/onionshare/settings_parent_tab.py b/desktop/onionshare/settings_parent_tab.py index 883ba922..030cacc0 100644 --- a/desktop/onionshare/settings_parent_tab.py +++ b/desktop/onionshare/settings_parent_tab.py @@ -37,7 +37,7 @@ class SettingsParentTab(QtWidgets.QTabWidget): self.current_tab_id = self.tabs[active_tab] # Use a custom tab bar - tab_bar = TabBar() + tab_bar = TabBar(self.common) self.setTabBar(tab_bar) settings_tab = SettingsTab(self.common, self.tabs['general'], parent=self) self.tor_settings_tab = TorSettingsTab( @@ -66,5 +66,7 @@ class TabBar(QtWidgets.QTabBar): move_new_tab_button = QtCore.Signal() - def __init__(self): + def __init__(self, common): super(TabBar, self).__init__() + self.setStyleSheet(common.gui.css['settings_subtab_bar']) + -- cgit v1.2.3-54-g00ecf