linuxmint / xreader

A generic Document Reader
GNU General Public License v2.0
220 stars 62 forks source link

Background colour of presentation view fixed. #600

Closed tfpf closed 1 year ago

tfpf commented 1 year ago

Fixes https://github.com/linuxmint/xreader/issues/599. This is simply a port of https://github.com/mate-desktop/atril/commit/1d90b700c7bf5036e9f1e7ddd0adb09bd39467ce.

I don't fully understand why gdk_window_set_background_rgba stopped working, but with these changes, the 'b' and 'w' keyboard shortcuts appear to work! Also, the default background colour in presentation mode is black, so the text on the last screen is readable.

tfpf commented 1 year ago

Xreader failed to build on LMDE 5 on the GitHub Actions pipeline. I observed the same on my LMDE 5 VM. The problem appears to be that sudo mk-build-deps -ir looks for libwebkit2gtk-4.1-dev, and fails to find it. (But I am not sure if that's why the GitHub Action failed as well. I don't see any similar error messages in the log.)

With the following change (which basically reverses e09376eff6e54b1d31d5e50a6e95495bf7017052):

diff --git a/debian/control b/debian/control
index d21ffa3..f8aa84e 100644
--- a/debian/control
+++ b/debian/control
@@ -19,7 +19,7 @@ Build-Depends: debhelper-compat (= 12),
                libsm-dev,
                libspectre-dev,
                libtiff-dev,
-               libwebkit2gtk-4.1-dev (>= 2.4.3),
+               libwebkit2gtk-4.0-dev (>= 2.4.3),
                libxapp-dev (>= 1.9.0),
                libx11-dev,
                libxml2-dev,
diff --git a/meson.build b/meson.build
index b52018f..9a80ac0 100644
--- a/meson.build
+++ b/meson.build
@@ -111,7 +111,7 @@ endif
 thumbnailer_mime_types = xreader_mime_types

 if get_option('epub')
-    webkit = dependency('webkit2gtk-4.1', version: '>= 2.4.3')
+    webkit = dependency('webkit2gtk-4.0', version: '>= 2.4.3')
     backend_subdirs += 'epub'
     xreader_mime_types += 'application/epub+zip;'
 endif

Xreader was built successfully on my LMDE 5 VM.

mtwebster commented 1 year ago

There's no plan (for now) to do another LMDE5 release, as Debian Bookworm is close to release, and we'll be working on LMDE6 instead.

I just fixed the build so it'll still use the older library if that's the only one available.