File 0001-update-wxFont-and-friends-for-libwxgtk32-1-deprecation-warnings.patch of Package radiotray-ng
From 5a2e680792440c5f1003bc3e6a0adce28b7e774e Mon Sep 17 00:00:00 2001
From: Sandy Patterson <xandey@gmail.com>
Date: Tue, 27 Jun 2023 12:55:36 -0400
Subject: [PATCH] update wxFont and friends for libwxgtk3.2-1 deprecation warnings
fixes #186, ref #200
---
src/radiotray-ng/gui/editor/station_drop_target.cpp | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/radiotray-ng/gui/editor/station_drop_target.cpp b/src/radiotray-ng/gui/editor/station_drop_target.cpp
index 82bcb40..8734d12 100644
--- a/src/radiotray-ng/gui/editor/station_drop_target.cpp
+++ b/src/radiotray-ng/gui/editor/station_drop_target.cpp
@@ -109,7 +109,7 @@ StationDragAndDrop::makeDragImage(const std::string& text, const wxColour* backg
wxBitmap tmp_bitmap(24, 24);
wxMemoryDC tmp_dc;
tmp_dc.SelectObject(tmp_bitmap);
- tmp_dc.SetFont(wxFont(DRAG_FONT_POINT, wxSWISS, wxITALIC, wxBOLD));
+ tmp_dc.SetFont(wxFont(DRAG_FONT_POINT, wxFONTFAMILY_SWISS, wxFONTSTYLE_ITALIC, wxFONTWEIGHT_BOLD));
int text_width, text_height;
tmp_dc.GetTextExtent(wxT("u"), &text_width, &text_height);
@@ -121,17 +121,17 @@ StationDragAndDrop::makeDragImage(const std::string& text, const wxColour* backg
dc.Clear();
// paint the background
- dc.SetPen(wxPen(*textcolor, 1, wxSOLID));
- dc.SetBrush(wxBrush(*background, wxSOLID));
+ dc.SetPen(wxPen(*textcolor, 1, wxPENSTYLE_SOLID));
+ dc.SetBrush(wxBrush(*background, wxBRUSHSTYLE_SOLID));
dc.DrawRectangle(0, 0, width, height);
std::string output = text;
if (output.size() > MAX_DRAG_TEXT)
{
output = text.substr(0, MAX_DRAG_TEXT - DRAG_TAIL.size()) + DRAG_TAIL;
}
wxString tmpstr(output.c_str(), wxConvUTF8);
- dc.SetFont(wxFont(DRAG_FONT_POINT, wxSWISS, wxITALIC, wxBOLD));
+ dc.SetFont(wxFont(DRAG_FONT_POINT, wxFONTFAMILY_SWISS, wxFONTSTYLE_ITALIC, wxFONTWEIGHT_BOLD));
dc.SetTextForeground(*textcolor);
dc.DrawText(tmpstr, ((text_width / 2) + 1), (text_height / 2));
--
libgit2 1.7.2