Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PR: Update connections dialog size constants, title and icon (Remote Client) #22303

Merged
merged 8 commits into from
Aug 16, 2024
12 changes: 6 additions & 6 deletions spyder/plugins/remoteclient/widgets/connectiondialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,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, MAC, WIN
from spyder.widgets.config import SpyderConfigPage
from spyder.widgets.helperwidgets import TipWidget
from spyder.widgets.sidebardialog import SidebarDialog
Expand Down Expand Up @@ -136,6 +136,7 @@ def set_text(self, reasons: ValidationReasons):
class BaseConnectionPage(SpyderConfigPage, SpyderFontsMixin):
"""Base class to create connection pages."""

MIN_HEIGHT = 450
NEW_CONNECTION = False
CONF_SECTION = "remoteclient"

Expand Down Expand Up @@ -566,7 +567,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

Expand Down Expand Up @@ -617,8 +617,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
Expand Down Expand Up @@ -726,8 +724,9 @@ class ConnectionDialog(SidebarDialog):
machines.
"""

MIN_WIDTH = 620
MIN_HEIGHT = 640
TITLE = _("Remote connections")
MIN_WIDTH = 900 if MAC else (850 if WIN else 860)
MIN_HEIGHT = 700 if MAC else (635 if WIN else 650)
PAGE_CLASSES = [NewConnectionPage]

sig_start_server_requested = Signal(str)
Expand All @@ -736,6 +735,7 @@ class ConnectionDialog(SidebarDialog):
sig_connections_changed = Signal()

def __init__(self, parent=None):
self.ICON = ima.icon('remote_server')
super().__init__(parent)
self._container = parent

Expand Down