Align External Core editor spacing

Signed-off-by: Loren Eteval <loren.eteval@proton.me>
This commit is contained in:
Loren Eteval
2026-08-25 15:51:11 +08:00
parent 4bc5923960
commit f37d1501ac
2 changed files with 23 additions and 1 deletions
-1
View File
@@ -418,7 +418,6 @@ class ExternalCoreConfigurationGroup(GuiEditorWidgetQGroupBox):
def setupPageLayout(self):
"""Keep process fields independent from runtime-network label widths."""
layout = QVBoxLayout()
layout.setContentsMargins(0, 0, 0, 0)
layout.setSpacing(18)
layout.addLayout(self._formLayout(self._processContainers))
layout.addLayout(self._formLayout(self._runtimeContainers))
+23
View File
@@ -1036,6 +1036,29 @@ class EditorMappingTest(unittest.TestCase):
editor.close()
def testExternalCoreSectionUsesCanonicalEditorInset(self):
"""Let the section page own the same outer inset as Xray editors."""
editor = ExternalCoreEditor()
externalGroup = editor.groupBoxSequence()[0]
externalLayout = externalGroup._widget.currentWidget().layout()
referenceGroup = GuiVLESSGroupBoxBasic()
referenceLayout = referenceGroup._widget.currentWidget().layout()
self.assertEqual(
externalLayout.contentsMargins(),
referenceLayout.contentsMargins(),
)
self.assertFalse(externalLayout.contentsMargins().isNull())
for index in range(externalLayout.count()):
childLayout = externalLayout.itemAt(index).layout()
self.assertIsNotNone(childLayout)
self.assertTrue(childLayout.contentsMargins().isNull())
editor.close()
referenceGroup.deleteLater()
def testEveryProtocolEditorRetranslatesItsDedicatedWindowTitle(self):
"""Retain title source text when switching from Chinese to English."""
editorTypes = (