128 changes: 87 additions & 41 deletions mythtv/libs/libmythui/mythuitext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,9 @@ MythUIText::MythUIText(MythUIType *parent, const QString &name)
curR(0.0), curG(0.0), curB(0.0),
incR(0.0), incG(0.0), incB(0.0)
{
m_Initiator = true;
#if 0 // Not currently used
m_usingAltArea = false;
#endif
m_ShrinkNarrow = true;
m_MultiLine = false;
m_scrolling = false;
Expand Down Expand Up @@ -65,8 +66,9 @@ MythUIText::MythUIText(const QString &text, const MythFontProperties &font,
curR(0.0), curG(0.0), curB(0.0),
incR(0.0), incG(0.0), incB(0.0)
{
m_Initiator = true;
#if 0 // Not currently used
m_usingAltArea = false;
#endif
m_ShrinkNarrow = true;
m_MultiLine = false;
m_scrolling = false;
Expand Down Expand Up @@ -118,7 +120,7 @@ void MythUIText::SetText(const QString &text)
m_Message = newtext;

m_CutMessage.clear();
FillCutMessage(true);
FillCutMessage();

SetRedraw();
}
Expand Down Expand Up @@ -183,22 +185,39 @@ QString MythUIText::GetDefaultText(void) const
void MythUIText::SetFontProperties(const MythFontProperties &fontProps)
{
m_FontStates.insert("default", fontProps);
*m_Font = m_FontStates["default"];
FillCutMessage(false);
SetRedraw();
if (m_Font->GetHash() != m_FontStates["default"].GetHash())
{
*m_Font = m_FontStates["default"];
if (!m_Message.isEmpty())
{
FillCutMessage();
SetRedraw();
}
}
}

void MythUIText::SetFontState(const QString &state)
{
if (m_FontStates.contains(state))
{
if (m_Font->GetHash() == m_FontStates[state].GetHash())
return;
*m_Font = m_FontStates[state];
}
else
{
if (m_Font->GetHash() == m_FontStates["default"].GetHash())
return;
*m_Font = m_FontStates["default"];

FillCutMessage(false);
SetRedraw();
}
if (!m_Message.isEmpty())
{
FillCutMessage();
SetRedraw();
}
}

#if 0 // Not currently used
void MythUIText::UseAlternateArea(bool useAlt)
{
if (useAlt && m_AltDisplayRect.width() > 1)
Expand All @@ -212,8 +231,9 @@ void MythUIText::UseAlternateArea(bool useAlt)
m_usingAltArea = false;
}

FillCutMessage(false);
FillCutMessage();
}
#endif

void MythUIText::SetJustification(int just)
{
Expand All @@ -222,8 +242,11 @@ void MythUIText::SetJustification(int just)
// preserve the wordbreak attribute, drop everything else
m_Justification = m_Justification & Qt::TextWordWrap;
m_Justification |= just;
FillCutMessage(false);
SetRedraw();
if (!m_Message.isEmpty())
{
FillCutMessage();
SetRedraw();
}
}
}

Expand All @@ -234,28 +257,41 @@ int MythUIText::GetJustification(void)

void MythUIText::SetCutDown(bool cut)
{
m_Cutdown = cut;
if (m_scrolling && m_Cutdown)
if (cut != m_Cutdown)
{
LOG(VB_GENERAL, LOG_ERR, QString("'%1': <scroll> and <cutdown> are "
"not combinable.").arg(objectName()));
m_Cutdown = false;
m_Cutdown = cut;
if (m_scrolling && m_Cutdown)
{
LOG(VB_GENERAL, LOG_ERR, QString("'%1': <scroll> and <cutdown> are "
"not combinable.")
.arg(objectName()));
m_Cutdown = false;
}
if (!m_Message.isEmpty())
{
FillCutMessage();
SetRedraw();
}
}
FillCutMessage(false);
SetRedraw();
}

void MythUIText::SetMultiLine(bool multiline)
{
m_MultiLine = multiline;
if (multiline != m_MultiLine)
{
m_MultiLine = multiline;

if (m_MultiLine)
m_Justification |= Qt::TextWordWrap;
else
m_Justification &= ~Qt::TextWordWrap;
if (m_MultiLine)
m_Justification |= Qt::TextWordWrap;
else
m_Justification &= ~Qt::TextWordWrap;

FillCutMessage(false);
SetRedraw();
if (!m_Message.isEmpty())
{
FillCutMessage();
SetRedraw();
}
}
}

