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
Utilities
Konsole
Commits
4227a7bc
Commit
4227a7bc
authored
Apr 17, 2021
by
Kurt Hindenburg
Browse files
Port away from from deprecated QPrinter::pageRect()
parent
bd3de374
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/widgets/KonsolePrintManager.cpp
View file @
4227a7bc
...
@@ -62,8 +62,9 @@ void KonsolePrintManager::printRequest(pPrintContent pContent, QWidget *parent)
...
@@ -62,8 +62,9 @@ void KonsolePrintManager::printRequest(pPrintContent pContent, QWidget *parent)
KConfigGroup
configGroup
(
KSharedConfig
::
openConfig
(),
"PrintOptions"
);
KConfigGroup
configGroup
(
KSharedConfig
::
openConfig
(),
"PrintOptions"
);
if
(
configGroup
.
readEntry
(
"ScaleOutput"
,
true
))
{
if
(
configGroup
.
readEntry
(
"ScaleOutput"
,
true
))
{
double
scale
=
qMin
(
printer
.
pageRect
().
width
()
/
static_cast
<
double
>
(
parent
->
width
()),
QRect
page_rect
=
printer
.
pageLayout
().
paintRectPixels
(
printer
.
resolution
());
printer
.
pageRect
().
height
()
/
static_cast
<
double
>
(
parent
->
height
()));
double
scale
=
qMin
(
page_rect
.
width
()
/
static_cast
<
double
>
(
parent
->
width
()),
page_rect
.
height
()
/
static_cast
<
double
>
(
parent
->
height
()));
painter
.
scale
(
scale
,
scale
);
painter
.
scale
(
scale
,
scale
);
}
}
...
...
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