From dbe8df5a376f967921471cc8f5c6992a23ab40a6 Mon Sep 17 00:00:00 2001 From: grossmj Date: Tue, 19 Sep 2023 21:08:24 +0700 Subject: [PATCH 01/13] Development on 2.2.44.dev1 --- gns3/version.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gns3/version.py b/gns3/version.py index b8c19a66e..56fc56cd3 100644 --- a/gns3/version.py +++ b/gns3/version.py @@ -23,9 +23,9 @@ # or negative for a release candidate or beta (after the base version # number has been incremented) -__version__ = "2.2.43" +__version__ = "2.2.44.dev1" -__version_info__ = (2, 2, 43, 0) +__version_info__ = (2, 2, 44, 99) if "dev" in __version__: try: From 7222da9512088a7bb56da8231f7338e9d1278a76 Mon Sep 17 00:00:00 2001 From: grossmj Date: Sat, 23 Sep 2023 14:33:15 +1000 Subject: [PATCH 02/13] Install importlib-resources only with Python < '3.9'. Ref #2147 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 345b56fa7..3455f852e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,6 +4,6 @@ sentry-sdk==1.31.0,<1.32 psutil==5.9.5 distro>=1.8.0 truststore>=0.8.0; python_version >= '3.10' -importlib-resources>=1.3; python_version <= '3.9' +importlib-resources>=1.3; python_version < '3.9' setuptools>=60.8.1; python_version >= '3.7' setuptools==59.6.0; python_version < '3.7' # v59.6.0 is the last version to support Python 3.6 From 3413afe952ecfda3a0b6171d2021279d1faceeee Mon Sep 17 00:00:00 2001 From: grossmj Date: Sat, 23 Sep 2023 14:47:56 +1000 Subject: [PATCH 03/13] Revert "Install importlib-resources only with Python < '3.9'. Ref #2147" This reverts commit 7222da9512088a7bb56da8231f7338e9d1278a76. --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 3455f852e..345b56fa7 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,6 +4,6 @@ sentry-sdk==1.31.0,<1.32 psutil==5.9.5 distro>=1.8.0 truststore>=0.8.0; python_version >= '3.10' -importlib-resources>=1.3; python_version < '3.9' +importlib-resources>=1.3; python_version <= '3.9' setuptools>=60.8.1; python_version >= '3.7' setuptools==59.6.0; python_version < '3.7' # v59.6.0 is the last version to support Python 3.6 From 10afb5a8deb25b85c26c38d1f9639ba833dd0000 Mon Sep 17 00:00:00 2001 From: grossmj Date: Sat, 23 Sep 2023 20:50:39 +1000 Subject: [PATCH 04/13] Revert "Revert "Install importlib-resources only with Python < '3.9'. Ref #2147"" This reverts commit 3413afe952ecfda3a0b6171d2021279d1faceeee. --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 345b56fa7..3455f852e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,6 +4,6 @@ sentry-sdk==1.31.0,<1.32 psutil==5.9.5 distro>=1.8.0 truststore>=0.8.0; python_version >= '3.10' -importlib-resources>=1.3; python_version <= '3.9' +importlib-resources>=1.3; python_version < '3.9' setuptools>=60.8.1; python_version >= '3.7' setuptools==59.6.0; python_version < '3.7' # v59.6.0 is the last version to support Python 3.6 From 2dd9d61c578d6fc69fc266deecd2cc8d4821d6f5 Mon Sep 17 00:00:00 2001 From: Alex Scott Date: Wed, 27 Sep 2023 17:08:33 -0500 Subject: [PATCH 05/13] Add the ability to edit width and hight in the style edit dialog. --- gns3/dialogs/style_editor_dialog.py | 5 ++++ gns3/items/shape_item.py | 3 +++ gns3/ui/style_editor_dialog.ui | 40 +++++++++++++++++++++++++++++ gns3/ui/style_editor_dialog_ui.py | 30 ++++++++++++++++++++++ 4 files changed, 78 insertions(+) diff --git a/gns3/dialogs/style_editor_dialog.py b/gns3/dialogs/style_editor_dialog.py index 45a16c7b5..f24093cb4 100644 --- a/gns3/dialogs/style_editor_dialog.py +++ b/gns3/dialogs/style_editor_dialog.py @@ -80,6 +80,9 @@ def __init__(self, parent, items): self.uiCornerRadiusSpinBox.setValue(corner_radius) self.uiRotationSpinBox.setValue(int(first_item.rotation())) self.uiBorderWidthSpinBox.setValue(pen.width()) + rect=first_item.rect() + self.uiWidthSpinBox.setValue(int(rect.width())) + self.uiHeightSpinBox.setValue(int(rect.height())) index = self.uiBorderStyleComboBox.findData(pen.style()) if index != -1: self.uiBorderStyleComboBox.setCurrentIndex(index) @@ -134,6 +137,8 @@ def _applyPreferencesSlot(self): # maybe we support setting them separately in the future item.setHorizontalCornerRadius(corner_radius) item.setVerticalCornerRadius(corner_radius) + if isinstance(item, ShapeItem): + item.setWidthAndHeight(self.uiWidthSpinBox.value(), self.uiHeightSpinBox.value()) item.setRotation(self.uiRotationSpinBox.value()) def done(self, result): diff --git a/gns3/items/shape_item.py b/gns3/items/shape_item.py index a0f04873d..8aec16498 100644 --- a/gns3/items/shape_item.py +++ b/gns3/items/shape_item.py @@ -171,6 +171,9 @@ def hoverLeaveEvent(self, event): if not self.locked(): self._graphics_view.setCursor(QtCore.Qt.ArrowCursor) + def setWidthAndHeight(self, width, height): + self.setRect(0, 0, width, height) + def fromSvg(self, svg): """ Import element information from SVG diff --git a/gns3/ui/style_editor_dialog.ui b/gns3/ui/style_editor_dialog.ui index 7cacc2bf6..d25d9dd1c 100755 --- a/gns3/ui/style_editor_dialog.ui +++ b/gns3/ui/style_editor_dialog.ui @@ -131,6 +131,46 @@ editing (notes only) with ALT and '+' (or P) / ALT and '-' (or M) + + + + Width: + + + + + + + px + + + 10 + + + 1000 + + + + + + + Height: + + + + + + + px + + + 10 + + + 1000 + + + diff --git a/gns3/ui/style_editor_dialog_ui.py b/gns3/ui/style_editor_dialog_ui.py index 2c09265af..e40475b9e 100644 --- a/gns3/ui/style_editor_dialog_ui.py +++ b/gns3/ui/style_editor_dialog_ui.py @@ -64,6 +64,32 @@ def setupUi(self, StyleEditorDialog): self.uiRotationSpinBox.setMaximum(360) self.uiRotationSpinBox.setObjectName("uiRotationSpinBox") self.formLayout.setWidget(5, QtWidgets.QFormLayout.FieldRole, self.uiRotationSpinBox) + self.uiWidthLabel = QtWidgets.QLabel(self.uiStyleSettingsGroupBox) + self.uiWidthLabel.setObjectName("uiWidthLabel") + self.formLayout.setWidget(6, QtWidgets.QFormLayout.LabelRole, self.uiWidthLabel) + self.uiWidthSpinBox = QtWidgets.QSpinBox(self.uiStyleSettingsGroupBox) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.uiWidthSpinBox.sizePolicy().hasHeightForWidth()) + self.uiWidthSpinBox.setSizePolicy(sizePolicy) + self.uiWidthSpinBox.setMinimum(1) + self.uiWidthSpinBox.setMaximum(1000) + self.uiWidthSpinBox.setObjectName("uiWidthSpinBox") + self.formLayout.setWidget(6, QtWidgets.QFormLayout.FieldRole, self.uiWidthSpinBox) + self.uiHeightLabel = QtWidgets.QLabel(self.uiStyleSettingsGroupBox) + self.uiHeightLabel.setObjectName("uiHeightLabel") + self.formLayout.setWidget(7, QtWidgets.QFormLayout.LabelRole, self.uiHeightLabel) + self.uiHeightSpinBox = QtWidgets.QSpinBox(self.uiStyleSettingsGroupBox) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.uiHeightSpinBox.sizePolicy().hasHeightForWidth()) + self.uiHeightSpinBox.setSizePolicy(sizePolicy) + self.uiHeightSpinBox.setMinimum(1) + self.uiHeightSpinBox.setMaximum(1000) + self.uiHeightSpinBox.setObjectName("uiHeightSpinBox") + self.formLayout.setWidget(7, QtWidgets.QFormLayout.FieldRole, self.uiHeightSpinBox) self.uiCornerRadiusLabel = QtWidgets.QLabel(self.uiStyleSettingsGroupBox) self.uiCornerRadiusLabel.setObjectName("uiCornerRadiusLabel") self.formLayout.setWidget(4, QtWidgets.QFormLayout.LabelRole, self.uiCornerRadiusLabel) @@ -98,6 +124,10 @@ def retranslateUi(self, StyleEditorDialog): self.uiRotationSpinBox.setToolTip(_translate("StyleEditorDialog", "Rotation can be ajusted on the scene for a selected item while\n" "editing (notes only) with ALT and \'+\' (or P) / ALT and \'-\' (or M)")) self.uiRotationSpinBox.setSuffix(_translate("StyleEditorDialog", "°")) + self.uiWidthLabel.setText(_translate("StyleEditorDialog", "Width:")) + self.uiWidthSpinBox.setSuffix(_translate("StyleEditorDialog", "px")) + self.uiHeightLabel.setText(_translate("StyleEditorDialog", "Height:")) + self.uiHeightSpinBox.setSuffix(_translate("StyleEditorDialog", "px")) self.uiCornerRadiusLabel.setText(_translate("StyleEditorDialog", "Corner radius:")) self.uiCornerRadiusSpinBox.setSuffix(_translate("StyleEditorDialog", "°")) from . import resources_rc From 3e717999ca460b28183e95a90eee70787556882b Mon Sep 17 00:00:00 2001 From: grossmj Date: Mon, 9 Oct 2023 16:52:52 +1000 Subject: [PATCH 06/13] Add vendor_logo_url in appliance schemas. Ref https://github.com/GNS3/gns3-registry/pull/825 --- gns3/schemas/appliance.json | 5 +++++ gns3/schemas/appliance_v8.json | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/gns3/schemas/appliance.json b/gns3/schemas/appliance.json index 2a9005fc1..78b7c004a 100644 --- a/gns3/schemas/appliance.json +++ b/gns3/schemas/appliance.json @@ -71,6 +71,11 @@ "format": "uri", "title": "Website of the vendor" }, + "vendor_logo_url": { + "type": "string", + "format": "uri", + "title": "Link to the vendor logo (used by the GNS3 marketplace)" + }, "documentation_url": { "type": "string", "format": "uri", diff --git a/gns3/schemas/appliance_v8.json b/gns3/schemas/appliance_v8.json index 4fb0db7b6..e120c8313 100644 --- a/gns3/schemas/appliance_v8.json +++ b/gns3/schemas/appliance_v8.json @@ -592,6 +592,11 @@ "format": "uri", "title": "Website of the vendor" }, + "vendor_logo_url": { + "type": "string", + "format": "uri", + "title": "Link to the vendor logo (used by the GNS3 marketplace)" + }, "documentation_url": { "type": "string", "format": "uri", From c0b5f39c4c5b7911b3b558f0ec88b94fbf7ee353 Mon Sep 17 00:00:00 2001 From: grossmj Date: Mon, 9 Oct 2023 16:54:47 +1000 Subject: [PATCH 07/13] Add Python 3.12 support. Fixes https://github.com/GNS3/gns3-server/issues/2273 --- setup.py | 1 + 1 file changed, 1 insertion(+) diff --git a/setup.py b/setup.py index 82fe3b7a4..da8b2e99b 100644 --- a/setup.py +++ b/setup.py @@ -101,6 +101,7 @@ def run_tests(self): "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", "Programming Language :: Python :: Implementation :: CPython", ], ) From 18950ca64fcdd734efaa4c3812ff76be2b9137f3 Mon Sep 17 00:00:00 2001 From: grossmj Date: Wed, 18 Oct 2023 13:24:45 +1000 Subject: [PATCH 08/13] Upgrade to PyQt5 v5.15.10 --- mac-requirements.txt | 2 +- win-requirements.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mac-requirements.txt b/mac-requirements.txt index c0f718542..def2481a2 100644 --- a/mac-requirements.txt +++ b/mac-requirements.txt @@ -1,3 +1,3 @@ -rrequirements.txt -PyQt5==5.15.9 +PyQt5==5.15.10 diff --git a/win-requirements.txt b/win-requirements.txt index 4af4a9fc5..1caf5da9c 100644 --- a/win-requirements.txt +++ b/win-requirements.txt @@ -1,4 +1,4 @@ -rrequirements.txt -PyQt5==5.15.9 # pyup: ignore +PyQt5==5.15.10 # pyup: ignore pywin32==306 # pyup: ignore From 607e20167468f80978485634b601cfe16af3a793 Mon Sep 17 00:00:00 2001 From: grossmj Date: Wed, 18 Oct 2023 14:29:53 +1000 Subject: [PATCH 09/13] Fix packaging issue on macOS --- mac-requirements.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mac-requirements.txt b/mac-requirements.txt index def2481a2..5e6334e4b 100644 --- a/mac-requirements.txt +++ b/mac-requirements.txt @@ -1,3 +1,5 @@ -rrequirements.txt +PyQt5-Qt5==5.15.2 +PyQt5-sip==12.12.2 PyQt5==5.15.10 From f9d96051f57500286771fda1443f3d7143e27583 Mon Sep 17 00:00:00 2001 From: grossmj Date: Wed, 18 Oct 2023 14:33:27 +1000 Subject: [PATCH 10/13] Downgrade to PyQt5 v5.15.9 --- mac-requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mac-requirements.txt b/mac-requirements.txt index 5e6334e4b..fa6d90645 100644 --- a/mac-requirements.txt +++ b/mac-requirements.txt @@ -2,4 +2,4 @@ PyQt5-Qt5==5.15.2 PyQt5-sip==12.12.2 -PyQt5==5.15.10 +PyQt5==5.15.9 From 841c29e6f650743d9cbcaa72d1f2e657de3dab79 Mon Sep 17 00:00:00 2001 From: grossmj Date: Wed, 18 Oct 2023 14:53:25 +1000 Subject: [PATCH 11/13] Upgrade sentry and psutil dependencies --- requirements.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index 3455f852e..5f5f1e58a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,7 @@ jsonschema>=4.17.3,<4.18; python_version >= '3.7' # v4.17.3 is the last version to support Python 3.7 jsonschema==3.2.0; python_version < '3.7' # v3.2.0 is the last version to support Python 3.6 -sentry-sdk==1.31.0,<1.32 -psutil==5.9.5 +sentry-sdk==1.32.0,<1.33 +psutil==5.9.6 distro>=1.8.0 truststore>=0.8.0; python_version >= '3.10' importlib-resources>=1.3; python_version < '3.9' From ed88466d63b4889a2897c1d33dcfaaf1e66e8693 Mon Sep 17 00:00:00 2001 From: grossmj Date: Mon, 23 Oct 2023 16:17:31 +1000 Subject: [PATCH 12/13] Upgrade to actions/checkout@v3 and actions/setup-python@v3 --- .github/workflows/testing.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 156269fd9..27850fe26 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Build and run Docker image run: | docker build -t gns3-gui-test . From 3d89d6e6ccdcd05f31717a694f7a3e4121b1ee07 Mon Sep 17 00:00:00 2001 From: grossmj Date: Tue, 24 Oct 2023 18:01:49 +1000 Subject: [PATCH 13/13] Fix issue with line item --- gns3/dialogs/style_editor_dialog.py | 15 +++++++-- gns3/ui/style_editor_dialog.ui | 20 +++++------ gns3/ui/style_editor_dialog_ui.py | 52 ++++++++++++----------------- 3 files changed, 43 insertions(+), 44 deletions(-) diff --git a/gns3/dialogs/style_editor_dialog.py b/gns3/dialogs/style_editor_dialog.py index f24093cb4..43496691e 100644 --- a/gns3/dialogs/style_editor_dialog.py +++ b/gns3/dialogs/style_editor_dialog.py @@ -78,11 +78,20 @@ def __init__(self, parent, items): if not corner_radius: corner_radius = first_item.verticalCornerRadius() self.uiCornerRadiusSpinBox.setValue(corner_radius) + else: + self.uiCornerRadiusLabel.hide() + self.uiCornerRadiusSpinBox.hide() self.uiRotationSpinBox.setValue(int(first_item.rotation())) self.uiBorderWidthSpinBox.setValue(pen.width()) - rect=first_item.rect() - self.uiWidthSpinBox.setValue(int(rect.width())) - self.uiHeightSpinBox.setValue(int(rect.height())) + if isinstance(first_item, ShapeItem): + rect = first_item.rect() + self.uiWidthSpinBox.setValue(int(rect.width())) + self.uiHeightSpinBox.setValue(int(rect.height())) + else: + self.uiWidthSpinBox.hide() + self.uiWidthLabel.hide() + self.uiHeightSpinBox.hide() + self.uiHeightLabel.hide() index = self.uiBorderStyleComboBox.findData(pen.style()) if index != -1: self.uiBorderStyleComboBox.setCurrentIndex(index) diff --git a/gns3/ui/style_editor_dialog.ui b/gns3/ui/style_editor_dialog.ui index d25d9dd1c..c704002a7 100755 --- a/gns3/ui/style_editor_dialog.ui +++ b/gns3/ui/style_editor_dialog.ui @@ -6,8 +6,8 @@ 0 0 - 270 - 294 + 288 + 358 @@ -84,14 +84,14 @@ - + Rotation: - + @@ -114,14 +114,14 @@ editing (notes only) with ALT and '+' (or P) / ALT and '-' (or M) - + Corner radius: - + ° @@ -131,14 +131,14 @@ editing (notes only) with ALT and '+' (or P) / ALT and '-' (or M) - + Width: - + px @@ -151,14 +151,14 @@ editing (notes only) with ALT and '+' (or P) / ALT and '-' (or M) - + Height: - + px diff --git a/gns3/ui/style_editor_dialog_ui.py b/gns3/ui/style_editor_dialog_ui.py index e40475b9e..75966bae3 100644 --- a/gns3/ui/style_editor_dialog_ui.py +++ b/gns3/ui/style_editor_dialog_ui.py @@ -2,7 +2,7 @@ # Form implementation generated from reading ui file '/home/grossmj/PycharmProjects/gns3-gui/gns3/ui/style_editor_dialog.ui' # -# Created by: PyQt5 UI code generator 5.15.9 +# Created by: PyQt5 UI code generator 5.15.6 # # WARNING: Any manual changes made to this file will be lost when pyuic5 is # run again. Do not edit this file unless you know what you are doing. @@ -14,7 +14,7 @@ class Ui_StyleEditorDialog(object): def setupUi(self, StyleEditorDialog): StyleEditorDialog.setObjectName("StyleEditorDialog") - StyleEditorDialog.resize(270, 294) + StyleEditorDialog.resize(288, 358) StyleEditorDialog.setModal(True) self.verticalLayout = QtWidgets.QVBoxLayout(StyleEditorDialog) self.verticalLayout.setObjectName("verticalLayout") @@ -53,7 +53,7 @@ def setupUi(self, StyleEditorDialog): self.formLayout.setWidget(3, QtWidgets.QFormLayout.FieldRole, self.uiBorderStyleComboBox) self.uiRotationLabel = QtWidgets.QLabel(self.uiStyleSettingsGroupBox) self.uiRotationLabel.setObjectName("uiRotationLabel") - self.formLayout.setWidget(5, QtWidgets.QFormLayout.LabelRole, self.uiRotationLabel) + self.formLayout.setWidget(7, QtWidgets.QFormLayout.LabelRole, self.uiRotationLabel) self.uiRotationSpinBox = QtWidgets.QSpinBox(self.uiStyleSettingsGroupBox) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) @@ -63,40 +63,30 @@ def setupUi(self, StyleEditorDialog): self.uiRotationSpinBox.setMinimum(-360) self.uiRotationSpinBox.setMaximum(360) self.uiRotationSpinBox.setObjectName("uiRotationSpinBox") - self.formLayout.setWidget(5, QtWidgets.QFormLayout.FieldRole, self.uiRotationSpinBox) + self.formLayout.setWidget(7, QtWidgets.QFormLayout.FieldRole, self.uiRotationSpinBox) + self.uiCornerRadiusLabel = QtWidgets.QLabel(self.uiStyleSettingsGroupBox) + self.uiCornerRadiusLabel.setObjectName("uiCornerRadiusLabel") + self.formLayout.setWidget(6, QtWidgets.QFormLayout.LabelRole, self.uiCornerRadiusLabel) + self.uiCornerRadiusSpinBox = QtWidgets.QSpinBox(self.uiStyleSettingsGroupBox) + self.uiCornerRadiusSpinBox.setMaximum(100) + self.uiCornerRadiusSpinBox.setObjectName("uiCornerRadiusSpinBox") + self.formLayout.setWidget(6, QtWidgets.QFormLayout.FieldRole, self.uiCornerRadiusSpinBox) self.uiWidthLabel = QtWidgets.QLabel(self.uiStyleSettingsGroupBox) self.uiWidthLabel.setObjectName("uiWidthLabel") - self.formLayout.setWidget(6, QtWidgets.QFormLayout.LabelRole, self.uiWidthLabel) + self.formLayout.setWidget(4, QtWidgets.QFormLayout.LabelRole, self.uiWidthLabel) self.uiWidthSpinBox = QtWidgets.QSpinBox(self.uiStyleSettingsGroupBox) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Fixed) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.uiWidthSpinBox.sizePolicy().hasHeightForWidth()) - self.uiWidthSpinBox.setSizePolicy(sizePolicy) - self.uiWidthSpinBox.setMinimum(1) + self.uiWidthSpinBox.setMinimum(10) self.uiWidthSpinBox.setMaximum(1000) self.uiWidthSpinBox.setObjectName("uiWidthSpinBox") - self.formLayout.setWidget(6, QtWidgets.QFormLayout.FieldRole, self.uiWidthSpinBox) + self.formLayout.setWidget(4, QtWidgets.QFormLayout.FieldRole, self.uiWidthSpinBox) self.uiHeightLabel = QtWidgets.QLabel(self.uiStyleSettingsGroupBox) self.uiHeightLabel.setObjectName("uiHeightLabel") - self.formLayout.setWidget(7, QtWidgets.QFormLayout.LabelRole, self.uiHeightLabel) + self.formLayout.setWidget(5, QtWidgets.QFormLayout.LabelRole, self.uiHeightLabel) self.uiHeightSpinBox = QtWidgets.QSpinBox(self.uiStyleSettingsGroupBox) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Fixed) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.uiHeightSpinBox.sizePolicy().hasHeightForWidth()) - self.uiHeightSpinBox.setSizePolicy(sizePolicy) - self.uiHeightSpinBox.setMinimum(1) + self.uiHeightSpinBox.setMinimum(10) self.uiHeightSpinBox.setMaximum(1000) self.uiHeightSpinBox.setObjectName("uiHeightSpinBox") - self.formLayout.setWidget(7, QtWidgets.QFormLayout.FieldRole, self.uiHeightSpinBox) - self.uiCornerRadiusLabel = QtWidgets.QLabel(self.uiStyleSettingsGroupBox) - self.uiCornerRadiusLabel.setObjectName("uiCornerRadiusLabel") - self.formLayout.setWidget(4, QtWidgets.QFormLayout.LabelRole, self.uiCornerRadiusLabel) - self.uiCornerRadiusSpinBox = QtWidgets.QSpinBox(self.uiStyleSettingsGroupBox) - self.uiCornerRadiusSpinBox.setMaximum(100) - self.uiCornerRadiusSpinBox.setObjectName("uiCornerRadiusSpinBox") - self.formLayout.setWidget(4, QtWidgets.QFormLayout.FieldRole, self.uiCornerRadiusSpinBox) + self.formLayout.setWidget(5, QtWidgets.QFormLayout.FieldRole, self.uiHeightSpinBox) self.verticalLayout.addWidget(self.uiStyleSettingsGroupBox) self.uiButtonBox = QtWidgets.QDialogButtonBox(StyleEditorDialog) self.uiButtonBox.setOrientation(QtCore.Qt.Horizontal) @@ -124,10 +114,10 @@ def retranslateUi(self, StyleEditorDialog): self.uiRotationSpinBox.setToolTip(_translate("StyleEditorDialog", "Rotation can be ajusted on the scene for a selected item while\n" "editing (notes only) with ALT and \'+\' (or P) / ALT and \'-\' (or M)")) self.uiRotationSpinBox.setSuffix(_translate("StyleEditorDialog", "°")) - self.uiWidthLabel.setText(_translate("StyleEditorDialog", "Width:")) - self.uiWidthSpinBox.setSuffix(_translate("StyleEditorDialog", "px")) - self.uiHeightLabel.setText(_translate("StyleEditorDialog", "Height:")) - self.uiHeightSpinBox.setSuffix(_translate("StyleEditorDialog", "px")) self.uiCornerRadiusLabel.setText(_translate("StyleEditorDialog", "Corner radius:")) self.uiCornerRadiusSpinBox.setSuffix(_translate("StyleEditorDialog", "°")) + self.uiWidthLabel.setText(_translate("StyleEditorDialog", "Width:")) + self.uiWidthSpinBox.setSuffix(_translate("StyleEditorDialog", " px")) + self.uiHeightLabel.setText(_translate("StyleEditorDialog", "Height:")) + self.uiHeightSpinBox.setSuffix(_translate("StyleEditorDialog", " px")) from . import resources_rc