Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Q
qtquickcontrols-nemo
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
NemoMobile
qtquickcontrols-nemo
Commits
006b3dc7
Commit
006b3dc7
authored
Apr 15, 2017
by
Chupligin Sergey
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Sizing] fix db scale
parent
b5bfdc9c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
sizing.cpp
src/controls/sizing.cpp
+6
-6
No files found.
src/controls/sizing.cpp
View file @
006b3dc7
...
...
@@ -29,13 +29,13 @@ Sizing::Sizing(QObject *parent) : QObject(parent)
}
else
if
(
m_dpi
>=
140
&&
m_dpi
<
200
){
//~160dpi
m_densitie
=
mdpi
;
}
else
if
(
m_dpi
>=
200
&&
m_dpi
<
28
0
){
}
else
if
(
m_dpi
>=
200
&&
m_dpi
<
30
0
){
//~240dpi
m_densitie
=
hdpi
;
}
else
if
(
m_dpi
>=
280
&&
m_dpi
<
40
0
){
}
else
if
(
m_dpi
>=
300
&&
m_dpi
<
42
0
){
//~320dpi
m_densitie
=
xhdpi
;
}
else
if
(
m_dpi
>=
4
0
0
&&
m_dpi
<
560
){
}
else
if
(
m_dpi
>=
4
2
0
&&
m_dpi
<
560
){
//~480dpi
m_densitie
=
xxhdpi
;
}
else
{
...
...
@@ -45,7 +45,6 @@ Sizing::Sizing(QObject *parent) : QObject(parent)
if
(
m_p_height
>
0
&&
m_p_width
>
0
){
m_valid
=
true
;
setMmScaleFactor
();
setDpScaleFactor
();
}
else
{
if
(
m_p_height
==
0
){
qWarning
(
"QT_QPA_EGLFS_PHYSICAL_HEIGHT is not set!"
);
...
...
@@ -56,6 +55,7 @@ Sizing::Sizing(QObject *parent) : QObject(parent)
}
qWarning
(
"Device mm sizing don`t work"
);
}
setDpScaleFactor
();
}
void
Sizing
::
setMmScaleFactor
()
...
...
@@ -80,7 +80,7 @@ void Sizing::setDpScaleFactor()
m_dp_factor
=
1
;
break
;
case
xhdpi
:
m_dp_factor
=
1.
3
;
m_dp_factor
=
1.
5
;
break
;
case
xxhdpi
:
m_dp_factor
=
2
;
...
...
@@ -89,7 +89,7 @@ void Sizing::setDpScaleFactor()
m_dp_factor
=
2.5
;
break
;
default:
m_dp_factor
=
1.
3
;
m_dp_factor
=
1.
5
;
break
;
}
...
...
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