Internal
Public Access
Add VNC-only scale-to-fit vs actual-size display toggle
VNC has no equivalent of RDP's MS-RDPEDISP to request a different resolution from the guest, so a high-resolution remote desktop previously always got shrunk to fit the window, making text illegible. Adds a per-tab "Display Mode" choice (tab-bar right-click) between the existing scale-to-fit behavior and a new actual-size mode that renders the framebuffer at its native pixel size inside a QScrollArea. Reuses VncDisplayWidget's existing scale-to-fit render math unchanged -- it degenerates to an exact 1:1 mapping once the widget is fixed to the remote's own size. Persisted like the terminal theme preference. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
6da9dc6ca5
commit
0b5454197c
6 files changed
+129
-5
No files matched your search
@@ -23,6 +23,7 @@ class QLineEdit;
|
||||
class QComboBox;
|
||||
class QLabel;
|
||||
class QPushButton;
|
||||
class QScrollArea;
|
||||
class KodoTerm;
|
||||
|
||||
struct SessionUiPreferences
|
||||
@@ -30,6 +31,7 @@ struct SessionUiPreferences
|
||||
QString terminalThemeName = QStringLiteral("Dark");
|
||||
bool eventsPanelExpanded = false;
|
||||
int terminalFontPointSize = 0;
|
||||
bool vncScaleToFit = true;
|
||||
};
|
||||
|
||||
class SessionTab : public QWidget
|
||||
@@ -62,6 +64,9 @@ public:
|
||||
void clearEvents();
|
||||
void copyEvents() const;
|
||||
void exportEventsToFile();
|
||||
bool supportsVncScaleToggle() const;
|
||||
void setVncScaleToFit(bool scaleToFit);
|
||||
bool vncScaleToFit() const;
|
||||
|
||||
signals:
|
||||
void tabTitleChanged(const QString& title);
|
||||
@@ -69,6 +74,7 @@ signals:
|
||||
void terminalThemeChanged(const QString& themeName);
|
||||
void terminalFontSizeChanged(int pointSize);
|
||||
void eventsPanelVisibilityChanged(bool expanded);
|
||||
void vncScaleModeChanged(bool scaleToFit);
|
||||
void requestConnect(const SessionConnectOptions& options);
|
||||
void requestDisconnect();
|
||||
void requestReconnect(const SessionConnectOptions& options);
|
||||
@@ -111,6 +117,7 @@ private:
|
||||
KodoTerm* m_sshTerminal;
|
||||
RdpDisplayWidget* m_rdpDisplay;
|
||||
VncDisplayWidget* m_vncDisplay;
|
||||
QScrollArea* m_vncScrollArea;
|
||||
TerminalView* m_terminalOutput;
|
||||
QPlainTextEdit* m_eventLog;
|
||||
QToolButton* m_toggleEventsButton;
|
||||
|
||||
Reference in new issue
Block a user