aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Monzner <andreas.monzner@multimedia-labs.de>2006-01-23 12:15:59 +0000
committerAndreas Monzner <andreas.monzner@multimedia-labs.de>2006-01-23 12:15:59 +0000
commit82afad7661dffa00f29c80cbe4e9865ace1e0730 (patch)
tree1601d3b27b83e02e86766e010960540e8af61e68
parent4d39789a6269ba9023b163ffe4a5c1c51fe592fd (diff)
downloadenigma2-82afad7661dffa00f29c80cbe4e9865ace1e0730.tar.gz
enigma2-82afad7661dffa00f29c80cbe4e9865ace1e0730.zip
another fix for alignement left
-rw-r--r--lib/gui/elistboxcontent.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/gui/elistboxcontent.cpp b/lib/gui/elistboxcontent.cpp
index 5421f252..c874cd36 100644
--- a/lib/gui/elistboxcontent.cpp
+++ b/lib/gui/elistboxcontent.cpp
@@ -466,7 +466,10 @@ void eListboxPythonConfigContent::paint(gPainter &painter, eWindowStyle &style,
PyObject *pvalue = PyTuple_GET_ITEM(value, 1);
const char *value = (pvalue && PyString_Check(pvalue)) ? PyString_AsString(pvalue) : "<not-a-string>";
painter.setFont(fnt2);
- painter.renderText(eRect(offset + eSize(m_seperation, 0), item_right), value, value_alignment_left ? gPainter::RT_HALIGN_LEFT : gPainter::RT_HALIGN_RIGHT);
+ if (value_alignment_left)
+ painter.renderText(eRect(offset, item_right), value, gPainter::RT_HALIGN_LEFT);
+ else
+ painter.renderText(eRect(offset + eSize(m_seperation, 0), item_right), value, gPainter::RT_HALIGN_RIGHT);
/* pvalue is borrowed */
} else if (!strcmp(atype, "slider"))
@@ -491,8 +494,8 @@ void eListboxPythonConfigContent::paint(gPainter &painter, eWindowStyle &style,
{
PyObject *pvalue = PyTuple_GET_ITEM(value, 1);
const char *text = (pvalue && PyString_Check(pvalue)) ? PyString_AsString(pvalue) : "<not-a-string>";
-
- ePtr<eTextPara> para = new eTextPara(eRect(offset + eSize(m_seperation, 0), item_right));
+ int xoffs = value_alignment_left ? 0 : m_seperation;
+ ePtr<eTextPara> para = new eTextPara(eRect(offset + eSize(xoffs, 0), item_right));
para->setFont(fnt2);
para->renderString(text, 0);
para->realign(value_alignment_left ? eTextPara::dirLeft : eTextPara::dirRight);