KDesktop

From Trinity Desktop Project Wiki
Revision as of 20:10, 15 August 2024 by Blu256 (talk | contribs) (→‎Drop shadows: some wording fixes)
Jump to navigation Jump to search

KDesktop

KDesktop is the Trinity component responsible for drawing the desktop: the wallpaper and the icons on it.

Customization

Drop shadows

Shadows on the desktop icon labels can be configured in great detail since KDE 3.1 to produce results different than the default "halo" effect. Unfortunately, there is yet no GUI provided for tweaking the drop shadow, but you can still do so by editing the appropriate configuration file.

Inside the file $TDEHOME/share/config/kdesktoprc in the [FMSettings] section, you'll want to place a line containing something like the following:

ShadowParameters=<comma-separated parameters>

The option accepts a string of comma-separated parameters in the following format:

Parameter
number
Description
1, 2 The first two entries are the X and Y offsets
(0,0 means right behind the text)
3, 4 The following two determine the halo (factor, max opacity)
0-255 (0 = transparent, 255 = opaque)
5 Thickness (how large the halo is).
Usually 3-5 pixels, though most seem to prefer a thickness of about 2
6 Selected algorithm
Value Algorithm Description
1 DefaultDecay the default AXIS/DIAGONAL_FACTOR based algorithm,
a simple algorithm with 3 pixels thickness
2 DoubleLinearDecay the decay factor is 1/dx+dy (!!! not yet implemented !!!),
a slower algorithm where the influence of a pixel is qGray(px)/(abs(dx) + abs(dy) +1)
3 RadialDecay decay factor is 1/sqrt(dx*dx + dy*dy) (!!! not yet implemented !!!)
a very slow algorithm where the influence of a pixel is qGray(px)/(sqrt(sqr(dx) + sqr(dy)) +1)
4 NoDecay decay factor is 1 always,
a nice/fast algorithm proposed by Bernardo Hung
7 Selection (inverse video or use the background text, boolean 0/1)
This setting affects how the text/halo is drawn when the icon is selected
Value Meaning Description
0 Inverse Video Invert the text and shadow color to draw the icon's dropshadow
1 Background Text Use the current text and shadow color to draw the icon's dropshadow

Also, the following options are aliases of existing options:

 ShadowTextColor      -	(Simply an alias for NormalTextColor)
 ShadowTextBackground -	(Simply an alias for ItemTextBackground)

Some premade examples you can just copy-paste:

Value Description
2, 2, 4.0, 100.0, 2, 2, 1 KDE 3.2
0, 0, 4.0, 255.0, 3, 0, 0 KDE 3.1
0, 1, 16.0, 192.0, 2, 4, 0 OS X
1, 1, 32.0, 139.0, 2, 4, 0 Windows XP
0, 0, 4.0, 170.0, 1, 4, 0 Soft outline

So, for a Windows XP style drop shadow, you'd put in your desktop config:

ShadowParameters=1,1,32.0,139.0,2,4,0

For these new settings to take effect, you can disable then re-enable the either desktop drop shadows or the desktop icons.

A quick way to do so is to copy-paste the following command into a terminal emulator:

$ dcop kdesktop default setIconsEnabled false ; dcop kdesktop default setIconsEnabled true


Original author: Abby <abby@evilhack.com> (source)