diff options
author | Jan Cholasta | 2022-04-29 05:57:21 +0200 |
---|---|---|
committer | Jan Cholasta | 2022-04-29 05:57:21 +0200 |
commit | 81cc24ca6e7d0a70af4bf51b4c17deac0cfbf171 (patch) | |
tree | b13b3625c068fcf5cc193a54debd9ff7f3057beb | |
parent | a91d39547cff3b704d49a3637f191bce32e095e7 (diff) | |
download | aur-81cc24ca6e7d0a70af4bf51b4c17deac0cfbf171.tar.gz |
slade-3.2.0-2
-rw-r--r-- | .SRCINFO | 6 | ||||
-rw-r--r-- | 0001-Keep-up-wx3.0-compatibility.patch | 66 | ||||
-rw-r--r-- | 0001-compatibility-with-stable-wxWidgets.patch | 43 | ||||
-rw-r--r-- | PKGBUILD | 8 |
4 files changed, 73 insertions, 50 deletions
@@ -1,7 +1,7 @@ pkgbase = slade pkgdesc = SLADE3 Doom editor pkgver = 3.2.0 - pkgrel = 1 + pkgrel = 2 url = http://slade.mancubus.net/ arch = i686 arch = x86_64 @@ -22,9 +22,9 @@ pkgbase = slade depends = wxgtk3>=3.0 depends = zlib source = https://github.com/sirjuddington/SLADE/archive/3.2.0.tar.gz - source = 0001-compatibility-with-stable-wxWidgets.patch + source = 0001-Keep-up-wx3.0-compatibility.patch sha256sums = e23cb1238d184a13912231c22e96208d6dff4eb55f38181ae92d2b67f205dfa5 - sha256sums = ababb76f64b4cfbdabd283ffb8e5d7900f270893161433e84a93f2655767d5d2 + sha256sums = 8f89b81ec2ef11581ddac8592ab45a3a90ea02711b07a732ee931359883350dc pkgname = slade diff --git a/0001-Keep-up-wx3.0-compatibility.patch b/0001-Keep-up-wx3.0-compatibility.patch new file mode 100644 index 000000000000..5805d2f3377f --- /dev/null +++ b/0001-Keep-up-wx3.0-compatibility.patch @@ -0,0 +1,66 @@ +From c25a58ec813d0f125dfee3a894969c5e604b1ab7 Mon Sep 17 00:00:00 2001 +From: Simon Judd <sirjuddington@gmail.com> +Date: Thu, 14 Apr 2022 21:52:16 -0700 +Subject: [PATCH] Keep up wx3.0 compatibility + +I'd like to drop it ideally, but for now it'll stay + +Fix #1336 +--- + src/Graphics/Icons.cpp | 15 +++++++++++++++ + src/UI/SAuiTabArt.cpp | 5 ++++- + 2 files changed, 19 insertions(+), 1 deletion(-) + +diff --git a/src/Graphics/Icons.cpp b/src/Graphics/Icons.cpp +index 61d5475c..67147f7e 100644 +--- a/src/Graphics/Icons.cpp ++++ b/src/Graphics/Icons.cpp +@@ -373,7 +373,22 @@ wxBitmap loadPNGIcon(const IconDef& icon, int size, Point2i padding) + bool icons::loadIcons() + { + // Check for dark mode ++#if wxMAJOR_VERSION >= 3 && wxMINOR_VERSION >= 1 + ui_icons_dark = wxSystemSettings::GetAppearance().IsDark(); ++#else ++ auto fg = wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT); ++ auto fg_r = fg.Red(); ++ auto fg_g = fg.Green(); ++ auto fg_b = fg.Blue(); ++ auto bg = wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW); ++ auto bg_r = bg.Red(); ++ auto bg_g = bg.Green(); ++ auto bg_b = bg.Blue(); ++ wxColour::MakeGrey(&fg_r, &fg_g, &fg_b); ++ wxColour::MakeGrey(&bg_r, &bg_g, &bg_b); ++ log::info("DARK MODE CHECK: FG {} BG {}", fg_r, bg_r); ++ ui_icons_dark = fg_r > bg_r; ++#endif + + // Get slade.pk3 + auto* res_archive = app::archiveManager().programResourceArchive(); +diff --git a/src/UI/SAuiTabArt.cpp b/src/UI/SAuiTabArt.cpp +index 15aad09e..240de8b9 100644 +--- a/src/UI/SAuiTabArt.cpp ++++ b/src/UI/SAuiTabArt.cpp +@@ -542,6 +542,7 @@ void SAuiDockArt::DrawCaption(wxDC& dc, wxWindow* window, const wxString& text, + int caption_offset = 0; + if (pane.icon.IsOk()) + { ++#if wxMAJOR_VERSION >= 3 && wxMINOR_VERSION >= 1 + // Ensure the icon fits into the title bar. + wxSize iconSize = pane.icon.GetSize(); + if (iconSize.y > rect.height) +@@ -554,7 +555,9 @@ void SAuiDockArt::DrawCaption(wxDC& dc, wxWindow* window, const wxString& text, + dc.DrawBitmap(pane.icon, + rect.x+xOffset, rect.y+(rect.height-pane.icon.GetHeight())/2, + true); +- ++#else ++ DrawIcon(dc, rect, pane); ++#endif + caption_offset += pane.icon.GetWidth() + px3; + } + +-- +2.36.0 + diff --git a/0001-compatibility-with-stable-wxWidgets.patch b/0001-compatibility-with-stable-wxWidgets.patch deleted file mode 100644 index 7b2508f80c07..000000000000 --- a/0001-compatibility-with-stable-wxWidgets.patch +++ /dev/null @@ -1,43 +0,0 @@ -From be61a443c87e97d7a1b8716428c7e3fedcc7a34c Mon Sep 17 00:00:00 2001 -From: Jan Cholasta <jan@cholasta.net> -Date: Thu, 14 Apr 2022 14:15:13 +0200 -Subject: [PATCH] compatibility with stable wxWidgets - ---- - src/Graphics/Icons.cpp | 2 ++ - src/UI/SAuiTabArt.cpp | 5 ++++- - 2 files changed, 6 insertions(+), 1 deletion(-) - -diff --git a/src/Graphics/Icons.cpp b/src/Graphics/Icons.cpp -index 61d5475c..8c6e5c44 100644 ---- a/src/Graphics/Icons.cpp -+++ b/src/Graphics/Icons.cpp -@@ -373,7 +373,9 @@ wxBitmap loadPNGIcon(const IconDef& icon, int size, Point2i padding) - bool icons::loadIcons() - { - // Check for dark mode -+#if wxCHECK_VERSION(3, 1, 0) - ui_icons_dark = wxSystemSettings::GetAppearance().IsDark(); -+#endif - - // Get slade.pk3 - auto* res_archive = app::archiveManager().programResourceArchive(); -diff --git a/src/UI/SAuiTabArt.cpp b/src/UI/SAuiTabArt.cpp -index 15aad09e..1fa29b73 100644 ---- a/src/UI/SAuiTabArt.cpp -+++ b/src/UI/SAuiTabArt.cpp -@@ -550,7 +550,10 @@ void SAuiDockArt::DrawCaption(wxDC& dc, wxWindow* window, const wxString& text, - } - - // Draw the icon centered vertically -- int xOffset = window->FromDIP(2); -+ int xOffset = 2; -+#if wxCHECK_VERSION(3, 1, 0) -+ xOffset = window->FromDIP(xOffset); -+#endif - dc.DrawBitmap(pane.icon, - rect.x+xOffset, rect.y+(rect.height-pane.icon.GetHeight())/2, - true); --- -2.35.1 - @@ -2,7 +2,7 @@ pkgname=slade pkgver=3.2.0 -pkgrel=1 +pkgrel=2 pkgdesc='SLADE3 Doom editor' arch=('i686' 'x86_64') url='http://slade.mancubus.net/' @@ -23,14 +23,14 @@ depends=('bzip2' makedepends=('cmake' 'p7zip') source=("https://github.com/sirjuddington/SLADE/archive/${pkgver}.tar.gz" - '0001-compatibility-with-stable-wxWidgets.patch') + '0001-Keep-up-wx3.0-compatibility.patch') sha256sums=('e23cb1238d184a13912231c22e96208d6dff4eb55f38181ae92d2b67f205dfa5' - 'ababb76f64b4cfbdabd283ffb8e5d7900f270893161433e84a93f2655767d5d2') + '8f89b81ec2ef11581ddac8592ab45a3a90ea02711b07a732ee931359883350dc') prepare() { cd SLADE-${pkgver} - patch -i "$srcdir"/0001-compatibility-with-stable-wxWidgets.patch -p 1 + patch -i "$srcdir"/0001-Keep-up-wx3.0-compatibility.patch -p 1 } build() { |