summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorSeverin Glöckner2020-11-15 16:40:06 +0100
committerSeverin Glöckner2020-11-15 16:40:06 +0100
commit2a3befc565bfcad2a2aa7adcdbaabdd0facb6fc6 (patch)
treef72afff00b80d11f59355fa3a917c44b2fa98f4a
parent23869f3b1ca36aca01f3a3e09bbb8e4e10a91f21 (diff)
downloadaur-2a3befc565bfcad2a2aa7adcdbaabdd0facb6fc6.tar.gz
fix scaling on non-GNOME desktops
(which do not run xsettings or gnome-settings-daemon)
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD23
-rw-r--r--xxe.install12
3 files changed, 34 insertions, 3 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 09f52c521d32..a3c7f12aea36 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = xmlmind-xmleditor
pkgdesc = IDE for editing XML files
pkgver = 9.4.1
- pkgrel = 1
+ pkgrel = 2
url = https://www.xmlmind.com/xmleditor
install = xxe.install
arch = any
diff --git a/PKGBUILD b/PKGBUILD
index c875db5d839c..217dd5ba3f6a 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,7 +4,7 @@ pkgname=xmlmind-xmleditor
_pkgname=xxe
pkgver=9.4.1
_pkgver=9_4_1
-pkgrel=1
+pkgrel=2
pkgdesc="IDE for editing XML files"
license=('Custom')
url="https://www.xmlmind.com/xmleditor"
@@ -29,6 +29,25 @@ prepare() {
--exec=xxe \
--categories='Development;IDE;Java'
+ # Set Java options with a launch script
+
+ cat << EOF > xxe.sh
+#!/bin/sh
+
+# Useful Java options:
+# -Dawt.useSystemAAFontSettings=on -> Required for proper scaling
+# -Dswing.aatext=true -> Optional
+# -Dsun.java2d.opengl=true -> Would probably cause issues with the context menus
+# -Djdk.gtk.version=3 -> Use gtk3 instead of gtk2 when using the GTK LAF
+# -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel -> Set LAF
+
+export _JAVA_OPTIONS="-Dawt.useSystemAAFontSettings=on -Dswing.aatext=true"
+
+exec /opt/xxe/bin/xxe
+EOF
+
+
+
# Save license in plain text format
# (downloading, using consistent headings, removing website navigation stuff and website footer)
curl https://www.xmlmind.com/xmleditor/license_xxe_perso.html | \
@@ -56,7 +75,6 @@ package() {
cp -a xxe-perso-${_pkgver} "${pkgdir}"/opt/xxe/
- ln -s /opt/xxe/bin/xxe "${pkgdir}"/usr/bin/xxe
ln -s /opt/xxe/bin/xxetool "${pkgdir}"/usr/bin/xxetool
ln -s /opt/xxe/bin/xmltool "${pkgdir}"/usr/bin/xmltool
ln -s /opt/xxe/bin/csscheck "${pkgdir}"/usr/bin/csscheck
@@ -75,6 +93,7 @@ package() {
"${pkgdir}"/usr/share/icons/hicolor/${size}x${size}/apps/xxe.png
done
+ install -Dm755 xxe.sh "${pkgdir}"/usr/bin/xxe
install -Dm644 xxe.desktop -t "${pkgdir}"/usr/share/applications/
install -Dm644 LICENSE -t "${pkgdir}"/usr/share/licenses/${_pkgname}/
diff --git a/xxe.install b/xxe.install
index c222f05aecf6..1fe3da3ad9d1 100644
--- a/xxe.install
+++ b/xxe.install
@@ -11,3 +11,15 @@ post_install() {
echo ""
echo ""
}
+
+post_upgrade() {
+ fix_scaling=$(vercmp 7.4.1-2 $2)
+ if [[ $fix_scaling -lt 0 ]]
+ then
+ echo ""
+ echo ">>> The _JAVA_OPTIONS variable is now set at launch to improve the UI-scaling."
+ echo ">>> You may want to reconsider enabliung UI-scaling if you had issues."
+ echo ">>> The setting is at Options -> Preferences -> General."
+ echo ""
+ fi
+}