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
System
Dolphin
Commits
ba8158e2
Commit
ba8158e2
authored
Apr 07, 2021
by
Michael Lang
Committed by
Méven Car
Apr 07, 2021
Browse files
Add option to hide entire status bar
parent
2200e3c0
Pipeline
#56729
passed with stage
in 7 minutes and 27 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/settings/dolphin_generalsettings.kcfg
View file @
ba8158e2
...
...
@@ -101,6 +101,10 @@
<label>
Use auto-expanding folders for all view types
</label>
<default>
false
</default>
</entry>
<entry
name=
"ShowStatusBar"
type=
"Bool"
>
<label>
Show the statusbar
</label>
<default>
true
</default>
</entry>
<entry
name=
"ShowZoomSlider"
type=
"Bool"
>
<label>
Show zoom slider in the statusbar
</label>
<default>
true
</default>
...
...
src/settings/general/statusbarsettingspage.cpp
View file @
ba8158e2
...
...
@@ -15,19 +15,24 @@
StatusBarSettingsPage
::
StatusBarSettingsPage
(
QWidget
*
parent
)
:
SettingsPageBase
(
parent
),
m_showStatusBar
(
nullptr
),
m_showZoomSlider
(
nullptr
),
m_showSpaceInfo
(
nullptr
)
{
m_showStatusBar
=
new
QCheckBox
(
i18nc
(
"@option:check"
,
"Show status bar"
),
this
);
m_showZoomSlider
=
new
QCheckBox
(
i18nc
(
"@option:check"
,
"Show zoom slider"
),
this
);
m_showSpaceInfo
=
new
QCheckBox
(
i18nc
(
"@option:check"
,
"Show space information"
),
this
);
QVBoxLayout
*
topLayout
=
new
QVBoxLayout
(
this
);
topLayout
->
addWidget
(
m_showStatusBar
);
topLayout
->
addWidget
(
m_showZoomSlider
);
topLayout
->
addWidget
(
m_showSpaceInfo
);
topLayout
->
addStretch
();
loadSettings
();
connect
(
m_showStatusBar
,
&
QCheckBox
::
toggled
,
this
,
&
StatusBarSettingsPage
::
changed
);
connect
(
m_showStatusBar
,
&
QCheckBox
::
toggled
,
this
,
&
StatusBarSettingsPage
::
onShowStatusBarToggled
);
connect
(
m_showZoomSlider
,
&
QCheckBox
::
toggled
,
this
,
&
StatusBarSettingsPage
::
changed
);
connect
(
m_showSpaceInfo
,
&
QCheckBox
::
toggled
,
this
,
&
StatusBarSettingsPage
::
changed
);
}
...
...
@@ -36,9 +41,17 @@ StatusBarSettingsPage::~StatusBarSettingsPage()
{
}
void
StatusBarSettingsPage
::
onShowStatusBarToggled
()
{
const
bool
checked
=
m_showStatusBar
->
isChecked
();
m_showZoomSlider
->
setEnabled
(
checked
);
m_showSpaceInfo
->
setEnabled
(
checked
);
}
void
StatusBarSettingsPage
::
applySettings
()
{
GeneralSettings
*
settings
=
GeneralSettings
::
self
();
settings
->
setShowStatusBar
(
m_showStatusBar
->
isChecked
());
settings
->
setShowZoomSlider
(
m_showZoomSlider
->
isChecked
());
settings
->
setShowSpaceInfo
(
m_showSpaceInfo
->
isChecked
());
settings
->
save
();
...
...
@@ -54,7 +67,10 @@ void StatusBarSettingsPage::restoreDefaults()
void
StatusBarSettingsPage
::
loadSettings
()
{
m_showStatusBar
->
setChecked
(
GeneralSettings
::
showStatusBar
());
m_showZoomSlider
->
setChecked
(
GeneralSettings
::
showZoomSlider
());
m_showSpaceInfo
->
setChecked
(
GeneralSettings
::
showSpaceInfo
());
onShowStatusBarToggled
();
}
src/settings/general/statusbarsettingspage.h
View file @
ba8158e2
...
...
@@ -29,8 +29,10 @@ public:
private:
void
loadSettings
();
void
onShowStatusBarToggled
();
private:
QCheckBox
*
m_showStatusBar
;
QCheckBox
*
m_showZoomSlider
;
QCheckBox
*
m_showSpaceInfo
;
};
...
...
src/statusbar/dolphinstatusbar.cpp
View file @
ba8158e2
...
...
@@ -321,12 +321,15 @@ void DolphinStatusBar::updateZoomSliderToolTip(int zoomLevel)
void
DolphinStatusBar
::
setExtensionsVisible
(
bool
visible
)
{
bool
showStatusBar
=
visible
;
bool
showSpaceInfo
=
visible
;
bool
showZoomSlider
=
visible
;
if
(
visible
)
{
showStatusBar
=
GeneralSettings
::
showStatusBar
();
showSpaceInfo
=
GeneralSettings
::
showSpaceInfo
();
showZoomSlider
=
GeneralSettings
::
showZoomSlider
();
}
setVisible
(
showStatusBar
);
m_spaceInfo
->
setShown
(
showSpaceInfo
);
m_spaceInfo
->
setVisible
(
showSpaceInfo
);
m_zoomSlider
->
setVisible
(
showZoomSlider
);
...
...
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