# Libreoffice UI
# --------------
# Reference: https://wiki.documentfoundation.org/Development/Environment_variables
#export SAL_USE_VCLPLUGIN=qt5   # gtk3, qt5, or gen. Default is gtk3. gtk3 can be slow on radeon.
#export SAL_VCL_QT5_USE_CAIRO=1 # prevent UI text corruption when SAL_USE_VCLPLUGIN=qt5
#export SAL_DISABLESKIA=1       # disable SKIA gui engine - may or may not help with sluggishness

# Qt5 Scaling Settings
# --------------------
# Reference: https://doc.qt.io/qt-5/highdpi.html
#export QT_AUTO_SCREEN_SCALE_FACTOR=1 # default is 0, leave at zero if we set below
#export QT_ENABLE_HIGHDPI_SCALING=1   # replacement for QT_AUTO_SCREEN_SCALE_FACTOR in Qt 5.14 onwards
#export QT_SCALE_FACTOR=2             # default 1. Fractional ok.
#export QT_SCREEN_SCALE_FACTORS="2;2" # for multiple screens. Default 1.
#export QT_FONT_DPI=96                # default is 96
#export QT_QPA_PLATFORM=wayland       # if using wayland

# GTK2 Scaling Settings
# ---------------------
# Sadly, GTK2 does not support scaling at all. However, Fatdog64 uses the value of the Xft.dpi
# Xresource to auto-scale legacy GTK2 setup scripts. Xft.dpi is set in $HOME/.Xresources.

# GTK3 Scaling Settings
# ---------------------
#export GDK_SCALE=2                   # default 1, this scales the entire UI element. Integer only.
#export GDK_DPI_SCALE=0.5             # default 1, this scales the TEXT only. Fractions ok.

# Fatdog64 GUI Scripts
# --------------------
# For 4K/HiDPI monitors: Use GTK3 for proper dialog scaling.
# Install the gtkdialog_gtk3_vte and yad_gtk3 packages.
# Then uncomment the lines below:
#export GTKDIALOG_BIN=gtkdialog_gtk3
#export YAD_BIN=yad_gtk3

# Java Scaling Settings
# ---------------------
# Add a runtime application option, e.g. -Dsun.java2d.uiScale=2 (integer).

# References
# -----------------
# https://wiki.archlinux.org/title/HiDPI
# https://unix.stackexchange.com/questions/596887/how-to-scale-the-resolution-display-of-the-desktop-and-or-applications
# https://web.archive.org/web/20250703070408/https://dec05eba.com/2021/10/11/x11-multiple-monitor-dpi-trick/
# About Xorg auto-detecting DPI https://wiki.archlinux.org/title/Xorg#Display_size_and_DPI and https://bbs.archlinux.org/viewtopic.php?id=271129
