Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Graphics
Gwenview
Commits
556cf77a
Commit
556cf77a
authored
May 15, 2021
by
Noah Davis
🌵
Browse files
Use icons for sidebar toggle button
parent
829b7e43
Changes
1
Hide whitespace changes
Inline
Side-by-side
app/mainwindow.cpp
View file @
556cf77a
...
...
@@ -1236,9 +1236,9 @@ void MainWindow::toggleSideBar(bool visible)
d
->
saveSideBarVisibility
(
visible
);
d
->
mSideBar
->
setVisible
(
visible
);
const
QString
text
=
QApplication
::
isRightToLeft
()
?
QString
::
fromUtf8
(
visible
?
"▮→"
:
"▮←
"
)
:
QString
::
fromUtf8
(
visible
?
"▮←"
:
"▮→
"
);
const
QString
iconName
=
QApplication
::
isRightToLeft
()
?
(
visible
?
"sidebar-collapse-right"
:
"sidebar-expand-right
"
)
:
(
visible
?
"sidebar-collapse-left"
:
"sidebar-expand-left
"
);
const
QString
toolTip
=
visible
?
i18nc
(
"@info:tooltip"
,
"Hide sidebar"
)
:
i18nc
(
"@info:tooltip"
,
"Show sidebar"
);
...
...
@@ -1248,7 +1248,7 @@ void MainWindow::toggleSideBar(bool visible)
d
->
mViewMainPage
->
toggleSideBarButton
()
};
for
(
auto
button
:
buttonList
)
{
button
->
set
Text
(
text
);
button
->
set
Icon
(
QIcon
::
fromTheme
(
iconName
)
);
button
->
setToolTip
(
toolTip
);
}
}
...
...
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