Moved about dialog and fixed a few bugs in tweet dialogs

This commit is contained in:
2018-03-14 14:18:11 -06:00
parent 6f838d12e9
commit 861de1f354
3 changed files with 9 additions and 7 deletions

View File

@@ -305,7 +305,7 @@ class viewTweet(widgetUtils.BaseDialog):
self.text = wx.TextCtrl(panel, -1, text, style=wx.TE_READONLY|wx.TE_MULTILINE, size=(250, 180))
dc = wx.WindowDC(self.text)
dc.SetFont(self.text.GetFont())
(x, y, z) = dc.GetMultiLineTextExtent("0"*140)
(x, y) = dc.GetMultiLineTextExtent("0"*140)
self.text.SetSize((x, y))
self.text.SetFocus()
textBox = wx.BoxSizer(wx.HORIZONTAL)
@@ -317,7 +317,7 @@ class viewTweet(widgetUtils.BaseDialog):
self.image_description = wx.TextCtrl(panel, -1, style=wx.TE_READONLY|wx.TE_MULTILINE, size=(250, 180))
dc = wx.WindowDC(self.image_description)
dc.SetFont(self.image_description.GetFont())
(x, y, z) = dc.GetMultiLineTextExtent("0"*450)
(x, y) = dc.GetMultiLineTextExtent("0"*450)
self.image_description.SetSize((x, y))
self.image_description.Enable(False)
iBox = wx.BoxSizer(wx.HORIZONTAL)
@@ -398,7 +398,7 @@ class viewNonTweet(widgetUtils.BaseDialog):
self.text = wx.TextCtrl(parent=panel, id=-1, value=text, style=wx.TE_READONLY|wx.TE_MULTILINE, size=(250, 180))
dc = wx.WindowDC(self.text)
dc.SetFont(self.text.GetFont())
(x, y, z) = dc.GetMultiLineTextExtent("0"*140)
(x, y) = dc.GetMultiLineTextExtent("0"*140)
self.text.SetSize((x, y))
self.text.SetFocus()
textBox = wx.BoxSizer(wx.HORIZONTAL)

View File

@@ -1,5 +1,6 @@
# -*- coding: utf-8 -*-
import wx
import wx.adv
import application
class mainFrame(wx.Frame):
@@ -173,7 +174,7 @@ class mainFrame(wx.Frame):
self.nb.DeletePage(pos)
def about_dialog(self):
info = wx.AboutDialogInfo()
info = wx.adv.AboutDialogInfo()
info.SetName(application.name)
info.SetVersion(application.version)
info.SetDescription(application.description)
@@ -182,7 +183,8 @@ class mainFrame(wx.Frame):
# info.SetLicence(application.licence)
for i in application.authors:
info.AddDeveloper(i)
wx.AboutBox(info)
wx.adv.AboutBox(info)
def set_focus(self):
self.SetFocus()