Changed the way how tab label is displayed so it cannot overlap with tab close button

This commit is contained in:
HomeWorld
2011-02-26 16:47:30 +02:00
parent 894fb034f7
commit a2f7e37131
2 changed files with 16 additions and 21 deletions

View File

@@ -56,15 +56,15 @@ def DrawGradientBar(width, height, gStart, gEnd, gMid = None):
return canvas
def GetPartialText(dc, text , maxWidth):
ellipsis = "..."
def GetPartialText(dc, text , maxWidth, defEllipsis = "..."):
ellipsis = defEllipsis
base_w, h = dc.GetTextExtent(ellipsis)
lenText = len(text)
drawntext = text
w, dummy = dc.GetTextExtent(text)
while lenText > 1:
while lenText > 0:
if w + base_w <= maxWidth:
break