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 / Register
Toggle navigation
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
6e1832d5
Commit
6e1832d5
authored
Dec 08, 2009
by
con
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update tool tip text for "Show / Hide Sidebar" wrt current state.
parent
fec9dc0e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
0 deletions
+12
-0
src/plugins/coreplugin/mainwindow.cpp
src/plugins/coreplugin/mainwindow.cpp
+1
-0
src/plugins/coreplugin/navigationwidget.cpp
src/plugins/coreplugin/navigationwidget.cpp
+10
-0
src/plugins/coreplugin/navigationwidget.h
src/plugins/coreplugin/navigationwidget.h
+1
-0
No files found.
src/plugins/coreplugin/mainwindow.cpp
View file @
6e1832d5
...
...
@@ -716,6 +716,7 @@ void MainWindow::registerDefaultActions()
tr
(
"Show Sidebar"
),
this
);
m_toggleSideBarAction
->
setCheckable
(
true
);
cmd
=
am
->
registerAction
(
m_toggleSideBarAction
,
Constants
::
TOGGLE_SIDEBAR
,
m_globalContext
);
cmd
->
setAttribute
(
Command
::
CA_UpdateText
);
#ifdef Q_WS_MAC
cmd
->
setDefaultKeySequence
(
QKeySequence
(
"Ctrl+0"
));
#else
...
...
src/plugins/coreplugin/navigationwidget.cpp
View file @
6e1832d5
...
...
@@ -163,10 +163,19 @@ int NavigationWidget::storedWidth()
return
m_width
;
}
void
NavigationWidget
::
updateToggleText
()
{
if
(
isShown
())
m_toggleSideBarAction
->
setText
(
tr
(
"Hide Sidebar"
));
else
m_toggleSideBarAction
->
setText
(
tr
(
"Show Sidebar"
));
}
void
NavigationWidget
::
placeHolderChanged
(
NavigationWidgetPlaceHolder
*
holder
)
{
m_toggleSideBarAction
->
setEnabled
(
holder
);
m_toggleSideBarAction
->
setChecked
(
holder
&&
isShown
());
updateToggleText
();
}
void
NavigationWidget
::
resizeEvent
(
QResizeEvent
*
re
)
...
...
@@ -307,6 +316,7 @@ void NavigationWidget::setShown(bool b)
}
else
{
m_toggleSideBarAction
->
setChecked
(
false
);
}
updateToggleText
();
}
bool
NavigationWidget
::
isShown
()
const
...
...
src/plugins/coreplugin/navigationwidget.h
View file @
6e1832d5
...
...
@@ -107,6 +107,7 @@ private slots:
void
closeSubWidget
();
private:
void
updateToggleText
();
NavigationSubWidget
*
insertSubItem
(
int
position
);
QList
<
NavigationSubWidget
*>
m_subWidgets
;
QHash
<
QShortcut
*
,
QString
>
m_shortcutMap
;
...
...
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