Fix get_origin calls in Betsy
This commit is contained in:
parent
ee8ae40cd0
commit
0824cdf39d
@ -752,9 +752,13 @@ class MenuWin( object ):
|
|||||||
ourHeight = self.mainwin.window.get_size()[1] + self.mainwin.offset
|
ourHeight = self.mainwin.window.get_size()[1] + self.mainwin.offset
|
||||||
|
|
||||||
# Get the dimensions/position of the widgetToAlignWith
|
# Get the dimensions/position of the widgetToAlignWith
|
||||||
print(self.applet.get_window().get_origin())
|
try:
|
||||||
entryX = self.applet.get_window().get_origin().x
|
entryX = self.applet.get_window().get_origin().x
|
||||||
entryY = self.applet.get_window().get_origin().y
|
entryY = self.applet.get_window().get_origin().y
|
||||||
|
except:
|
||||||
|
# In Betsy get_origin returns an unamed tuple so the code above fails
|
||||||
|
entryX = self.applet.get_window().get_origin()[1]
|
||||||
|
entryY = self.applet.get_window().get_origin()[2]
|
||||||
|
|
||||||
entryWidth, entryHeight = self.applet.get_allocation().width, self.applet.get_allocation().height
|
entryWidth, entryHeight = self.applet.get_allocation().width, self.applet.get_allocation().height
|
||||||
entryHeight = entryHeight + self.mainwin.offset
|
entryHeight = entryHeight + self.mainwin.offset
|
||||||
|
Loading…
Reference in New Issue
Block a user