[qcookboob] cosmetic fixes
This commit is contained in:
parent
c56f8b2eb4
commit
763164d880
2 changed files with 42 additions and 9 deletions
|
|
@ -37,7 +37,10 @@ class MiniRecipe(QFrame):
|
|||
self.backend = backend
|
||||
self.recipe = recipe
|
||||
self.ui.titleLabel.setText(recipe.title)
|
||||
self.ui.shortDescLabel.setText(recipe.short_description)
|
||||
if len(recipe.short_description) > 300:
|
||||
self.ui.shortDescLabel.setText('%s [...]'%recipe.short_description[:300])
|
||||
else:
|
||||
self.ui.shortDescLabel.setText(recipe.short_description)
|
||||
self.ui.backendLabel.setText(backend.name)
|
||||
|
||||
self.gotThumbnail()
|
||||
|
|
@ -46,7 +49,7 @@ class MiniRecipe(QFrame):
|
|||
if not empty(self.recipe.thumbnail_url):
|
||||
data = urllib.urlopen(self.recipe.thumbnail_url).read()
|
||||
img = QImage.fromData(data)
|
||||
self.ui.imageLabel.setPixmap(QPixmap.fromImage(img))
|
||||
self.ui.imageLabel.setPixmap(QPixmap.fromImage(img).scaledToHeight(100))
|
||||
|
||||
def enterEvent(self, event):
|
||||
self.setFrameShadow(self.Sunken)
|
||||
|
|
|
|||
|
|
@ -18,8 +18,8 @@
|
|||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>2000</width>
|
||||
<height>600</height>
|
||||
<width>8000</width>
|
||||
<height>5000</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
|
|
@ -62,7 +62,7 @@
|
|||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>600</height>
|
||||
<height>4000</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
|
|
@ -243,10 +243,16 @@
|
|||
</item>
|
||||
<item>
|
||||
<widget class="QFrame" name="frame_5">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>200</height>
|
||||
<height>1000</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
|
|
@ -265,6 +271,12 @@
|
|||
</item>
|
||||
<item>
|
||||
<widget class="QTextEdit" name="ingredientsPlain">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>200</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="textInteractionFlags">
|
||||
<set>Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
|
||||
</property>
|
||||
|
|
@ -276,7 +288,7 @@
|
|||
<item>
|
||||
<widget class="QFrame" name="frame_8">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
|
|
@ -284,7 +296,7 @@
|
|||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>200</height>
|
||||
<height>1000</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
|
|
@ -309,6 +321,12 @@
|
|||
</item>
|
||||
<item>
|
||||
<widget class="QPlainTextEdit" name="instructionsPlain">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>200</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="textInteractionFlags">
|
||||
<set>Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
|
||||
</property>
|
||||
|
|
@ -319,10 +337,16 @@
|
|||
</item>
|
||||
<item>
|
||||
<widget class="QFrame" name="frame_13">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>200</height>
|
||||
<height>1000</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
|
|
@ -341,6 +365,12 @@
|
|||
</item>
|
||||
<item>
|
||||
<widget class="QTextEdit" name="commentsPlain">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>100</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="textInteractionFlags">
|
||||
<set>Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
|
||||
</property>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue