<color name="transpBlack" value="#80000000" />
</colors>
- <windowstyle type="skinned">
+ <!-- this is for the main screen -->
+ <windowstyle type="skinned" id="0">
<title offset="20,5" font="Regular;20" />
<color name="Background" color="#33294a6b" />
<color name="LabelForeground" color="#ffffff" />
</borderset>
</windowstyle>
+ <!-- this is for LCD -->
+ <windowstyle type="skinned" id="1">
+ <color name="Background" color="#000000" />
+ <color name="LabelForeground" color="#ffffff" />
+ <color name="ListboxBackground" color="#000000" />
+ <color name="ListboxForeground" color="#ffffff" />
+ <color name="ListboxSelectedBackground" color="#000000" />
+ <color name="ListboxSelectedForeground" color="#ffffff" />
+ <color name="ListboxMarkedBackground" color="#000000" />
+ <color name="ListboxMarkedForeground" color="#ffffff" />
+ <color name="ListboxMarkedAndSelectedBackground" color="#000000" />
+ <color name="ListboxMarkedAndSelectedForeground" color="#ffffff" />
+ <color name="WindowTitleForeground" color="#ffffff" />
+ <color name="WindowTitleBackground" color="#000000" />
+ </windowstyle>
+
<fonts>
<font filename="md_khmurabi_10.ttf" name="Regular" scale="100" />
<font filename="ae_AlMateen.ttf" name="Replacement" scale="90" replacement="1" />
m_screen.m_dirty_region = gRegion(eRect(ePoint(0, 0), size));
m_screen.m_screen_size = size;
m_require_redraw = 0;
+ m_style_id = 0;
CONNECT(gRC::getInstance()->notify, eWidgetDesktop::notify);
setCompositionMode(cmImmediate);
};
void setCompositionMode(int mode);
+
+ int getStyleID() { return m_style_id; }
+ void setStyleID(int id) { m_style_id = id; }
private:
ePtrList<eWidget> m_root;
void calcWidgetClipRegion(eWidget *widget, gRegion &parent_visible);
void notify();
void clearVisibility(eWidget *widget);
+
+ int m_style_id;
};
#endif
ePtr<eWindowStyle> style;
if (mgr)
- mgr->getStyle(style);
+ mgr->getStyle(desktop->getStyleID(), style);
/* when there is either no style manager or no style, revert to simple style. */
if (!style)
m_instance = 0;
}
-void eWindowStyleManager::getStyle(ePtr<eWindowStyle> &style)
+void eWindowStyleManager::getStyle(int style_id, ePtr<eWindowStyle> &style)
{
- style = m_current_style;
+ style = m_current_style[style_id];
}
-void eWindowStyleManager::setStyle(eWindowStyle *style)
+void eWindowStyleManager::setStyle(int style_id, eWindowStyle *style)
{
- m_current_style = style;
+ m_current_style[style_id] = style;
}
eWindowStyleManager *eWindowStyleManager::m_instance;
eWindowStyleManager();
~eWindowStyleManager();
#endif
- void getStyle(ePtr<eWindowStyle> &style);
- void setStyle(eWindowStyle *style);
+ void getStyle(int style_id, ePtr<eWindowStyle> &style);
+ void setStyle(int style_id, eWindowStyle *style);
static int getInstance(ePtr<eWindowStyleManager> &mgr) { mgr = m_instance; if (!mgr) return -1; return 0; }
private:
static eWindowStyleManager *m_instance;
- ePtr<eWindowStyle> m_current_style;
+ std::map<int, ePtr<eWindowStyle> > m_current_style;
};
TEMPLATE_TYPEDEF(ePtr<eWindowStyleManager>, eWindowStyleManagerPtr);
for windowstyle in elementsWithTag(skin.childNodes, "windowstyle"):
style = eWindowStyleSkinned()
+ id = int(windowstyle.getAttribute("id") or "0")
# defaults
font = gFont("Regular", 20)
x = eWindowStyleManagerPtr()
eWindowStyleManager.getInstance(x)
- x.setStyle(style)
+ x.setStyle(id, style)
def loadSkinData(desktop):
skins = dom_skins[:]