<pixmap pos="bpBottom" filename="/usr/share/enigma2/b_w_b.png" />
<pixmap pos="bpBottomRight" filename="/usr/share/enigma2/b_w_br.png" />
</borderset>
- </windowstyle> """ """
+ </windowstyle>
<screen name="Standby" flags="wfNoBorder" position="0,0" size="720,576" title="Standby">
</screen>
<screen name="Menu" position="210,150" size="300,235" title="Main menu">
<widget name="theClock" position="10,60" size="280,50" />
</screen>
<screen name="InfoBar" flags="wfNoBorder" position="0,380" size="720,148" title="InfoBar">
- <ePixmap position="0,0" zPosition="1" size="720,148" pixmap="/usr/share/enigma2/info-bg.png" />
+ <ePixmap position="0,0" zPosition="-1" size="720,148" pixmap="/usr/share/enigma2/info-bg.png" />
<widget name="BlinkingPoint" pixmap="/usr/share/enigma2/record.png" position="430,31" size="58,25" />
<widget name="Event_Next_Duration" position="555,98" size="70,26" font="Arial;22" backgroundColor="dark" />
<widget name="ButtonRed" pixmap="/usr/share/enigma2/button_red.png" position="210,132" size="27,12" />
- <widget name="ButtonRedText" position="240,132" size="75,22" font="Arial;13" backgroundColor="dark" />
+ <widget name="ButtonRedText" position="240,132" size="75,22" font="Arial;13" backgroundColor="dark" transparent="1" />
<widget name="ButtonGreen" pixmap="/usr/share/enigma2/button_green.png" position="320,132" size="27,12" />
<widget name="ButtonYellow" pixmap="/usr/share/enigma2/button_yellow.png" position="430,132" size="27,12" />
<widget name="ButtonBlue" pixmap="/usr/share/enigma2/button_blue.png" position="540,132" size="27,12" />
insertIntoParent(); /* now at the new Z position */
}
+void eWidget::setTransparent(int transp)
+{
+ if (transp)
+ m_vis |= wVisTransparent;
+ else
+ m_vis &=~wVisTransparent;
+}
+
void eWidget::mayKillFocus()
{
setFocus(0);
if (m_visible_with_childs.empty())
return;
- gRegion region = r;
+ gRegion region = r, childs = r;
/* we were in parent's space, now we are in local space */
region.moveBy(-position());
painter.moveOffset(position());
- /* walk all childs */
- for (ePtrList<eWidget>::iterator i(m_childs.begin()); i != m_childs.end(); ++i)
- i->doPaint(painter, region);
/* check if there's anything for us to paint */
region &= m_visible_region;
painter.resetClip(region);
event(evtPaint, ®ion, &painter);
}
+
+ childs.moveBy(-position());
+ /* walk all childs */
+ for (ePtrList<eWidget>::iterator i(m_childs.begin()); i != m_childs.end(); ++i)
+ i->doPaint(painter, childs);
painter.moveOffset(-position());
}
// eDebug("eWidget::evtPaint");
// dumpRegion(*(gRegion*)data);
- if (!m_have_background_color)
- {
- ePtr<eWindowStyle> style;
- if (!getStyle(style))
- style->paintBackground(painter, ePoint(0, 0), size());
- } else
+ if (!isTransparent())
{
- painter.setBackgroundColor(m_background_color);
- painter.clear();
+ if (!m_have_background_color)
+ {
+ ePtr<eWindowStyle> style;
+ if (!getStyle(style))
+ style->paintBackground(painter, ePoint(0, 0), size());
+ } else
+ {
+ painter.setBackgroundColor(m_background_color);
+ painter.clear();
+ }
}
break;
}
void clearBackgroundColor();
void setZPosition(int z);
+ void setTransparent(int transp);
/* untested code */
int isVisible() { return (m_vis & wVisShow) && ((!m_parent) || m_parent->isVisible()); }
/* ... */
+
+ int isTransparent() { return m_vis & wVisTransparent; }
eWidgetAnimation m_animation;
private:
widget->m_visible_region = widget->m_clip_region;
widget->m_visible_region.moveBy(widget->position());
widget->m_visible_region &= parent_visible; // in parent space!
- /* TODO: check transparency here! */
- /* remove everything this widget will contain from parent's visible list */
- parent_visible -= widget->m_visible_region; // will remove child regions too!
+ if (!widget->isTransparent())
+ /* remove everything this widget will contain from parent's visible list, unless widget is transparent. */
+ parent_visible -= widget->m_visible_region; // will remove child regions too!
/* now prepare for recursing to childs */
widget->m_visible_region.moveBy(-widget->position()); // now in local space
widget->m_visible_with_childs = widget->m_visible_region;
- for (ePtrList<eWidget>::iterator i(widget->m_childs.begin()); i != widget->m_childs.end(); ++i)
- if (i->m_vis & eWidget::wVisShow)
- calcWidgetClipRegion(*i, widget->m_visible_region);
- else
- clearVisibility(*i);
+ /* add childs in reverse (Z) order - we're going from front-to-bottom here. */
+ ePtrList<eWidget>::iterator i(widget->m_childs.end());
+
+ for (;;)
+ {
+ if (i != widget->m_childs.end())
+ {
+ if (i->m_vis & eWidget::wVisShow)
+ calcWidgetClipRegion(*i, widget->m_visible_region);
+ else
+ clearVisibility(*i);
+ }
+ if (i == widget->m_childs.begin())
+ break;
+ --i;
+ }
}
void eWidgetDesktop::recalcClipRegions(eWidget *root)
guiObject.setForegroundColor(parseColor(value))
elif attrib == "selectionDisabled":
guiObject.setSelectionEnable(0)
+ elif attrib == "transparent":
+ guiObject.setTransparent(int(value))
elif attrib != 'name':
print "unsupported attribute " + attrib + "=" + value
except int: