Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
stuarta committed Jan 23, 2012
2 parents ae9a165 + c2d35ef commit ee0a85c
Show file tree
Hide file tree
Showing 3 changed files with 136 additions and 143 deletions.
68 changes: 34 additions & 34 deletions mythplugins/mythgallery/mythgallery/glsingleview.cpp
Expand Up @@ -201,44 +201,44 @@ void GLSingleView::resizeGL(int w, int h)

void GLSingleView::paintGL(void)
{
if (m_movieState > 0)
if (1 == m_movieState)
{
if (m_movieState == 1)
{
m_movieState = 2;
ThumbItem* item = m_itemList.at(m_pos);
m_movieState = 2;

ThumbItem *item = m_itemList.at(m_pos);

if (item)
GalleryUtil::PlayVideo(item->GetPath());

if (!m_slideshow_running)
{
if (item)
{
QImage image;
GetScreenShot(image, item);
if (image.isNull())
return;

image = image.scaled(800, 600);

// overlay "Press SELECT to play again" text
QPainter p(&image);
QRect rect = QRect(20, image.height() - 100, image.width() - 40, 80);
p.fillRect(rect, QBrush(QColor(0,0,0,100)));
p.setFont(QFont("Arial", 25, QFont::Bold));
p.setPen(QColor(255,255,255));
p.drawText(rect, Qt::AlignCenter, tr("Press SELECT to play again"));
p.end();

m_texSize = QSize(GetNearestGLTextureSize(image.size().width()),
GetNearestGLTextureSize(image.size().height()));
int a = m_tex1First ? 0 : 1;
m_texItem[a].SetItem(item, image.size());
m_texItem[a].ScaleTo(m_screenSize, m_scaleMax);
m_texItem[a].Init(convertToGLFormat(
image.scaled(m_texSize, Qt::IgnoreAspectRatio, Qt::SmoothTransformation)));
}
}
if (!m_slideshow_running && item)
{
QImage image;
GetScreenShot(image, item);
if (image.isNull())
return;

image = image.scaled(800, 600);

// overlay "Press SELECT to play again" text
QPainter p(&image);
QRect rect = QRect(20, image.height() - 100,
image.width() - 40, 80);
p.fillRect(rect, QBrush(QColor(0,0,0,100)));
p.setFont(QFont("Arial", 25, QFont::Bold));
p.setPen(QColor(255,255,255));
p.drawText(rect, Qt::AlignCenter, tr("Press SELECT to play again"));
p.end();

m_texSize = QSize(
GetNearestGLTextureSize(image.size().width()),
GetNearestGLTextureSize(image.size().height()));
int a = m_tex1First ? 0 : 1;
m_texItem[a].SetItem(item, image.size());
m_texItem[a].ScaleTo(m_screenSize, m_scaleMax);
m_texItem[a].Init(convertToGLFormat(
image.scaled(m_texSize,
Qt::IgnoreAspectRatio,
Qt::SmoothTransformation)));
}
}

Expand Down
55 changes: 26 additions & 29 deletions mythplugins/mythgallery/mythgallery/singleview.cpp
Expand Up @@ -176,39 +176,36 @@ SingleView::~SingleView()

void SingleView::paintEvent(QPaintEvent *)
{
if (m_movieState > 0)
if (1 == m_movieState)
{
if (m_movieState == 1)
{
m_movieState = 2;
ThumbItem *item = m_itemList.at(m_pos);
m_movieState = 2;

GalleryUtil::PlayVideo(item->GetPath());
ThumbItem *item = m_itemList.at(m_pos);

if (!m_slideshow_running)
{
if (item)
{
QImage image;
GetScreenShot(image, item);
if (image.isNull())
return;

image = image.scaled(800, 600);

// overlay "Press SELECT to play again" text
QPainter p(&image);
QRect rect = QRect(20, image.height() - 100, image.width() - 40, 80);
p.fillRect(rect, QBrush(QColor(0,0,0,100)));
p.setFont(QFont("Arial", 25, QFont::Bold));
p.setPen(QColor(255,255,255));
p.drawText(rect, Qt::AlignCenter, tr("Press SELECT to play again"));
p.end();
if (item)
GalleryUtil::PlayVideo(item->GetPath());

m_image = image;
SetZoom(1.0);
}
}
if (!m_slideshow_running && item)
{
QImage image;
GetScreenShot(image, item);
if (image.isNull())
return;

image = image.scaled(800, 600);

// overlay "Press SELECT to play again" text
QPainter p(&image);
QRect rect = QRect(20, image.height() - 100,
image.width() - 40, 80);
p.fillRect(rect, QBrush(QColor(0,0,0,100)));
p.setFont(QFont("Arial", 25, QFont::Bold));
p.setPen(QColor(255,255,255));
p.drawText(rect, Qt::AlignCenter, tr("Press SELECT to play again"));
p.end();

m_image = image;
SetZoom(1.0);
}
}

Expand Down
156 changes: 76 additions & 80 deletions mythtv/themes/Terra/schedule-ui.xml
Expand Up @@ -670,101 +670,97 @@

<window name="custompriority">

<textarea name="pagetitle" from="basetextarea">
<area>40,40,760,40</area>
<font>baselarge</font>
<value>Custom Priority Rules</value>
</textarea>

<textarea name="ruleslabel" from="basetextarea">
<area>280,102,250,30</area>
<font>basemedium</font>
<align>right</align>
<value>Existing Rules:</value>
</textarea>
<imagetype name="backdrop" from="basebackdrop" />

<buttonlist name="rules" from="basewideselector">
<position>540,100</position>
</buttonlist>
<imagetype name="topbar" from="basetopbar" />

<textarea name="titlelabel" from="ruleslabel">
<position>280,162</position>
<value>Rule Name:</value>
<textarea name="pagetitle" from="baseheading">
<value>Custom Priority Rules</value>
</textarea>

<textedit name="title" from="basetextedit">
<position>540,155</position>
</textedit>
<group name="rulecontrols">
<area>170,90,900,200</area>
<textarea name="ruleslabel" from="basetextarea">
<area>0,0,230,35</area>
<font>basemedium</font>
<align>right,vcenter</align>
<value>Existing Rules:</value>
</textarea>

<textarea name="prioritylabel" from="ruleslabel">
<position>280,222</position>
<value>Priority Change:</value>
</textarea>
<buttonlist name="rules" from="basewideselector">
<position>240,0</position>
</buttonlist>

<spinbox name="priority" from="basespinbox">
<position>540,220</position>
</spinbox>
<textarea name="titlelabel" from="ruleslabel">
<position>0,60</position>
<value>Rule Name:</value>
</textarea>

<textarea name="clauseslabel" from="ruleslabel">
<area>340,300,600,40</area>
<align>allcenter</align>
<value>Select a clause from the list.</value>
</textarea>
<textedit name="title" from="basetextedit">
<position>240,55</position>
</textedit>

<buttonlist name="clauses" from="basewideselector">
<position>360,350</position>
</buttonlist>
<textarea name="prioritylabel" from="ruleslabel">
<position>0,120</position>
<value>Priority Change:</value>
</textarea>

<button name="add" from="basebutton">
<position>770,350</position>
<value>Add Clause</value>
</button>
<spinbox name="priority" from="basespinbox">
<position>240,120</position>
</spinbox>
</group>

<textedit name="description">
<area>340,400,600,100</area>
<statetype name="background">
<state name="active">
<shape name="background">
<area>0,0,600,100</area>
<fill color="#FFFFFF" alpha="180" />
</shape>
</state>
<state name="selected" from="active">
<shape name="background">
<fill alpha="255" />
</shape>
</state>
<state name="inactive" from="active" />
</statetype>
<imagetype name="cursor">
<filename>controls/cursor.png</filename>
</imagetype>
<textarea name="text">
<area>12,13,575,75</area>
<font>basesmallblack</font>
<multiline>yes</multiline>
<group name="clausecontrols">
<area>190,290,900,300</area>

<textarea name="clauseslabel" from="basetextarea">
<area>140,0,600,40</area>
<align>allcenter</align>
<font>basemedium</font>
<value>Select a clause from the list.</value>
</textarea>
</textedit>

<button name="cancel" from="basebutton">
<position>100,630</position>
<value>Cancel</value>
</button>
<buttonlist name="clauses" from="basewideselector">
<position>30,55</position>
</buttonlist>

<button name="delete" from="basebutton">
<position>388,630</position>
<value>Delete</value>
</button>
<button name="add" from="basebutton">
<position>645,48</position>
<value>Add Clause</value>
</button>

<button name="test" from="basebutton">
<position>714,630</position>
<value>Test</value>
</button>
<textedit name="description" from="basetextedit">
<area>130,110,637,180</area>
<textarea name="text">
<area>8,10,621,170</area>
<multiline>true</multiline>
</textarea>
</textedit>
</group>

<button name="install" from="basebutton">
<position>1027,630</position>
<value>Install</value>
</button>
<group name="buttons">
<area>67,610,1145,60</area>

<button name="cancel" from="basebutton">
<position>0,0</position>
<value>Cancel</value>
</button>

<button name="delete" from="basebutton">
<position>307,0</position>
<value>Delete</value>
</button>

<button name="test" from="basebutton">
<position>614,0</position>
<value>Test</value>
</button>

<button name="install" from="basebutton">
<position>921,0</position>
<value>Install</value>
</button>
</group>

</window>

Expand Down

0 comments on commit ee0a85c

Please sign in to comment.