From 6b28de247e1dd5c8f37cfdfa0e5558c9c28d8136 Mon Sep 17 00:00:00 2001 From: 283375 Date: Sun, 15 Oct 2023 03:14:22 +0800 Subject: [PATCH] impr: minor improvements --- ui/designer/components/chartSelector.ui | 8 +------- ui/designer/components/chartSelector_ui.py | 17 ++++++----------- ui/designer/components/songIdSelector.ui | 15 +-------------- ui/designer/components/songIdSelector_ui.py | 9 ++------- 4 files changed, 10 insertions(+), 39 deletions(-) diff --git a/ui/designer/components/chartSelector.ui b/ui/designer/components/chartSelector.ui index 6ec23a1..504490d 100644 --- a/ui/designer/components/chartSelector.ui +++ b/ui/designer/components/chartSelector.ui @@ -7,7 +7,7 @@ 0 0 476 - 347 + 93 @@ -16,12 +16,6 @@ - - - 0 - 0 - - songIdSelector.title diff --git a/ui/designer/components/chartSelector_ui.py b/ui/designer/components/chartSelector_ui.py index d3e8cdb..9f3e5cf 100644 --- a/ui/designer/components/chartSelector_ui.py +++ b/ui/designer/components/chartSelector_ui.py @@ -25,17 +25,12 @@ class Ui_ChartSelector(object): def setupUi(self, ChartSelector): if not ChartSelector.objectName(): ChartSelector.setObjectName(u"ChartSelector") - ChartSelector.resize(476, 347) + ChartSelector.resize(476, 93) ChartSelector.setWindowTitle(u"ChartSelector") self.mainVerticalLayout = QVBoxLayout(ChartSelector) self.mainVerticalLayout.setObjectName(u"mainVerticalLayout") self.songIdSelectorGroupBox = QGroupBox(ChartSelector) self.songIdSelectorGroupBox.setObjectName(u"songIdSelectorGroupBox") - sizePolicy = QSizePolicy(QSizePolicy.Preferred, QSizePolicy.Expanding) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.songIdSelectorGroupBox.sizePolicy().hasHeightForWidth()) - self.songIdSelectorGroupBox.setSizePolicy(sizePolicy) self.verticalLayout_3 = QVBoxLayout(self.songIdSelectorGroupBox) self.verticalLayout_3.setObjectName(u"verticalLayout_3") self.verticalLayout_3.setContentsMargins(0, 0, 0, 0) @@ -56,11 +51,11 @@ class Ui_ChartSelector(object): self.resultsHorizontalLayout.setObjectName(u"resultsHorizontalLayout") self.resultLabel = QLabel(ChartSelector) self.resultLabel.setObjectName(u"resultLabel") - sizePolicy1 = QSizePolicy(QSizePolicy.Expanding, QSizePolicy.Preferred) - sizePolicy1.setHorizontalStretch(0) - sizePolicy1.setVerticalStretch(0) - sizePolicy1.setHeightForWidth(self.resultLabel.sizePolicy().hasHeightForWidth()) - self.resultLabel.setSizePolicy(sizePolicy1) + sizePolicy = QSizePolicy(QSizePolicy.Expanding, QSizePolicy.Preferred) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.resultLabel.sizePolicy().hasHeightForWidth()) + self.resultLabel.setSizePolicy(sizePolicy) self.resultLabel.setText(u"...") self.resultLabel.setTextFormat(Qt.RichText) diff --git a/ui/designer/components/songIdSelector.ui b/ui/designer/components/songIdSelector.ui index 5da4cef..e2ccf4e 100644 --- a/ui/designer/components/songIdSelector.ui +++ b/ui/designer/components/songIdSelector.ui @@ -7,7 +7,7 @@ 0 0 350 - 250 + 102 @@ -27,19 +27,6 @@ - - - - Qt::Vertical - - - - 20 - 40 - - - - diff --git a/ui/designer/components/songIdSelector_ui.py b/ui/designer/components/songIdSelector_ui.py index a016193..6575b54 100644 --- a/ui/designer/components/songIdSelector_ui.py +++ b/ui/designer/components/songIdSelector_ui.py @@ -16,14 +16,13 @@ from PySide6.QtGui import (QBrush, QColor, QConicalGradient, QCursor, QImage, QKeySequence, QLinearGradient, QPainter, QPalette, QPixmap, QRadialGradient, QTransform) from PySide6.QtWidgets import (QApplication, QComboBox, QHBoxLayout, QLineEdit, - QPushButton, QSizePolicy, QSpacerItem, QVBoxLayout, - QWidget) + QPushButton, QSizePolicy, QVBoxLayout, QWidget) class Ui_SongIdSelector(object): def setupUi(self, SongIdSelector): if not SongIdSelector.objectName(): SongIdSelector.setObjectName(u"SongIdSelector") - SongIdSelector.resize(350, 250) + SongIdSelector.resize(350, 102) SongIdSelector.setWindowTitle(u"SongIdSelector") self.verticalLayout_2 = QVBoxLayout(SongIdSelector) self.verticalLayout_2.setObjectName(u"verticalLayout_2") @@ -34,10 +33,6 @@ class Ui_SongIdSelector(object): self.verticalLayout_2.addWidget(self.searchLineEdit) - self.verticalSpacer = QSpacerItem(20, 40, QSizePolicy.Minimum, QSizePolicy.Expanding) - - self.verticalLayout_2.addItem(self.verticalSpacer) - self.horizontalLayout_2 = QHBoxLayout() self.horizontalLayout_2.setObjectName(u"horizontalLayout_2") self.previousPackageButton = QPushButton(SongIdSelector)