Multiline in tweets, searches improvements and visual changes

This commit is contained in:
2015-03-20 17:04:39 -06:00
parent ee006eeb66
commit a63d6eceb1
11 changed files with 98 additions and 58 deletions

View File

@@ -10,12 +10,12 @@ class textLimited(widgetUtils.BaseDialog):
self.panel = wx.Panel(self)
self.label = wx.StaticText(self.panel, -1, message)
self.SetTitle(str(len(text)))
self.text = wx.TextCtrl(self.panel, -1, text)
font = self.text.GetFont()
dc = wx.WindowDC(self.text)
dc.SetFont(font)
x, y = dc.GetTextExtent("00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000")
self.text.SetSize((x, y))
self.text = wx.TextCtrl(self.panel, -1, text, size=(439, -1), style=wx.TE_MULTILINE)
# font = self.text.GetFont()
# dc = wx.WindowDC(self.text)
# dc.SetFont(font)
# x, y = dc.GetTextExtent("00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000")
# self.text.SetSize((x, y))
self.text.SetFocus()
self.textBox = wx.BoxSizer(wx.HORIZONTAL)
self.textBox.Add(self.label, 0, wx.ALL, 5)
@@ -74,19 +74,19 @@ class tweet(textLimited):
self.okButton.SetDefault()
cancelButton = wx.Button(self.panel, wx.ID_CANCEL, _(u"Close"), size=wx.DefaultSize)
self.buttonsBox1 = wx.BoxSizer(wx.HORIZONTAL)
self.buttonsBox1.Add(self.upload_image, 0, wx.ALL, 5)
self.buttonsBox1.Add(self.spellcheck, 0, wx.ALL, 5)
self.buttonsBox1.Add(self.attach, 0, wx.ALL, 5)
self.mainBox.Add(self.buttonsBox1, 0, wx.ALL, 5)
self.buttonsBox1.Add(self.upload_image, 0, wx.ALL, 10)
self.buttonsBox1.Add(self.spellcheck, 0, wx.ALL, 10)
self.buttonsBox1.Add(self.attach, 0, wx.ALL, 10)
self.mainBox.Add(self.buttonsBox1, 0, wx.ALL, 10)
self.buttonsBox2 = wx.BoxSizer(wx.HORIZONTAL)
self.buttonsBox2.Add(self.shortenButton, 0, wx.ALL, 5)
self.buttonsBox2.Add(self.unshortenButton, 0, wx.ALL, 5)
self.buttonsBox2.Add(self.translateButton, 0, wx.ALL, 5)
self.mainBox.Add(self.buttonsBox2, 0, wx.ALL, 5)
self.buttonsBox2.Add(self.shortenButton, 0, wx.ALL, 10)
self.buttonsBox2.Add(self.unshortenButton, 0, wx.ALL, 10)
self.buttonsBox2.Add(self.translateButton, 0, wx.ALL, 10)
self.mainBox.Add(self.buttonsBox2, 0, wx.ALL, 10)
self.ok_cancelSizer = wx.BoxSizer(wx.HORIZONTAL)
self.ok_cancelSizer.Add(self.autocompletionButton, 0, wx.ALL, 5)
self.ok_cancelSizer.Add(self.okButton, 0, wx.ALL, 5)
self.ok_cancelSizer.Add(cancelButton, 0, wx.ALL, 5)
self.ok_cancelSizer.Add(self.autocompletionButton, 0, wx.ALL, 10)
self.ok_cancelSizer.Add(self.okButton, 0, wx.ALL, 10)
self.ok_cancelSizer.Add(cancelButton, 0, wx.ALL, 10)
self.mainBox.Add(self.ok_cancelSizer)
selectId = wx.NewId()
self.Bind(wx.EVT_MENU, self.onSelect, id=selectId)