void MythUIText::SetArea(const MythRect &rect)
Expand All @@ -264,7 +300,7 @@ void MythUIText::SetArea(const MythRect &rect)
m_CutMessage.clear();

m_drawRect = m_Area;
FillCutMessage(false);
FillCutMessage();
}

void MythUIText::SetPosition(const MythPoint &pos)
Expand Down Expand Up @@ -533,7 +569,7 @@ bool MythUIText::GetNarrowWidth(const QStringList & paragraphs,
return false;
}

void MythUIText::FillCutMessage(bool reset_size)
void MythUIText::FillCutMessage(void)
{
if (m_Area.isNull())
return;
Expand Down Expand Up @@ -572,9 +608,6 @@ void MythUIText::FillCutMessage(bool reset_size)

if (m_CutMessage.isEmpty())
{
if (!reset_size)
return;

if (m_Layouts.empty())
m_Layouts.push_back(new QTextLayout);

Expand All @@ -589,7 +622,6 @@ void MythUIText::FillCutMessage(bool reset_size)
line.setLineWidth(m_Area.width());
line.setPosition(QPointF(0, 0));
(*Ilayout)->endLayout();
min_rect = line.naturalTextRect();
m_drawRect.setWidth(m_Area.width());
m_drawRect.setHeight(m_lineHeight);

Expand Down Expand Up @@ -654,12 +686,6 @@ void MythUIText::FillCutMessage(bool reset_size)
m_Canvas.setHeight(height);
}

if (m_MinSize.isValid())
{
// Record the minimal area needed for the message.
SetMinArea(min_rect.toRect().size());
}

if (m_scrolling)
{
if (m_scrollDirection == ScrollLeft ||
Expand All @@ -683,17 +709,39 @@ void MythUIText::FillCutMessage(bool reset_size)

// If any of hcenter|vcenter|Justify, center it all, then adjust later
if (m_Justification & (Qt::AlignCenter|Qt::AlignJustify))
{
m_drawRect.moveCenter(m_Area.center());
min_rect.moveCenter(m_Area.center());
}
// Adjust horizontal
if (m_Justification & Qt::AlignLeft)
{
m_drawRect.moveLeft(m_Area.x());
min_rect.moveLeft(m_Area.x());
}
else if (m_Justification & Qt::AlignRight)
{
m_drawRect.moveRight(m_Area.x() + m_Area.width());
min_rect.moveRight(m_Area.x() + m_Area.width());
}
// Adjust vertical
if (m_Justification & Qt::AlignTop)
{
m_drawRect.moveTop(m_Area.y());
min_rect.moveTop(m_Area.y());
}
else if (m_Justification & Qt::AlignBottom)
{
m_drawRect.moveBottom(m_Area.y() + m_Area.height());
min_rect.moveBottom(m_Area.y() + m_Area.height());
}

m_Initiator = true;
if (m_MinSize.isValid())
{
// Record the minimal area needed for the message.
SetMinArea(min_rect.toRect());
}
}

QPoint MythUIText::CursorPosition(int text_offset)
Expand Down Expand Up @@ -1027,8 +1075,6 @@ bool MythUIText::ParseElement(
m_textCase = CaseCapitaliseAll;
else
m_textCase = CaseNormal;

FillCutMessage(true);
}
else
{
Expand Down Expand Up @@ -1117,5 +1163,5 @@ void MythUIText::Finalize(void)
"not combinable.").arg(objectName()));
m_Cutdown = false;
}
FillCutMessage(true);
FillCutMessage();
}
6 changes: 5 additions & 1 deletion mythtv/libs/libmythui/mythuitext.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ class MUI_PUBLIC MythUIText : public MythUIType, public StorageUser
void SetTemplateText(const QString &text) { m_TemplateText = text; }
QString GetTemplateText(void) const { return m_TemplateText; }

#if 0 // Not currently used
void UseAlternateArea(bool useAlt);
#endif

virtual void Pulse(void);
QPoint CursorPosition(int text_offset);
Expand Down Expand Up @@ -93,7 +95,7 @@ class MUI_PUBLIC MythUIText : public MythUIType, public StorageUser
qreal & last_line_width, int & num_lines);
bool GetNarrowWidth(const QStringList & paragraphs,
const QTextOption & textoption, qreal & width);
void FillCutMessage(bool reset_size = false);
void FillCutMessage(void);

