Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Network
KRDC
Commits
0760c958
Commit
0760c958
authored
Aug 28, 2022
by
Luca Carlon
Committed by
Albert Astals Cid
Sep 04, 2022
Browse files
Fix scale computation when fitting framebuffer to local view.
parent
b9f0a172
Pipeline
#227031
passed with stage
in 1 minute
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
factorwidget.cpp
View file @
0760c958
...
...
@@ -43,7 +43,7 @@ QWidget * FactorWidget::createWidget(QWidget * parent)
}
QSlider
*
s
=
new
QSlider
(
Qt
::
Horizontal
,
_parent
);
s
->
setRange
(
0
,
1
00
);
s
->
setRange
(
10
0
,
2
00
);
s
->
setMaximumWidth
(
100
);
connect
(
s
,
&
QSlider
::
valueChanged
,
m_receiver
,
&
MainWindow
::
setFactor
);
...
...
vnc/vncview.cpp
View file @
0760c958
...
...
@@ -121,11 +121,9 @@ void VncView::scaleResize(int w, int h)
qCDebug
(
KRDC
)
<<
w
<<
h
;
if
(
m_scale
)
{
const
QSize
frameSize
=
m_frame
.
size
()
/
m_frame
.
devicePixelRatio
();
const
qreal
_newW
=
(
frameSize
.
width
()
-
w
)
*
m_factor
+
w
;
const
qreal
_newH
=
(
frameSize
.
height
()
-
h
)
*
m_factor
+
h
;
m_verticalFactor
=
_newH
/
frameSize
.
height
();
m_horizontalFactor
=
_newW
/
frameSize
.
width
();
m_verticalFactor
=
static_cast
<
qreal
>
(
h
)
/
frameSize
.
height
()
*
m_factor
;
m_horizontalFactor
=
static_cast
<
qreal
>
(
w
)
/
frameSize
.
width
()
*
m_factor
;
#ifndef QTONLY
if
(
Settings
::
keepAspectRatio
())
{
...
...
Luca Carlon
@lcarlon
mentioned in commit
312c4250
·
Sep 04, 2022
mentioned in commit
312c4250
mentioned in commit 312c42507e94072ee2793825d72cde16aaa6222a
Toggle commit list
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment