Skip to content

Commit

Permalink
1
Browse files Browse the repository at this point in the history
  • Loading branch information
xuh5 committed Dec 4, 2023
1 parent 78bafe8 commit bf246f5
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 33 deletions.
1 change: 1 addition & 0 deletions comment_rc.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,4 +118,5 @@ def retranslateUi(self, likepage,data):
self.label_27.setText(_translate("likepage", str(data[0])))
self.label_20.setPixmap(QtGui.QPixmap(data[3]))
self.label_28.setText(_translate("likepage", str(data[2])))

import resource_rc
54 changes: 33 additions & 21 deletions movie_info.ui
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>468</width>
<height>498</height>
<width>667</width>
<height>522</height>
</rect>
</property>
<property name="windowTitle">
Expand Down Expand Up @@ -53,13 +53,6 @@
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="name">
<property name="text">
<string>name</string>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QWidget" name="collect_widget" native="true">
<layout class="QHBoxLayout" name="horizontalLayout_3">
Expand All @@ -80,27 +73,46 @@
</spacer>
</item>
<item>
<widget class="QLabel" name="collect_icon">
<property name="maximumSize">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
<widget class="QPushButton" name="pushButton">
<property name="text">
<string/>
</property>
<property name="pixmap">
<pixmap resource="resource.qrc">:/icons/icons/favor.png</pixmap>
</property>
<property name="scaledContents">
<bool>true</bool>
<property name="icon">
<iconset resource="resource.qrc">
<normaloff>:/icons/icons/favor.png</normaloff>:/icons/icons/favor.png</iconset>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="0" column="0">
<widget class="QPushButton" name="name_pushbutton">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="layoutDirection">
<enum>Qt::RightToLeft</enum>
</property>
<property name="styleSheet">
<string notr="true">
#name_pushbutton{
text-align: left;
border:nones;
padding-left: 20px;
}</string>
</property>
<property name="text">
<string>name</string>
</property>
<property name="autoDefault">
<bool>false</bool>
</property>
</widget>
</item>
</layout>
</item>
</layout>
Expand Down
37 changes: 25 additions & 12 deletions movie_info_rc.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
class Ui_For(object):
def setupUi(self, For):
For.setObjectName("For")
For.resize(468, 498)
For.resize(667, 522)
self.movie_widget = QtWidgets.QWidget(For)
self.movie_widget.setGeometry(QtCore.QRect(50, 80, 381, 271))
self.movie_widget.setObjectName("movie_widget")
Expand All @@ -35,23 +35,36 @@ def setupUi(self, For):
self.genre = QtWidgets.QLabel(self.movie_widget)
self.genre.setObjectName("genre")
self.movie_gridLayout.addWidget(self.genre, 0, 1, 1, 1)
self.name = QtWidgets.QLabel(self.movie_widget)
self.name.setObjectName("name")
self.movie_gridLayout.addWidget(self.name, 0, 0, 1, 1)
self.collect_widget = QtWidgets.QWidget(self.movie_widget)
self.collect_widget.setObjectName("collect_widget")
self.horizontalLayout_3 = QtWidgets.QHBoxLayout(self.collect_widget)
self.horizontalLayout_3.setObjectName("horizontalLayout_3")
spacerItem = QtWidgets.QSpacerItem(115, 20, QtWidgets.QSizePolicy.Ignored, QtWidgets.QSizePolicy.Minimum)
self.horizontalLayout_3.addItem(spacerItem)
self.collect_icon = QtWidgets.QLabel(self.collect_widget)
self.collect_icon.setMaximumSize(QtCore.QSize(20, 20))
self.collect_icon.setText("")
self.collect_icon.setPixmap(QtGui.QPixmap(":/icons/icons/favor.png"))
self.collect_icon.setScaledContents(True)
self.collect_icon.setObjectName("collect_icon")
self.horizontalLayout_3.addWidget(self.collect_icon)
self.pushButton = QtWidgets.QPushButton(self.collect_widget)
self.pushButton.setText("")
icon = QtGui.QIcon()
icon.addPixmap(QtGui.QPixmap(":/icons/icons/favor.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.pushButton.setIcon(icon)
self.pushButton.setObjectName("pushButton")
self.horizontalLayout_3.addWidget(self.pushButton)
self.movie_gridLayout.addWidget(self.collect_widget, 1, 2, 1, 1)
self.name_pushbutton = QtWidgets.QPushButton(self.movie_widget)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.name_pushbutton.sizePolicy().hasHeightForWidth())
self.name_pushbutton.setSizePolicy(sizePolicy)
self.name_pushbutton.setLayoutDirection(QtCore.Qt.RightToLeft)
self.name_pushbutton.setStyleSheet("\n"
"#name_pushbutton{\n"
"text-align: left;\n"
"border:nones;\n"
"padding-left: 20px; \n"
"}")
self.name_pushbutton.setAutoDefault(False)
self.name_pushbutton.setObjectName("name_pushbutton")
self.movie_gridLayout.addWidget(self.name_pushbutton, 0, 0, 1, 1)
self.verticalLayout_10.addLayout(self.movie_gridLayout)

self.retranslateUi(For)
Expand All @@ -64,5 +77,5 @@ def retranslateUi(self, For):
self.review_num.setText(_translate("For", "review_num"))
self.rate.setText(_translate("For", "rate"))
self.genre.setText(_translate("For", "genre"))
self.name.setText(_translate("For", "name"))
self.name_pushbutton.setText(_translate("For", "name"))
import resource_rc

0 comments on commit bf246f5

Please sign in to comment.