int m_Justification;
MythRect m_OrigDisplayRect;
Expand All @@ -107,7 +109,9 @@ class MUI_PUBLIC MythUIText : public MythUIType, public StorageUser
QString m_DefaultMessage;
QString m_TemplateText;

#if 0 // Not currently used
bool m_usingAltArea;
#endif
bool m_ShrinkNarrow;
bool m_Cutdown;
bool m_MultiLine;
Expand Down
5 changes: 3 additions & 2 deletions mythtv/libs/libmythui/mythuitextedit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,8 @@ void MythUITextEdit::Finalize()
SetInitialStates();

// Give it something to chew on, so it can position the initial
// cursor in the right place
// cursor in the right place. Toggle text, to force an area recalc.
m_Text->SetText(".");
m_Text->SetText("");
m_cursorImage->SetPosition(m_Text->CursorPosition(0));
}
Expand Down Expand Up @@ -188,7 +189,7 @@ void MythUITextEdit::SetInitialStates()

if (height > 0)
{
MythRect imageArea = m_cursorImage->GetArea();
MythRect imageArea = m_cursorImage->GetFullArea();
int width = int(((float)height / (float)imageArea.height())
* (float)imageArea.width());

Expand Down
221 changes: 112 additions & 109 deletions mythtv/libs/libmythui/mythuitype.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,7 @@ void MythUIType::SetPosition(const MythPoint &point)
MythPoint pos(point);

if (m_Parent)
pos.CalculatePoint(m_Parent->GetArea());
pos.CalculatePoint(m_Parent->GetFullArea());
else
pos.CalculatePoint(GetMythMainWindow()->GetUIScreenRect());

Expand Down Expand Up @@ -552,7 +552,7 @@ void MythUIType::SetMinSize(const MythPoint &minsize)
MythPoint point(minsize);

if (m_Parent)
point.CalculatePoint(m_Parent->GetArea());
point.CalculatePoint(m_Parent->GetFullArea());

m_MinSize = point;
}
Expand All @@ -573,13 +573,6 @@ void MythUIType::SetArea(const MythRect &rect)
m_DirtyRegion = QRegion(m_Area.toQRect());

m_Area = rect;

if (m_Area.width() > m_NormalSize.width())
m_NormalSize.setWidth(m_Area.width());

if (m_Area.height() > m_NormalSize.height())
m_NormalSize.setHeight(m_Area.height());

RecalculateArea();

if (m_Parent)
Expand All @@ -591,39 +584,58 @@ void MythUIType::SetArea(const MythRect &rect)
/**
* Adjust the size of a sibling.
*/
void MythUIType::AdjustMinArea(int delta_x, int delta_y)
void MythUIType::AdjustMinArea(int delta_x, int delta_y,
int delta_w, int delta_h)
{
// If a minsize is not set, don't use MinArea
if (!m_MinSize.isValid())
return;

if (m_Area.width() < m_NormalSize.width())
m_Area.setWidth(m_NormalSize.width());
// Delta's are negative values; knock down the area
QRect bounded(m_Area.x() - delta_x,
m_Area.y() - delta_y,
m_Area.width() + delta_w,
m_Area.height() + delta_h);

if (m_Area.height() < m_NormalSize.height())
m_Area.setHeight(m_NormalSize.height());
// Make sure we have not violated the min size
if (!bounded.isNull() || !m_Vanish)
{
QPoint center = bounded.center();

QSize size(m_Area.size());
if (bounded.isNull())
bounded.setSize(GetMinSize());
else
bounded.setSize(bounded.size().expandedTo(GetMinSize()));

size.setWidth(size.width() + delta_x);
size.setHeight(size.height() + delta_y);
m_MinArea.setSize(size);
m_MinArea.moveLeft(m_Area.x());
m_MinArea.moveTop(m_Area.y());
bounded.moveCenter(center);
}

QSize bound(m_MinArea.width(), m_MinArea.height());
bound = bound.expandedTo(GetMinSize());
if (bounded.x() + bounded.width() > m_Area.x() + m_Area.width())
bounded.moveRight(m_Area.x() + m_Area.width());
if (bounded.y() + bounded.height() > m_Area.y() + m_Area.height())
bounded.moveBottom(m_Area.x() + m_Area.height());
if (bounded.x() < m_Area.x())
{
bounded.moveLeft(m_Area.x());
if (bounded.width() > m_Area.width())
bounded.setWidth(m_Area.width());
}
if (bounded.y() < m_Area.y())
{
bounded.moveTop(m_Area.y());
if (bounded.height() > m_Area.height())
bounded.setHeight(m_Area.height());
}

m_MinArea.setWidth(bound.width());
m_MinArea.setHeight(bound.height());
m_MinArea = bounded;
m_Vanished = false;

QList<MythUIType *>::iterator it;

for (it = m_ChildrenList.begin(); it != m_ChildrenList.end(); ++it)
{
if (!(*it)->m_Initiator)
(*it)->AdjustMinArea(delta_x, delta_y);
(*it)->AdjustMinArea(delta_x, delta_y, delta_w, delta_h);
}
}

