From 9dc006f6a719ea14a38d753b62cafecdb0e31986 Mon Sep 17 00:00:00 2001 From: "Linneweber, Thorben, Dr. (G-GEAC)" Date: Thu, 27 Feb 2020 10:21:09 +0100 Subject: [PATCH] Fixed a bug in the tabHeight calculation. --- wx/lib/agw/flatnotebook.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/wx/lib/agw/flatnotebook.py b/wx/lib/agw/flatnotebook.py index 98139c03..43167bdf 100644 --- a/wx/lib/agw/flatnotebook.py +++ b/wx/lib/agw/flatnotebook.py @@ -2197,15 +2197,11 @@ class FNBRenderer(object): dc = wx.MemoryDC() dc.SelectObject(wx.Bitmap(1,1)) - # For GTK it seems that we must do this steps in order - # for the tabs will get the proper height on initialization - # on MSW, preforming these steps yields wierd results normalFont = wx.SystemSettings.GetFont(wx.SYS_DEFAULT_GUI_FONT) boldFont = normalFont - if "__WXGTK__" in wx.PlatformInfo: - boldFont.SetWeight(wx.FONTWEIGHT_BOLD) - dc.SetFont(boldFont) + boldFont.SetWeight(wx.FONTWEIGHT_BOLD) + dc.SetFont(boldFont) height = dc.GetCharHeight()