mirror of
https://github.com/onionshare/onionshare.git
synced 2024-12-27 16:29:41 -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:
|
elif self.tab_mode == None:
|
||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
self.settings.set("general", "title", self.title_lineedit.text())
|
title = self.title_lineedit.text()
|
||||||
shortened_title = self.title_lineedit.text()
|
self.settings.set("general", "title", title)
|
||||||
if len(shortened_title) > 11:
|
self.tab.change_title.emit(self.tab.tab_id, title)
|
||||||
shortened_title = shortened_title[:10] + "..."
|
|
||||||
self.tab.change_title.emit(self.tab.tab_id, shortened_title)
|
|
||||||
|
|
||||||
def persistent_checkbox_clicked(self):
|
def persistent_checkbox_clicked(self):
|
||||||
self.settings.set("persistent", "enabled", self.persistent_checkbox.isChecked())
|
self.settings.set("persistent", "enabled", self.persistent_checkbox.isChecked())
|
||||||
|
@ -188,8 +188,13 @@ class TabWidget(QtWidgets.QTabWidget):
|
|||||||
self.bring_to_front.emit()
|
self.bring_to_front.emit()
|
||||||
|
|
||||||
def change_title(self, tab_id, title):
|
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])
|
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):
|
def change_icon(self, tab_id, icon_path):
|
||||||
index = self.indexOf(self.tabs[tab_id])
|
index = self.indexOf(self.tabs[tab_id])
|
||||||
|
Loading…
Reference in New Issue
Block a user