Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
System
Dolphin
Commits
31cba55c
Commit
31cba55c
authored
Jul 08, 2020
by
toluschr
Committed by
Elvis Angelaccio
Oct 13, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add tooltip to tabbar
parent
b343fdff
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
src/dolphintabwidget.cpp
src/dolphintabwidget.cpp
+6
-1
No files found.
src/dolphintabwidget.cpp
View file @
31cba55c
...
...
@@ -382,6 +382,7 @@ void DolphinTabWidget::tabUrlChanged(const QUrl& url)
const
int
index
=
indexOf
(
qobject_cast
<
QWidget
*>
(
sender
()));
if
(
index
>=
0
)
{
tabBar
()
->
setTabText
(
index
,
tabName
(
tabPageAt
(
index
)));
tabBar
()
->
setTabToolTip
(
index
,
url
.
path
());
if
(
tabBar
()
->
isVisible
())
{
tabBar
()
->
setTabIcon
(
index
,
QIcon
::
fromTheme
(
KIO
::
iconNameForUrl
(
url
)));
}
else
{
...
...
@@ -417,8 +418,12 @@ void DolphinTabWidget::tabInserted(int index)
if
(
count
()
>
1
)
{
// Resolve all pending tab icons
for
(
int
i
=
0
;
i
<
count
();
++
i
)
{
const
QUrl
url
=
tabPageAt
(
i
)
->
activeViewContainer
()
->
url
();
if
(
tabBar
()
->
tabIcon
(
i
).
isNull
())
{
tabBar
()
->
setTabIcon
(
i
,
QIcon
::
fromTheme
(
KIO
::
iconNameForUrl
(
tabPageAt
(
i
)
->
activeViewContainer
()
->
url
())));
tabBar
()
->
setTabIcon
(
i
,
QIcon
::
fromTheme
(
KIO
::
iconNameForUrl
(
url
)));
}
if
(
tabBar
()
->
tabToolTip
(
i
).
isEmpty
())
{
tabBar
()
->
setTabToolTip
(
index
,
url
.
path
());
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment