Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
VLMC
Manage
Activity
Members
Labels
Plan
Issues
26
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
VideoLAN
VLMC
Commits
a8a77e45
Commit
a8a77e45
authored
8 years ago
by
luyikei
Browse files
Options
Downloads
Patches
Plain Diff
MainWindow: Implement layout lock
parent
0cfcebf8
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/Gui/MainWindow.cpp
+18
-1
18 additions, 1 deletion
src/Gui/MainWindow.cpp
src/Gui/ui/MainWindow.ui
+8
-0
8 additions, 0 deletions
src/Gui/ui/MainWindow.ui
with
26 additions
and
1 deletion
src/Gui/MainWindow.cpp
+
18
−
1
View file @
a8a77e45
...
...
@@ -343,6 +343,20 @@ MainWindow::initVlmcPreferences()
m_ui
.
actionStatusbar
->
setChecked
(
v
);
}
);
connect
(
m_ui
.
actionStatusbar
,
&
QAction
::
toggled
,
statusbarSetting
,
&
SettingValue
::
set
);
// Layout Lock
auto
lockSetting
=
VLMC_CREATE_PRIVATE_PREFERENCE_BOOL
(
"private/LayoutLock"
,
true
);
connect
(
lockSetting
,
&
SettingValue
::
changed
,
this
,
[
this
](
const
QVariant
&
var
)
{
bool
v
=
var
.
toBool
();
for
(
auto
w
:
findChildren
<
QDockWidget
*>
()
)
if
(
v
==
true
)
w
->
setTitleBarWidget
(
new
QWidget
);
else
w
->
setTitleBarWidget
(
0
);
m_ui
.
actionLock
->
setChecked
(
v
);
}
);
connect
(
m_ui
.
actionLock
,
&
QAction
::
toggled
,
lockSetting
,
&
SettingValue
::
set
);
}
#undef CREATE_MENU_SHORTCUT
...
...
@@ -648,8 +662,11 @@ MainWindow::dockWidget( QWidget* widget, Qt::DockWidgetArea startArea )
dock
->
setAllowedAreas
(
Qt
::
AllDockWidgetAreas
);
widget
->
setParent
(
dock
);
dock
->
setWidget
(
widget
);
dock
->
setTitleBarWidget
(
new
QWidget
);
dock
->
setObjectName
(
widget
->
objectName
()
);
if
(
VLMC_GET_BOOL
(
"private/LayoutLock"
)
==
true
)
dock
->
setTitleBarWidget
(
new
QWidget
);
else
dock
->
setTitleBarWidget
(
0
);
addDockWidget
(
startArea
,
dock
);
registerWidgetInWindowMenu
(
dock
);
return
dock
;
...
...
This diff is collapsed.
Click to expand it.
src/Gui/ui/MainWindow.ui
+
8
−
0
View file @
a8a77e45
...
...
@@ -376,6 +376,14 @@
<string>
Toolbar
</string>
</property>
</action>
<action
name=
"actionLock"
>
<property
name=
"checkable"
>
<bool>
true
</bool>
</property>
<property
name=
"text"
>
<string>
Lock
</string>
</property>
</action>
</widget>
<resources>
<include
location=
"../../../resources.qrc"
/>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment