change direction of content to left aligned when length of text is zero
authorStefan Pluecken <stefan.pluecken@multimedia-labs.de>
Mon, 23 Jan 2006 11:01:27 +0000 (11:01 +0000)
committerStefan Pluecken <stefan.pluecken@multimedia-labs.de>
Mon, 23 Jan 2006 11:01:27 +0000 (11:01 +0000)
lib/gui/elistboxcontent.cpp

index 1866d3a..8b0fe14 100644 (file)
@@ -491,7 +491,10 @@ void eListboxPythonConfigContent::paint(gPainter &painter, eWindowStyle &style,
                                                ePtr<eTextPara> para = new eTextPara(eRect(offset + eSize(m_seperation, 0), item_right));
                                                para->setFont(fnt2);
                                                para->renderString(text, 0);
                                                ePtr<eTextPara> para = new eTextPara(eRect(offset + eSize(m_seperation, 0), item_right));
                                                para->setFont(fnt2);
                                                para->renderString(text, 0);
-                                               para->realign(eTextPara::dirRight);
+                                               if (strlen(text) != 0)
+                                                       para->realign(eTextPara::dirRight);
+                                               else
+                                                       para->realign(eTextPara::dirLeft);
                                                int glyphs = para->size();
                                                
                                                PyObject *plist = 0;
                                                int glyphs = para->size();
                                                
                                                PyObject *plist = 0;