https://bugs.kde.org/show_bug.cgi?id=525934
Bug ID: 525934
Summary: RDP: "Scaling Factor" slider has no effect
Classification: Applications
Product: krdc
Version First 26.08.1
Reported In:
Platform: Compiled Sources
OS: Linux
Status: REPORTED
Severity: normal
Priority: NOR
Component: RDP
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ---
STEPS TO REPRODUCE
1. Connect to any RDP host.
2. Turn on "Scale Remote Screen to Fit Window Size". The "Scaling Factor"
slider is only enabled while scaling is on.
3. Move the "Scaling Factor" slider from 100% to 200%, either in the main
toolbar or in the fullscreen toolbar.
OBSERVED RESULT
Nothing changes. The remote screen stays scaled to fit the window. The new
value is saved in the host preferences but never used.
EXPECTED RESULT
The view is zoomed by the chosen factor on top of the fit, with scrollbars for
the part that doesn't fit, as it is for VNC.
SOFTWARE/OS VERSIONS
Reproduced on current master (f1f75253) on both wayland and xcb: Fedora 44,
Plasma 6.7.5, KF 6.30.0, Qt 6.11.2. 26.08.x ignores the factor in the same way.
ADDITIONAL INFORMATION
MainWindow::setFactor() calls RemoteView::setScaleFactor(), which only stores
m_factor, and then enableScaling(). RdpView doesn't override setScaleFactor(),
and RdpView::sizeHint() never reads m_factor. VncView applies it in
scaleResize().
The fix below is tested on master with both backends. At 200% the view grows to
twice the fitted size and scrolls. At 100%, and with scaling off, nothing
changes. m_factor is 0 until the slider has emitted a value, hence the guard.
The slider is only enabled while scaling is on, so only that branch needs the
factor. scaleResize() still sends the server the viewport size, not the view
size, so the zoom doesn't request a new remote resolution.
diff --git a/rdp/rdpview.cpp b/rdp/rdpview.cpp
index 90dd3a0e..bdb18e26 100644
--- a/rdp/rdpview.cpp
+++ b/rdp/rdpview.cpp
@@ -111,7 +111,10 @@ QSize RdpView::sizeHint() const
// when parent is resized and scaling is enabled, resize the view,
preserving aspect ratio
if (m_hostPreferences->scaleToSize()) {
- return remoteSize.scaled(parentWidget()->size(), Qt::KeepAspectRatio);
+ // m_factor is the "Scaling Factor" slider (1.0 - 2.0), applied on top
of the fit, as
+ // VncView does. It stays 0 until the slider has emitted a value.
+ const qreal factor = m_factor > 0 ? m_factor : 1.0;
+ return remoteSize.scaled(parentWidget()->size(), Qt::KeepAspectRatio)
* factor;
}
return remoteSize / m_session->outputScale();
--
You are receiving this mail because:
You are watching all bug changes.