1
<?xml version="1.0" encoding="UTF-8"?>
3
<display id="win" anchor="ne" window-flags="sticky, below">
5
<meta name="SideCandy-Title"
8
description="A simple Title for SideCandy."
9
author="H.Humpel (Bjoern Koch)"
11
website="http://www.uamod.org/desklets/sidecandy-title.html"
13
copyright="(C) 2006-2011 H.Humpel (Bjoern Koch)"
14
preview="gfx/SideCandy-Title-preview.png" />
18
<group id="slider" width="5cm" height="1cm"
19
on-click="if (sc_behavior == 'click'): slide(self, SC_IN, SC_OUT)"
20
on-doubleclick="if (sc_behavior == 'double'): slide(self, SC_IN, SC_OUT)"
21
on-enter="if (sc_behavior == 'enter'): slide(self, SC_IN, SC_OUT)"
22
on-leave="if (sc_behavior == 'enter'): slide(self, SC_IN, SC_OUT)">
24
<group id="panel" width="100%" height="100%">
25
<group id="bg" width="100%" height="100%" bg-uri="gfx/bg/none.png"/>
27
<group id="icon_group" width="1cm" height="100%">
28
<image id="icon" uri="gfx/bg/none.png"
29
image-width="1cm" image-height="1cm"
30
anchor="center" x="50%" y="50%" width="100%" />
33
<group id="info_group" width="4cm" height="100%">
34
<label id="title" x="50%" y="50%" anchor="center"
35
wrap-at="100%" font="Sans Bold 8" color="#EFEFEFFF" value="Title"/>
42
<prefs callback="my_callback">
43
<!-- SideCandy Prefs -->
44
<page label="SideCandy" icon="gfx/icons/SideCandy.png">
45
<enum label="Stay on top:" bind="sc_on_top"
46
help="Should the display stay on top?">
47
<item label="Never" value="never"/>
48
<item label="Always" value="always"/>
49
<item label="When slid in" value="whenin"/>
50
<item label="When slid out" value="whenout"/>
53
<title label="Sliding"/>
54
<enum label="Orientation:" bind="sc_side"
55
help="The orientation of the display.">
56
<item label="Left" value="left"/>
57
<item label="Right" value="right"/>
59
<integer label="Delay:" bind="sc_slide_timer"
60
min="0" max="100" increment="1"
61
help="The time in milliseconds between the steps when sliding (range: 0 (fast) to 100 (slow))."/>
62
<enum label="Behavior:" bind="sc_behavior"
63
help="When should the display slide?">
64
<item label="Slide on mouse click" value="click"/>
65
<item label="Slide on double click" value="double"/>
66
<item label="Slide on entering" value="enter"/>
67
<item label="Never slide" value="never"/>
70
<title label="Borders"/>
71
<enum label="Border style:" bind="sc_border"
72
help="The border style to be used.">
73
<item label="LTVCandy" value="lt"/>
74
<item label="Round" value="round"/>
75
<item label="Drop Shadow" value="tmkt"/>
77
<boolean label="Left border" bind="sc_border_left"
78
help="Show the left border."/>
79
<boolean label="Right border" bind="sc_border_right"
80
help="Show the right border."/>
81
<boolean label="Top border" bind="sc_border_top"
82
help="Show the top border."/>
83
<boolean label="Bottom border" bind="sc_border_bottom"
84
help="Show the bottom border."/>
86
<title label="Background"/>
87
<uri label="Background image:" bind="Dsp.bg.bg_uri"
88
help="The path to the image to be used as background."/>
89
<boolean label="Show background" bind="Dsp.bg.visible"
90
help="Display the background image."/>
93
<!-- Appearance Prefs -->
94
<page label="Appearance" icon="gfx/icons/preferences-desktop-wallpaper.png">
96
<unit label="Width:" bind="width"
97
min="0.5" increment="0.1"
98
help="The width of the display (default: 5cm )."/>
99
<unit label="Height:" bind="height"
100
min="0.5" increment="0.1"
101
help="The height of the display (default: 1cm )."/>
103
<title label="Icon"/>
104
<boolean label="Use Icon" bind="icon_use"
105
help="Use the Icon and its space."/>
106
<boolean label="Display Icon" bind="icon_display"
107
help="Display the Icon." />
108
<uri label="Icon image:" bind="Dsp.icon.uri"
109
help="The path to the Icon to be displayed."/>
110
<float label="Scale:" bind="Dsp.icon.scale"
111
min="0.1" max="2.0" increment="0.1"
112
help="Scale the Icon (range: 0.1 to 2.0)."/>
113
<float label="Opacity: " bind="Dsp.icon.opacity"
114
min="0.0" max="1.0" increment="0.1"
115
help="The opacity for the Icon (range: 0.0 to 1.0)."/>
116
<enum label="Anchor:" bind="Dsp.icon.anchor"
117
help="The anchor for the Icon.">
118
<item label="center" value="center"/>
119
<item label="north" value="n"/>
120
<item label="north east" value="ne"/>
121
<item label="east" value="e"/>
122
<item label="south east" value="se"/>
123
<item label="south" value="s"/>
124
<item label="south west" value="sw"/>
125
<item label="west" value="w"/>
126
<item label="north west" value="nw"/>
131
<page label="Title" icon="gfx/icons/stock_font.png">
132
<string label="Title:" bind="Dsp.title.value"
133
help="The Title to be displayed."/>
134
<font label="Title font: " bind="Dsp.title.font"
135
help="The font to be used for the Title" />
136
<color label="Title color:" bind="Dsp.title.color"
137
help="The color to be used for the Title." />
138
<enum label="Anchor:" bind="Dsp.title.anchor"
139
help="The anchor for the Icon.">
140
<item label="center" value="center"/>
141
<item label="north" value="n"/>
142
<item label="north east" value="ne"/>
143
<item label="east" value="e"/>
144
<item label="south east" value="se"/>
145
<item label="south" value="s"/>
146
<item label="south west" value="sw"/>
147
<item label="west" value="w"/>
148
<item label="north west" value="nw"/>
155
<!-- this loads the SideCandy magic -->
156
<script uri="candy.script"/>
161
width = get_config("width", Unit(5, CM))
162
height = get_config("height", Unit(1, CM))
163
icon_use = get_config("icon_use", False)
164
icon_display = get_config("icon_display", False)
167
def my_callback(key, value):
168
sc_prefs_cb(key, value)
170
Dsp.slider.width = value
171
Dsp.panel.width = value
172
Dsp.info_group.width = Unit(Dsp.slider.width.as_cm()-Dsp.icon_group.width.as_cm(), CM)
173
elif key == "height":
174
Dsp.slider.height = value
175
elif key == "icon_display":
176
Dsp.icon.visible = value
177
elif key == "icon_use":
178
Dsp.icon_group.visible = value
180
Dsp.icon_group.width = Unit(1, CM)
182
Dsp.icon_group.width = Unit(0, CM)
183
if sc_side == "left":
184
icon_group_x = Dsp.slider.width.as_cm()-Dsp.icon_group.width.as_cm()
185
Dsp.icon_group.x = Unit(icon_group_x, CM)
186
Dsp.icon_group.y = Unit(0, CM)
187
Dsp.info_group.x = Unit(0, CM)
188
Dsp.info_group.y = Unit(0, CM)
189
Dsp.info_group.width = Unit(Dsp.slider.width.as_cm()-Dsp.icon_group.width.as_cm(), CM)
191
Dsp.icon_group.x = Unit(0, CM)
192
Dsp.icon_group.y = Unit(0, CM)
193
Dsp.info_group.x = Unit(Dsp.icon_group.width.as_cm(), CM)
194
Dsp.info_group.y = Unit(0, CM)
195
Dsp.info_group.width = Unit(Dsp.slider.width.as_cm()-Dsp.icon_group.width.as_cm(), CM)
196
lt = sc_border_left and 5 or 0
197
rt = sc_border_right and 5 or 0
198
win_width = lt + rt + Dsp.slider.width.as_px()
199
Dsp.win.width = Unit(win_width, PX)