From 95056b8bdef06f48353c0b23a20ad6a54903bc06 Mon Sep 17 00:00:00 2001 From: dalthviz <16781833+dalthviz@users.noreply.github.com> Date: Tue, 30 Jul 2024 20:37:31 -0500 Subject: [PATCH 1/6] Remote Client: Update connections dialog size constants. Add title and icon --- .../plugins/remoteclient/widgets/connectiondialog.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/spyder/plugins/remoteclient/widgets/connectiondialog.py b/spyder/plugins/remoteclient/widgets/connectiondialog.py index e1e5886205a..7d8d7e8fb20 100644 --- a/spyder/plugins/remoteclient/widgets/connectiondialog.py +++ b/spyder/plugins/remoteclient/widgets/connectiondialog.py @@ -134,6 +134,8 @@ def set_text(self, reasons: ValidationReasons): class BaseConnectionPage(SpyderConfigPage, SpyderFontsMixin): """Base class to create connection pages.""" + MAX_WIDTH = 450 + MIN_HEIGHT = 450 NEW_CONNECTION = False CONF_SECTION = "remoteclient" @@ -564,7 +566,6 @@ def _validate_address(self, address): class NewConnectionPage(BaseConnectionPage): """Page to receive SSH credentials for a remote connection.""" - MIN_HEIGHT = 500 LOAD_FROM_CONFIG = False NEW_CONNECTION = True @@ -615,8 +616,6 @@ def reset_page(self, clear=False): class ConnectionPage(BaseConnectionPage): """Page to display connection status and info for a remote machine.""" - MIN_HEIGHT = 620 - def __init__(self, parent, host_id): super().__init__(parent, host_id) self.new_name = None @@ -717,8 +716,10 @@ class ConnectionDialog(SidebarDialog): machines. """ - MIN_WIDTH = 620 - MIN_HEIGHT = 640 + TITLE = _("Remote connections") + ICON = ima.icon('remote_server') + MIN_WIDTH = 850 + MIN_HEIGHT = 600 PAGE_CLASSES = [NewConnectionPage] sig_start_server_requested = Signal(str) From b6ab0d5423530564c72e7fed39976370e97342cd Mon Sep 17 00:00:00 2001 From: dalthviz <16781833+dalthviz@users.noreply.github.com> Date: Wed, 31 Jul 2024 16:40:29 -0500 Subject: [PATCH 2/6] Testing --- spyder/plugins/remoteclient/widgets/connectiondialog.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spyder/plugins/remoteclient/widgets/connectiondialog.py b/spyder/plugins/remoteclient/widgets/connectiondialog.py index 7d8d7e8fb20..5a68147b168 100644 --- a/spyder/plugins/remoteclient/widgets/connectiondialog.py +++ b/spyder/plugins/remoteclient/widgets/connectiondialog.py @@ -717,7 +717,6 @@ class ConnectionDialog(SidebarDialog): """ TITLE = _("Remote connections") - ICON = ima.icon('remote_server') MIN_WIDTH = 850 MIN_HEIGHT = 600 PAGE_CLASSES = [NewConnectionPage] @@ -729,6 +728,7 @@ class ConnectionDialog(SidebarDialog): sig_connections_changed = Signal() def __init__(self, parent=None): + self.ICON = ima.icon('remote_server') super().__init__(parent) self._add_saved_connection_pages() From 5093bf5dc7989727c641cc22a84235c13111bbe2 Mon Sep 17 00:00:00 2001 From: dalthviz <16781833+dalthviz@users.noreply.github.com> Date: Wed, 31 Jul 2024 17:50:32 -0500 Subject: [PATCH 3/6] Remote Client: Connection dialog size check on Linux --- spyder/plugins/remoteclient/widgets/connectiondialog.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spyder/plugins/remoteclient/widgets/connectiondialog.py b/spyder/plugins/remoteclient/widgets/connectiondialog.py index 5a68147b168..f9a4b63456b 100644 --- a/spyder/plugins/remoteclient/widgets/connectiondialog.py +++ b/spyder/plugins/remoteclient/widgets/connectiondialog.py @@ -44,7 +44,7 @@ ) from spyder.utils.icon_manager import ima from spyder.utils.palette import SpyderPalette -from spyder.utils.stylesheet import AppStyle +from spyder.utils.stylesheet import AppStyle, WIN from spyder.widgets.config import SpyderConfigPage from spyder.widgets.helperwidgets import TipWidget from spyder.widgets.sidebardialog import SidebarDialog @@ -717,8 +717,8 @@ class ConnectionDialog(SidebarDialog): """ TITLE = _("Remote connections") - MIN_WIDTH = 850 - MIN_HEIGHT = 600 + MIN_WIDTH = 850 if WIN else 860 + MIN_HEIGHT = 600 if WIN else 650 PAGE_CLASSES = [NewConnectionPage] sig_start_server_requested = Signal(str) From c2b349008de6901a6e4eabe198af43065b203009 Mon Sep 17 00:00:00 2001 From: dalthviz <16781833+dalthviz@users.noreply.github.com> Date: Wed, 31 Jul 2024 18:48:07 -0500 Subject: [PATCH 4/6] Remote Client: Connection dialog size check on macOS --- spyder/plugins/remoteclient/widgets/connectiondialog.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spyder/plugins/remoteclient/widgets/connectiondialog.py b/spyder/plugins/remoteclient/widgets/connectiondialog.py index f9a4b63456b..661254c1019 100644 --- a/spyder/plugins/remoteclient/widgets/connectiondialog.py +++ b/spyder/plugins/remoteclient/widgets/connectiondialog.py @@ -44,7 +44,7 @@ ) from spyder.utils.icon_manager import ima from spyder.utils.palette import SpyderPalette -from spyder.utils.stylesheet import AppStyle, WIN +from spyder.utils.stylesheet import AppStyle, MAC, WIN from spyder.widgets.config import SpyderConfigPage from spyder.widgets.helperwidgets import TipWidget from spyder.widgets.sidebardialog import SidebarDialog @@ -717,8 +717,8 @@ class ConnectionDialog(SidebarDialog): """ TITLE = _("Remote connections") - MIN_WIDTH = 850 if WIN else 860 - MIN_HEIGHT = 600 if WIN else 650 + MIN_WIDTH = 900 if MAC else (850 if WIN else 860) + MIN_HEIGHT = 700 if MAC else (600 if WIN else 650) PAGE_CLASSES = [NewConnectionPage] sig_start_server_requested = Signal(str) From 72f8ce7185d328cde671018adc5dae68a9aa22b0 Mon Sep 17 00:00:00 2001 From: dalthviz <16781833+dalthviz@users.noreply.github.com> Date: Thu, 15 Aug 2024 17:29:11 -0500 Subject: [PATCH 5/6] Remote client: Size change on Windows --- spyder/plugins/remoteclient/widgets/connectiondialog.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/spyder/plugins/remoteclient/widgets/connectiondialog.py b/spyder/plugins/remoteclient/widgets/connectiondialog.py index 474f0f47bca..8e024e597eb 100644 --- a/spyder/plugins/remoteclient/widgets/connectiondialog.py +++ b/spyder/plugins/remoteclient/widgets/connectiondialog.py @@ -136,7 +136,6 @@ def set_text(self, reasons: ValidationReasons): class BaseConnectionPage(SpyderConfigPage, SpyderFontsMixin): """Base class to create connection pages.""" - MAX_WIDTH = 450 MIN_HEIGHT = 450 NEW_CONNECTION = False CONF_SECTION = "remoteclient" @@ -727,7 +726,7 @@ class ConnectionDialog(SidebarDialog): TITLE = _("Remote connections") MIN_WIDTH = 900 if MAC else (850 if WIN else 860) - MIN_HEIGHT = 700 if MAC else (600 if WIN else 650) + MIN_HEIGHT = 700 if MAC else (615 if WIN else 650) PAGE_CLASSES = [NewConnectionPage] sig_start_server_requested = Signal(str) From 76266573b8349a0aa69c589ff182212bad1cfa7f Mon Sep 17 00:00:00 2001 From: dalthviz <16781833+dalthviz@users.noreply.github.com> Date: Thu, 15 Aug 2024 19:31:27 -0500 Subject: [PATCH 6/6] Remote client: Further tweak dialog min height on Windows --- spyder/plugins/remoteclient/widgets/connectiondialog.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spyder/plugins/remoteclient/widgets/connectiondialog.py b/spyder/plugins/remoteclient/widgets/connectiondialog.py index 8e024e597eb..2e22bd4a65d 100644 --- a/spyder/plugins/remoteclient/widgets/connectiondialog.py +++ b/spyder/plugins/remoteclient/widgets/connectiondialog.py @@ -726,7 +726,7 @@ class ConnectionDialog(SidebarDialog): TITLE = _("Remote connections") MIN_WIDTH = 900 if MAC else (850 if WIN else 860) - MIN_HEIGHT = 700 if MAC else (615 if WIN else 650) + MIN_HEIGHT = 700 if MAC else (635 if WIN else 650) PAGE_CLASSES = [NewConnectionPage] sig_start_server_requested = Signal(str)