X-Git-Url: https://git.ctpug.org.za/?a=blobdiff_plain;f=naja%2Fwidgets%2Ftext.py;h=f105e3bc1cb972dd6dde63534b1fd2e833d05928;hb=ad524ce884e9ca69f29dbf8efca089ef1c410a97;hp=b976f2a08b972a6d32b15109fc2ef03b2d6019f7;hpb=a50a8a391693f50590b7de9ed9c89c9a576af05c;p=naja.git diff --git a/naja/widgets/text.py b/naja/widgets/text.py index b976f2a..f105e3b 100644 --- a/naja/widgets/text.py +++ b/naja/widgets/text.py @@ -158,21 +158,20 @@ class TextBoxWidget(TextWidget): def _prepare_glyph(self, glyph, current_words): glyphs = [] size = self.font.size(' '.join(current_words[:-1] + [''])) - x = size[0] * EIGHT_BIT_SCALE + self.padding - y = 0 + x = size[0] * EIGHT_BIT_SCALE for glyph_key in glyph.glyph_keys: image_name, colour = MARKUP_MAP[glyph_key] if colour is None: colour = self.colour image = resources.get_image( image_name, transforms=(EIGHT_BIT, blender(colour))) - glyphs.append(((x, y), image)) + glyphs.append(((x, 0), image)) x += image.get_width() return glyphs def _check_markup(self, word): suffix = '' - if word[-1] in '.,': + if word[-1] in '.,:': suffix = word[-1] word = word[:-1]