Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Joao Oliveira
Okular
Commits
11ec9723
Commit
11ec9723
authored
Jul 21, 2014
by
Albert Astals Cid
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/KDE/4.14'
Conflicts: VERSION core/version.h
parents
f8cb4789
60bcd397
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
2 deletions
+21
-2
core/utils.cpp
core/utils.cpp
+21
-2
No files found.
core/utils.cpp
View file @
11ec9723
...
...
@@ -150,7 +150,11 @@ QSizeF Utils::realDpi(QWidget* widgetOnScreen)
kDebug
()
<<
"Output is vertical, transposing DPI rect"
;
res
.
transpose
();
}
return
res
;
if
(
qAbs
(
res
.
width
()
-
res
.
height
())
/
qMin
(
res
.
height
(),
res
.
width
())
<
0.05
)
{
return
res
;
}
else
{
kDebug
()
<<
"KScreen calculation returned a non square dpi."
<<
res
<<
". Falling back"
;
}
}
}
else
...
...
@@ -166,7 +170,22 @@ QSizeF Utils::realDpi(QWidget* widgetOnScreen)
}
// this is also fallback for LibKScreen branch if KScreen::Output
// for particular widget was not found
return
QSizeF
(
realDpiX
(),
realDpiY
());
QSizeF
res
=
QSizeF
(
realDpiX
(),
realDpiY
());
if
(
qAbs
(
res
.
width
()
-
res
.
height
())
/
qMin
(
res
.
height
(),
res
.
width
())
<
0.05
)
{
return
res
;
}
else
{
kDebug
()
<<
"QDesktopWidget calculation returned a non square dpi."
<<
res
<<
". Falling back"
;
}
res
=
QSizeF
(
dpiX
(),
dpiY
());
if
(
qAbs
(
res
.
width
()
-
res
.
height
())
/
qMin
(
res
.
height
(),
res
.
width
())
<
0.05
)
{
return
res
;
}
else
{
kDebug
()
<<
"QX11Info returned a non square dpi."
<<
res
<<
". Falling back"
;
}
res
=
QSizeF
(
72
,
72
);
return
res
;
}
#elif defined(Q_WS_MAC)
...
...
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