mirror of
https://github.com/onionshare/onionshare.git
synced 2024-12-25 23:39:43 -05:00
Add tooltips to tabs, so you can tell what even long titles are
This commit is contained in:
parent
6772431220
commit
3c76f3403d
@ -236,11 +236,9 @@ class ModeSettingsWidget(QtWidgets.QWidget):
|
||||
elif self.tab_mode == None:
|
||||
pass
|
||||
else:
|
||||
self.settings.set("general", "title", self.title_lineedit.text())
|
||||
shortened_title = self.title_lineedit.text()
|
||||
if len(shortened_title) > 11:
|
||||
shortened_title = shortened_title[:10] + "..."
|
||||
self.tab.change_title.emit(self.tab.tab_id, shortened_title)
|
||||
title = self.title_lineedit.text()
|
||||
self.settings.set("general", "title", title)
|
||||
self.tab.change_title.emit(self.tab.tab_id, title)
|
||||
|
||||
def persistent_checkbox_clicked(self):
|
||||
self.settings.set("persistent", "enabled", self.persistent_checkbox.isChecked())
|
||||
|
@ -188,8 +188,13 @@ class TabWidget(QtWidgets.QTabWidget):
|
||||
self.bring_to_front.emit()
|
||||
|
||||
def change_title(self, tab_id, title):
|
||||
shortened_title = title
|
||||
if len(shortened_title) > 11:
|
||||
shortened_title = shortened_title[:10] + "..."
|
||||
|
||||
index = self.indexOf(self.tabs[tab_id])
|
||||
self.setTabText(index, title)
|
||||
self.setTabText(index, shortened_title)
|
||||
self.setTabToolTip(index, title)
|
||||
|
||||
def change_icon(self, tab_id, icon_path):
|
||||
index = self.indexOf(self.tabs[tab_id])
|
||||
|
Loading…
Reference in New Issue
Block a user