Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpenBoard
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lifo
Nicolas Ollinger
OpenBoard
Commits
2b1af9d2
Commit
2b1af9d2
authored
Jun 12, 2018
by
Clément Fauconnier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
changed checkbox name and simplified code for swapDisplayScreens
parent
823115bd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
41 deletions
+2
-41
preferences.ui
resources/forms/preferences.ui
+1
-1
UBDisplayManager.cpp
src/core/UBDisplayManager.cpp
+1
-40
No files found.
resources/forms/preferences.ui
View file @
2b1af9d2
...
...
@@ -134,7 +134,7 @@
<item
row=
"2"
column=
"3"
>
<widget
class=
"QCheckBox"
name=
"swapDisplayScreensCheckBox"
>
<property
name=
"text"
>
<string>
Swap first and second displays
</string>
<string>
Swap first and second
view
displays
</string>
</property>
</widget>
</item>
...
...
src/core/UBDisplayManager.cpp
View file @
2b1af9d2
...
...
@@ -109,46 +109,7 @@ void UBDisplayManager::initScreenIndexes()
void
UBDisplayManager
::
swapDisplayScreens
(
bool
swap
)
{
int
screenCount
=
numScreens
();
mScreenIndexesRoles
.
clear
();
if
(
screenCount
>
0
)
{
mControlScreenIndex
=
mDesktop
->
primaryScreen
();
if
(
screenCount
>
1
&&
UBSettings
::
settings
()
->
swapControlAndDisplayScreens
->
get
().
toBool
())
{
mControlScreenIndex
=
mControlScreenIndex
^
1
;
}
mScreenIndexesRoles
<<
Control
;
}
else
{
mControlScreenIndex
=
-
1
;
}
if
(
screenCount
>
1
&&
mUseMultiScreen
)
{
mDisplayScreenIndex
=
mControlScreenIndex
!=
0
?
0
:
1
;
mScreenIndexesRoles
<<
Display
;
}
else
{
mDisplayScreenIndex
=
-
1
;
}
mPreviousScreenIndexes
.
clear
();
if
(
screenCount
>
2
)
{
for
(
int
i
=
2
;
i
<
screenCount
;
i
++
)
{
if
(
mControlScreenIndex
==
i
)
mPreviousScreenIndexes
.
append
(
1
);
else
mPreviousScreenIndexes
.
append
(
i
);
}
}
initScreenIndexes
();
if
(
swap
)
{
...
...
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