Expand Down Expand Up @@ -651,23 +663,15 @@ void MythUIType::VanishSibling(void)
* Adjust the size of sibling objects within the button.
*/
void MythUIType::SetMinAreaParent(MythRect actual_area, MythRect allowed_area,
const MythUIType *calling_child)
MythUIType *calling_child)
{
int delta_x = 0, delta_y = 0;
int delta_x = 0, delta_y = 0, delta_w = 0, delta_h = 0;
MythRect area;

// If a minsize is not set, don't use MinArea
if (!m_MinSize.isValid())
return;

m_MinArea.setWidth(0);

if (m_Area.width() < m_NormalSize.width())
m_Area.setWidth(m_NormalSize.width());

if (m_Area.height() < m_NormalSize.height())
m_Area.setHeight(m_NormalSize.height());

if (calling_child->m_Vanished)
{
actual_area.moveLeft(0);
Expand All @@ -676,8 +680,8 @@ void MythUIType::SetMinAreaParent(MythRect actual_area, MythRect allowed_area,
allowed_area.moveTop(0);
}

actual_area.translate(m_Area.topLeft());
allowed_area.translate(m_Area.topLeft());
actual_area.translate(m_Area.x(), m_Area.y());
allowed_area.translate(m_Area.x(), m_Area.y());

QList<MythUIType *>::iterator it;

Expand All @@ -686,14 +690,17 @@ void MythUIType::SetMinAreaParent(MythRect actual_area, MythRect allowed_area,
if (*it == calling_child || !(*it)->m_Initiator)
continue;

// Find union of area(s)
area = (*it)->GetArea();
area.translate(m_Area.topLeft());
actual_area = actual_area.united(area);

area = (*it)->m_Area;
area.translate(m_Area.topLeft());
allowed_area = allowed_area.united(area);
if (!(*it)->m_Vanished)
{
// Find union of area(s)
area = (*it)->GetArea();
area.translate(m_Area.x(), m_Area.y());
actual_area = actual_area.united(area);

area = (*it)->m_Area;
area.translate(m_Area.x(), m_Area.y());
allowed_area = allowed_area.united(area);
}
}

// Make sure it is not larger than the area allowed
Expand All @@ -708,17 +715,17 @@ void MythUIType::SetMinAreaParent(MythRect actual_area, MythRect allowed_area,
{
if (calling_child->m_Vanished)
{
delta_x = (actual_area.x() + actual_area.width()) -
(m_Area.x() + m_Area.width());
delta_y = (actual_area.y() + actual_area.height()) -
(m_Area.y() + m_Area.height());
delta_x = m_Area.x() - actual_area.x();
delta_y = m_Area.y() - actual_area.y();
delta_w = actual_area.width() - m_Area.width();
delta_h = actual_area.height() - m_Area.height();
}
else
{
delta_x = (actual_area.x() + actual_area.width()) -
(allowed_area.x() + allowed_area.width());
delta_y = (actual_area.y() + actual_area.height()) -
(allowed_area.y() + allowed_area.height());
delta_x = allowed_area.x() - actual_area.x();
delta_y = allowed_area.y() - actual_area.y();
delta_w = actual_area.width() - allowed_area.width();
delta_h = actual_area.height() - allowed_area.height();
}

m_Vanished = false;
Expand All @@ -734,26 +741,29 @@ void MythUIType::SetMinAreaParent(MythRect actual_area, MythRect allowed_area,
if (m_Vanished)
(*it)->VanishSibling();
else
(*it)->AdjustMinArea(delta_x, delta_y);
(*it)->AdjustMinArea(delta_x, delta_y, delta_w, delta_h);
}

area = (*it)->GetArea();
area.translate(m_Area.topLeft());
actual_area = actual_area.united(area);
}

QSize bound(actual_area.width(), actual_area.height());

if (m_Vanished)
{
m_MinArea.moveLeft(0);
m_MinArea.moveTop(0);
m_MinArea.setRect(0, 0, 0, 0);
actual_area.setRect(0, 0, 0, 0);
}
else
bound = bound.expandedTo(GetMinSize());
{
QSize bound(actual_area.width(), actual_area.height());

m_MinArea.setWidth(bound.width());
m_MinArea.setHeight(bound.height());
bound = bound.expandedTo(GetMinSize());
m_MinArea.setRect(actual_area.x(),
actual_area.y(),
actual_area.x() + bound.width(),
actual_area.y() + bound.height());
}

if (m_Parent)
m_Parent->SetMinAreaParent(actual_area, m_Area, this);
Expand All @@ -762,54 +772,51 @@ void MythUIType::SetMinAreaParent(MythRect actual_area, MythRect allowed_area,
/**
* Set the minimum area based on the given size
*/
void MythUIType::SetMinArea(const QSize &size)
void MythUIType::SetMinArea(const MythRect &rect)
{
// If a minsize is not set, don't use MinArea
if (!m_Initiator || !m_MinSize.isValid())
return;

m_MinArea.setWidth(0);

if (m_Area.width() < m_NormalSize.width())
m_Area.setWidth(m_NormalSize.width());

if (m_Area.height() < m_NormalSize.height())
m_Area.setHeight(m_NormalSize.height());

/**
* The MinArea will have the same origin as the normal Area,
* but can have a smaller size.
*/
QSize bounded(size);

if (!bounded.isNull() || !m_Vanish)
{
if (bounded.isNull())
bounded = GetMinSize();
else
bounded = bounded.expandedTo(GetMinSize());

bounded = bounded.boundedTo(m_Area.size());
}

if (m_Vanish == m_Vanished && bounded == m_MinArea.size())
return;

m_MinArea.setWidth(bounded.width());
m_MinArea.setHeight(bounded.height());
m_Vanished = (m_Vanish && m_MinArea.size().isNull());
QRect bounded(rect);
bool vanish = (m_Vanish && rect.isNull());

if (m_Vanished)
if (vanish)
{
m_MinArea.moveLeft(0);
m_MinArea.moveTop(0);
bounded.moveLeft(0);
bounded.moveTop(0);
}
else
{
m_MinArea.moveLeft(m_Area.x());
m_MinArea.moveTop(m_Area.y());
QPoint center = bounded.center();

if (bounded.isNull())
bounded.setSize(GetMinSize());
else
bounded.setSize(bounded.size().expandedTo(GetMinSize()));

bounded.moveCenter(center);
if (bounded.x() + bounded.width() > m_Area.x() + m_Area.width())
bounded.moveRight(m_Area.x() + m_Area.width());
if (bounded.y() + bounded.height() > m_Area.y() + m_Area.height())
bounded.moveBottom(m_Area.x() + m_Area.height());
if (bounded.x() < m_Area.x())
{
bounded.moveLeft(m_Area.x());
if (bounded.width() > m_Area.width())
bounded.setWidth(m_Area.width());
}
if (bounded.y() < m_Area.y())
{
bounded.moveTop(m_Area.y());
if (bounded.height() > m_Area.height())
bounded.setHeight(m_Area.height());
}
}

m_MinArea = bounded;
m_Vanished = vanish;

if (m_Parent)
m_Parent->SetMinAreaParent(m_MinArea, m_Area, this);
}
Expand Down Expand Up @@ -838,6 +845,11 @@ MythRect MythUIType::GetArea(void) const
return m_Area;
}

MythRect MythUIType::GetFullArea(void) const
{
return m_Area;
}

QRegion MythUIType::GetDirtyArea(void) const
{
return m_DirtyRegion;
Expand Down Expand Up @@ -1032,10 +1044,8 @@ void MythUIType::CopyFrom(MythUIType *base)

SetArea(base->m_Area);
m_MinSize = base->m_MinSize;
m_Initiator = base->m_Initiator;
m_Vanish = base->m_Vanish;
m_Vanished = base->m_Vanished;
m_NormalSize = base->m_NormalSize;
m_Vanished = false;
m_Alpha = base->m_Alpha;
m_AlphaChangeMode = base->m_AlphaChangeMode;
m_AlphaChange = base->m_AlphaChange;
Expand All @@ -1060,8 +1070,7 @@ void MythUIType::CopyFrom(MythUIType *base)
(*it)->CreateCopy(this);
}

if (m_Initiator)
SetMinArea(base->m_MinArea.size());
SetMinArea(base->m_MinArea);
}

/**
Expand Down Expand Up @@ -1166,16 +1175,10 @@ bool MythUIType::AddFont(const QString &text, MythFontProperties *fontProp)
void MythUIType::RecalculateArea(bool recurse)
{
if (m_Parent)
m_Area.CalculateArea(m_Parent->GetArea());
m_Area.CalculateArea(m_Parent->GetFullArea());
else
m_Area.CalculateArea(GetMythMainWindow()->GetUIScreenRect());

if (m_Area.width() > m_NormalSize.width())
m_NormalSize.setWidth(m_Area.width());

if (m_Area.height() > m_NormalSize.height())
m_NormalSize.setHeight(m_Area.height());

if (recurse)
{
QList<MythUIType *>::iterator it;
Expand Down
10 changes: 6 additions & 4 deletions mythtv/libs/libmythui/mythuitype.h
Original file line number Diff line number Diff line change
Expand Up @@ -111,12 +111,14 @@ class MUI_PUBLIC MythUIType : public QObject, public XMLParseBase
virtual void SetMinSize(const MythPoint &size);
virtual QSize GetMinSize(void) const;
virtual void SetArea(const MythRect &rect);
virtual void AdjustMinArea(int delta_x, int delta_y);
virtual void AdjustMinArea(int delta_x, int delta_y,
int delta_w, int delta_h);
virtual void VanishSibling(void);
virtual void SetMinAreaParent(MythRect actual_area, MythRect full_area,
const MythUIType *child);
virtual void SetMinArea(const QSize &size);
MythUIType *child);
virtual void SetMinArea(const MythRect & rect);
virtual MythRect GetArea(void) const;
virtual MythRect GetFullArea(void) const;
virtual void RecalculateArea(bool recurse = true);
void ExpandArea(const MythRect &rect);

Expand Down Expand Up @@ -209,7 +211,7 @@ class MUI_PUBLIC MythUIType : public QObject, public XMLParseBase
MythRect m_Area;
MythRect m_MinArea;
MythPoint m_MinSize;
QSize m_NormalSize;
// QSize m_NormalSize;

QRegion m_DirtyRegion;
bool m_NeedsRedraw;
Expand Down
14 changes: 3 additions & 11 deletions mythtv/themes/MythCenter-wide/recordings-ui.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,33 +24,25 @@

<buttonlist name="recgroups">
<arrange>stack</arrange>
<area>364,36,820,54</area>
<area>364,30,634,40</area>
<align>hcenter</align>
<scrollstyle>center</scrollstyle>
<wrapstyle>items</wrapstyle>
<layout>horizontal</layout>
<buttonarea>0,0,100%,100%</buttonarea>
<statetype name="buttonitem">
<state name="selectedinactive">
<area>0,0,300,56</area>
<shape name="recSelectedGroupShape">
<area>0,0,0,0</area>
</shape>
<area>0,0,300,100%</area>
<textarea name="buttontext">
<area>10,2,-10,-5</area>
<minsize>10%,50%</minsize>
<align>allcenter</align>
<align>center</align>
<font>basemedium</font>
<alpha>200</alpha>
</textarea>
</state>
<state name="inactive" from="selectedinactive">
<shape name="recGroupShape">
<area>0,0,0,0</area>
</shape>
<textarea name="buttontext">
<area>0,0,0,0</area>
<alpha>0</alpha>
</textarea>
</state>
</statetype>
Expand Down
14 changes: 3 additions & 11 deletions mythtv/themes/MythCenter/recordings-ui.xml
Original file line number Diff line number Diff line change
Expand Up @@ -57,33 +57,25 @@

<buttonlist name="recgroups">
<arrange>stack</arrange>
<area>225,17,500,55</area>
<area>225,15,340,35</area>
<align>hcenter</align>
<scrollstyle>center</scrollstyle>
<wrapstyle>items</wrapstyle>
<layout>horizontal</layout>
<buttonarea>0,0,100%,100%</buttonarea>
<statetype name="buttonitem">
<state name="selectedinactive">
<area>0,0,300,55</area>
<shape name="recSelectedGroupShape">
<area>0,0,0,0</area>
</shape>
<area>0,0,300,100%</area>
<textarea name="buttontext">
<area>10,2,-10,-5</area>
<minsize>10%,50%</minsize>
<align>allcenter</align>
<align>center</align>
<font>basemedium</font>
<alpha>230</alpha>
</textarea>
</state>
<state name="inactive" from="selectedinactive">
<shape name="recGroupShape">
<area>0,0,0,0</area>
</shape>
<textarea name="buttontext">
<area>0,0,0,0</area>
<alpha>0</alpha>
</textarea>
</state>
</statetype>
Expand Down
31 changes: 15 additions & 16 deletions mythtv/themes/default-wide/recordings-ui.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,39 +17,38 @@

<buttonlist name="recgroups">
<arrange>stack</arrange>
<area>365,30,820,55</area>
<align>hcenter</align>
<spacing>20</spacing>
<area>365,20,880,45</area>
<align>center</align>
<!-- only allow one button to fix -->
<spacing>880</spacing>
<scrollstyle>center</scrollstyle>
<wrapstyle>items</wrapstyle>
<layout>horizontal</layout>
<buttonarea>0,0,100%,100%</buttonarea>
<statetype name="buttonitem">
<area>0,0,100%,100%</area>
<state name="inactive">
<area>0,0,300,55</area>
<!-- Use full width for a single button -->
<area>0,0,100%,100%</area>
<minsize>20,50%</minsize>
<shape name="recGroupShape">
<area>0,0,100%,100%</area>
<minsize>150,100%</minsize>
<minsize>20,50%</minsize>
<type>roundbox</type>
<fill color="#000000" alpha="192" />
<line color="#FFFFFF" alpha="255" width="1" />
<fill color="#000000" alpha="128" />
<line color="#AAFFFF" alpha="255" width="3" />
<cornerradius>5</cornerradius>
</shape>
<textarea name="buttontext">
<area>10,2,-10,-5</area>
<minsize>10%,50%</minsize>
<align>allcenter</align>
<area>10,5,-10,-5</area>
<minsize>20,50%</minsize>
<align>left,vcenter</align>
<cutdown>yes</cutdown>
<font>basesmall</font>
<alpha>255</alpha>
</textarea>
</state>
<state name="selectedinactive" from="inactive">
<shape name="recGroupShape">
<fill color="#000000" alpha="192" />
<line color="#00FF00" alpha="255" width="3" />
</shape>
</state>
<state name="selectedinactive" from="inactive" />
</statetype>
</buttonlist>

Expand Down
29 changes: 14 additions & 15 deletions mythtv/themes/default/recordings-ui.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,39 +17,38 @@

<buttonlist name="recgroups">
<arrange>stack</arrange>
<area>225,17,500,55</area>
<area>225,5,500,45</area>
<align>center</align>
<spacing>20</spacing>
<!-- only allow one button to fix -->
<spacing>500</spacing>
<scrollstyle>center</scrollstyle>
<wrapstyle>items</wrapstyle>
<layout>horizontal</layout>
<buttonarea>0,0,100%,100%</buttonarea>
<statetype name="buttonitem">
<buttonarea>0,0,100%,100%</buttonarea>
<state name="inactive">
<area>0,0,300,55</area>
<!-- Use full width for a single button -->
<area>0,0,100%,100%</area>
<minsize>20,50%</minsize>
<shape name="recGroupShape">
<area>0,0,100%,100%</area>
<minsize>150,100%</minsize>
<minsize>20,50%</minsize>
<type>roundbox</type>
<fill color="#000000" alpha="192" />
<line color="#FFFFFF" alpha="255" width="1" />
<fill color="#000000" alpha="128" />
<line color="#AAFFFF" alpha="255" width="1" />
<cornerradius>5</cornerradius>
</shape>
<textarea name="buttontext">
<area>10,2,-10,-5</area>
<minsize>10%,50%</minsize>
<align>allcenter</align>
<area>10,5,-10,-5</area>
<minsize>20,50%</minsize>
<align>left,vcenter</align>
<cutdown>yes</cutdown>
<font>basesmall</font>
<alpha>255</alpha>
</textarea>
</state>
<state name="selectedinactive" from="inactive">
<shape name="recGroupShape">
<fill color="#000000" alpha="192" />
<line color="#00FF00" alpha="255" width="3" />
</shape>
</state>
<state name="selectedinactive" from="inactive" />
</statetype>
</buttonlist>

Expand Down