mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-01-05 03:20:08 +01:00
Fix additional Python 3.10 issues with AGW FlatNotebook
(cherry picked from commit aa3dca0e40)
This commit is contained in:
@@ -925,14 +925,14 @@ def DrawButton(dc, rect, focus, upperTabs):
|
||||
|
||||
if focus:
|
||||
if upperTabs:
|
||||
leftPt = wx.Point(rect.x, rect.y + (rect.height / 10)*8)
|
||||
rightPt = wx.Point(rect.x + rect.width - 2, rect.y + (rect.height / 10)*8)
|
||||
leftPt = wx.Point(rect.x, int(rect.y + (rect.height / 10)*8))
|
||||
rightPt = wx.Point(rect.x + rect.width - 2, int(rect.y + (rect.height / 10)*8))
|
||||
else:
|
||||
leftPt = wx.Point(rect.x, rect.y + (rect.height / 10)*5)
|
||||
rightPt = wx.Point(rect.x + rect.width - 2, rect.y + (rect.height / 10)*5)
|
||||
leftPt = wx.Point(rect.x, int(rect.y + (rect.height / 10)*5))
|
||||
rightPt = wx.Point(rect.x + rect.width - 2, int(rect.y + (rect.height / 10)*5))
|
||||
else:
|
||||
leftPt = wx.Point(rect.x, rect.y + (rect.height / 2))
|
||||
rightPt = wx.Point(rect.x + rect.width - 2, rect.y + (rect.height / 2))
|
||||
leftPt = wx.Point(rect.x, int(rect.y + (rect.height / 2)))
|
||||
rightPt = wx.Point(rect.x + rect.width - 2, int(rect.y + (rect.height / 2)))
|
||||
|
||||
# Define the top region
|
||||
top = wx.Rect(rect.GetTopLeft(), rightPt)
|
||||
@@ -2769,7 +2769,7 @@ class FNBRendererFirefox2(FNBRenderer):
|
||||
if pageTextColour is not None:
|
||||
dc.SetTextForeground(pageTextColour)
|
||||
|
||||
dc.DrawText(pc.GetPageText(tabIdx), posx + textOffset, imageYCoord)
|
||||
dc.DrawText(pc.GetPageText(tabIdx), int(posx + textOffset), imageYCoord)
|
||||
|
||||
# draw 'x' on tab (if enabled)
|
||||
if pc.HasAGWFlag(FNB_X_ON_TAB) and tabIdx == pc.GetSelection():
|
||||
|
||||
Reference in New Issue
Block a user