git.iko.soy/typeable/nixpkgs
on master help sign in
kde5.startkde: update from plasma-workspace-5.7.3

* Read the screen scale factor (for HiDPI displays) from KScreen correctly. * Disable automaticy scale factor detection in Qt applications. * Force font DPI at startup, if requested. * Allow kded to invoke kbuildsycoca5 automatically.

commit1df7279384550249717061c28bf2d914801d28db authorThomas Tuegel <ttuegel@gmail.com> dateTue 23 Aug 2016, 08:22 (10 years ago) parent1ad6cff
1 file changed+12−8
pkgs/desktops/kde-5/plasma/startkde/startkde.sh+12−8
pkgs/desktops/kde-5/plasma/startkde/startkde.sh+12−8
@@ -119,9 +119,12 @@ if test $returncode -ne 0; then
119119fi
120120[ -r $configDir/startupconfig ] && . $configDir/startupconfig
121121
122−if test "$kdeglobals_kscreen_scalefactor" -ne 1; then
123− export QT_DEVICE_PIXEL_RATIO=$kdeglobals_kscreen_scalefactor
122+if [ "$kdeglobals_kscreen_screenscalefactors" ]; then
123+ export QT_SCREEN_SCALE_FACTORS="$kdeglobals_kscreen_screenscalefactors"
124124fi
125+#Manually disable auto scaling because we are scaling above
126+#otherwise apps that manually opt in for high DPI get auto scaled by the developer AND manually scaled by us
127+export QT_AUTO_SCREEN_SCALE_FACTOR=0
125128
126129XCURSOR_PATH=~/.icons
127130IFS=":" read -r -a xdgDirs <<< "$XDG_DATA_DIRS"
@@ -159,6 +162,12 @@ unset THEME
159162#
160163xsetroot -cursor_name left_ptr
161164
165+if test "$kcmfonts_general_forcefontdpi" -ne 0; then
166+ xrdb -quiet -merge -nocpp <<EOF
167+Xft.dpi: $kcmfonts_general_forcefontdpi
168+EOF
169+fi
170+
162171dl=$DESKTOP_LOCKED
163172unset DESKTOP_LOCKED # Don't want it in the environment
164173
@@ -240,7 +249,7 @@ KDE_SESSION_VERSION=5
240249export KDE_SESSION_VERSION
241250xprop -root -f KDE_SESSION_VERSION 32c -set KDE_SESSION_VERSION 5
242251
243−KDE_SESSION_UID=`id -ru`
252+KDE_SESSION_UID=$(id -ru)
244253export KDE_SESSION_UID
245254
246255XDG_CURRENT_DESKTOP=KDE
@@ -278,11 +287,6 @@ fi
278287
279288qdbus org.kde.KSplash /KSplash org.kde.KSplash.setStage kinit
280289
281−# (NixOS) Run kbuildsycoca5 before starting the user session because things
282−# may be missing or moved if they have run nixos-rebuild and it may not be
283−# possible for them to start Konsole to run it manually!
284−kbuildsycoca5
285−
286290# finally, give the session control to the session manager
287291# see kdebase/ksmserver for the description of the rest of the startup sequence
288292# if the KDEWM environment variable has been set, then it will be used as KDE's