From 4726819484e1ecf9200a7c6bf3e1eb18625d18da Mon Sep 17 00:00:00 2001 From: Daniel Collins Date: Tue, 27 Nov 2018 22:18:22 +0000 Subject: [PATCH] Rotate wxNotebook tabs label under wxGTK to match other ports wxMSW and wxOSX/Cocoa show the labels vertically for the tabs positioned on the left- or right-hand side of wxNotebook, but wxGTK showed them horizontally. Bring it in sync with the other ports by rotating the labels to draw them vertically as the other ports do in wxGTK too. Closes https://github.com/wxWidgets/wxWidgets/pull/1032 --- src/gtk/notebook.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/gtk/notebook.cpp b/src/gtk/notebook.cpp index 31978cb2b0..71bd4d8ec2 100644 --- a/src/gtk/notebook.cpp +++ b/src/gtk/notebook.cpp @@ -454,6 +454,12 @@ bool wxNotebook::InsertPage( size_t position, /* set the label text */ pageData->m_label = gtk_label_new(wxGTK_CONV(wxStripMenuCodes(text))); + + if (m_windowStyle & wxBK_LEFT) + gtk_label_set_angle(GTK_LABEL(pageData->m_label), 90); + if (m_windowStyle & wxBK_RIGHT) + gtk_label_set_angle(GTK_LABEL(pageData->m_label), 270); + gtk_box_pack_end(GTK_BOX(pageData->m_box), pageData->m_label, false, false, m_padding);