Adds styles for the tab bar

This commit is contained in:
Saptak S 2022-02-24 21:02:08 +05:30
parent 3b7655824d
commit 625144afe6
No known key found for this signature in database
GPG Key ID: 7B7F1772C0C6FCBF
3 changed files with 14 additions and 3 deletions

View File

@ -121,6 +121,15 @@ class GuiCommon:
font-weight: bold; font-weight: bold;
font-size: 20px; 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": """ "mode_new_tab_button": """
QPushButton { QPushButton {
font-weight: bold; font-weight: bold;

View File

@ -60,7 +60,7 @@
"gui_autoconnect_circumventing_censorship_got_bridges": "Got bridges! Trying to reconnect to Tor", "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_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_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_label": "Check for new version",
"gui_settings_autoupdate_option": "Notify me when a new version is available", "gui_settings_autoupdate_option": "Notify me when a new version is available",
"gui_settings_autoupdate_timestamp": "Last checked: {}", "gui_settings_autoupdate_timestamp": "Last checked: {}",

View File

@ -37,7 +37,7 @@ class SettingsParentTab(QtWidgets.QTabWidget):
self.current_tab_id = self.tabs[active_tab] self.current_tab_id = self.tabs[active_tab]
# Use a custom tab bar # Use a custom tab bar
tab_bar = TabBar() tab_bar = TabBar(self.common)
self.setTabBar(tab_bar) self.setTabBar(tab_bar)
settings_tab = SettingsTab(self.common, self.tabs['general'], parent=self) settings_tab = SettingsTab(self.common, self.tabs['general'], parent=self)
self.tor_settings_tab = TorSettingsTab( self.tor_settings_tab = TorSettingsTab(
@ -66,5 +66,7 @@ class TabBar(QtWidgets.QTabBar):
move_new_tab_button = QtCore.Signal() move_new_tab_button = QtCore.Signal()
def __init__(self): def __init__(self, common):
super(TabBar, self).__init__() super(TabBar, self).__init__()
self.setStyleSheet(common.gui.css['settings_subtab_bar'])