diff --git a/.github/scripts/modules_test.sh b/.github/scripts/modules_test.sh index 7f2aa98e1c6..d5697828b08 100755 --- a/.github/scripts/modules_test.sh +++ b/.github/scripts/modules_test.sh @@ -118,6 +118,9 @@ for f in spyder/*/*/*/*.py; do if [[ $f == spyder/plugins/findinfiles/widgets/main_widget.py ]]; then continue fi + if [[ $f == spyder/plugins/application/widgets/__init__.py ]]; then + continue + fi python "$f" if [ $? -ne 0 ]; then exit 1 diff --git a/spyder/plugins/application/widgets/about.py b/spyder/plugins/application/widgets/about.py index 7604a99706e..3cb15da7e20 100644 --- a/spyder/plugins/application/widgets/about.py +++ b/spyder/plugins/application/widgets/about.py @@ -30,13 +30,15 @@ from spyder.utils.stylesheet import ( AppStyle, DialogStyle, - PREFERENCES_TABBAR_STYLESHEET + MAC, + PREFERENCES_TABBAR_STYLESHEET, + WIN ) class AboutDialog(QDialog, SvgToScaledPixmap): - MARGIN = 15 + PADDING = 5 if MAC else 15 def __init__(self, parent): """Create About Spyder dialog with general information.""" @@ -109,13 +111,11 @@ def __init__(self, parent): font-weight: normal; '>
-

Created by Pierre Raybaut; current maintainer is Carlos Cordoba. Developed by the international Spyder community. Many thanks to all the Spyder beta testers and dedicated users. -

For help with Spyder errors and crashes, please read our Troubleshooting Guide, and for bug reports and feature requests, visit our @@ -140,12 +140,10 @@ def __init__(self, parent): font-weight: normal; '>
-

Copyright © 2009-2020 Spyder Project Contributors and others. Distributed under the terms of the MIT License. -

Certain source files under other compatible permissive licenses and/or originally by other authors. @@ -161,7 +159,7 @@ def __init__(self, parent): unsplash&utm_medium=referral&utm_content=creditCopyText">Bench Accounting on Unsplash - + .

See the @@ -177,7 +175,12 @@ def __init__(self, parent): label.setAlignment(Qt.AlignTop) label.setOpenExternalLinks(True) label.setTextInteractionFlags(Qt.TextBrowserInteraction) - label.setContentsMargins(self.MARGIN, 0, self.MARGIN, 0) + label.setContentsMargins( + (3 if MAC else 1) * self.PADDING, + 0, + (3 if MAC else 1) * self.PADDING, + (3 if MAC else 1) * self.PADDING, + ) self.label_pic = QLabel(self) self.label_pic.setPixmap( @@ -224,6 +227,7 @@ def __init__(self, parent): self.tabs.addTab(scroll_overview, _('Overview')) self.tabs.addTab(scroll_community, _('Community')) self.tabs.addTab(scroll_legal, _('Legal')) + self.tabs.setElideMode(Qt.ElideNone) self.tabs.setStyleSheet(self._tabs_stylesheet) # -- Buttons @@ -247,23 +251,23 @@ def __init__(self, parent): piclayout.addStretch() piclayout.setContentsMargins( # This makes the left and right margins around the image and info - # to be the same. - self.MARGIN - AppStyle.MarginSize, + # to be the same on Linux and Windows. + self.PADDING - (0 if MAC else 1) * AppStyle.MarginSize, 0, - self.MARGIN, + self.PADDING, 0 ) tabslayout = QHBoxLayout() tabslayout.addWidget(self.tabs) tabslayout.setSizeConstraint(tabslayout.SetFixedSize) - tabslayout.setContentsMargins(0, self.MARGIN, 0, 0) + tabslayout.setContentsMargins(0, self.PADDING, 0, 0) btmhlayout = QHBoxLayout() btmhlayout.addStretch(1) btmhlayout.addWidget(info_btn) btmhlayout.addWidget(ok_btn) - btmhlayout.setContentsMargins(0, 0, self.MARGIN, self.MARGIN) + btmhlayout.setContentsMargins(0, 0, self.PADDING, self.PADDING) btmhlayout.addStretch() vlayout = QVBoxLayout() @@ -275,7 +279,7 @@ def __init__(self, parent): mainlayout.addLayout(piclayout) # This compensates the margin set for scroll areas to center them on # the tabbar - mainlayout.addSpacing(-self.MARGIN) + mainlayout.addSpacing(-self.PADDING) mainlayout.addLayout(vlayout) # -- Signals @@ -283,6 +287,8 @@ def __init__(self, parent): ok_btn.accepted.connect(self.accept) # -- Style + size = (600, 460) if MAC else ((580, 450) if WIN else (610, 470)) + self.setFixedSize(*size) self.setStyleSheet(self._main_stylesheet) def copy_to_clipboard(self): @@ -316,7 +322,7 @@ def _scrollarea_stylesheet(self): # background. border=f"1px solid {DialogStyle.BorderColor}", # This is necessary to center the tabbar on the scroll area - marginLeft=f"{self.MARGIN}px" + marginLeft=f"{self.PADDING}px" ) css.QScrollBar.setValues( @@ -350,10 +356,10 @@ def _tabs_stylesheet(self): css['QTabWidget::pane'].setValues( # Set tab pane margins according to the dialog contents and layout - margin=( - f'{2 * AppStyle.MarginSize}px {self.MARGIN}px ' - f'{2 * AppStyle.MarginSize}px 0px' - ), + marginTop=f"{(3 if MAC else 2) * AppStyle.MarginSize}px", + marginRight=f"{self.PADDING}px", + marginBottom=f"{(0 if MAC else 2) * AppStyle.MarginSize}px", + marginLeft="0px", # Padding is not necessary in this case because we set a border for # the scroll areas. padding="0px",