summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2021-10-08 01:43:46 +0200
committerSlávek Banko <slavek.banko@axis.cz>2021-10-08 04:20:20 +0200
commit191f4274101d748882f581487a088012f03189d6 (patch)
tree215eb4085bb589491766aa5e17614eaae95f7c3f
parenta1a836e148f3d58ce1e330b3d2b2dca5b151d44a (diff)
downloadtdebase-191f4274101d748882f581487a088012f03189d6.tar.gz
tdebase-191f4274101d748882f581487a088012f03189d6.zip
starttde: Add dynamic determination of default value for forceFontDPIEnable
depending on the current value of forceFontDPI. This solves the automatic transition of configuration after adding support for variable font DPI. Signed-off-by: Slávek Banko <slavek.banko@axis.cz> (cherry picked from commit 48077a30f9997448365742e3c7060bb7ad862aa7)
-rwxr-xr-xstarttde9
1 files changed, 8 insertions, 1 deletions
diff --git a/starttde b/starttde
index 88e1bdaff..75b412a1a 100755
--- a/starttde
+++ b/starttde
@@ -364,6 +364,12 @@ if [ -d "$tdehome" ]; then
fi
fi
+# Get current font DPI configuration
+CUR_ForceFontDPI="`$TDEDIR/bin/kreadconfig --file kcmfonts --group General --key forceFontDPI --default 0`"
+CUR_ForceFontDPIEnable=false
+[ $CUR_ForceFontDPI -gt 0 ] && CUR_ForceFontDPIEnable=true
+unset CUR_ForceFontDPI
+
# Please see tdestartupconfig source for usage.
mkdir -m 700 -p "$tdehome/share"
mkdir -m 700 -p "$tdehome/share/config"
@@ -377,10 +383,11 @@ kcmrandrrc [Screen0]
kcmrandrrc [Screen1]
kcmrandrrc [Screen2]
kcmrandrrc [Screen3]
-kcmfonts General forceFontDPIEnable false
+kcmfonts General forceFontDPIEnable ${CUR_ForceFontDPIEnable}
kcmfonts General forceFontDPI 0
EOF
$TDEDIR/bin/tdestartupconfig
+unset CUR_ForceFontDPIEnable
if test $? -ne 0; then
xmessage -center -geometry 500x100 "Could not start tdestartupconfig. Check your installation."
fi