Code view:

A painting is a person's account of this edit as text, recorded independently of the node mapping - a rendering often has several equally defensible answers where the mapping has one. Deletions and insertions carry no position on the opposite side in a painting, so that panel draws no caret for them.

Before

…lines 1–144 unchanged (144 lines)
145--- Set the size of a single icon.
146--
147-- If this is set to nil, then the size is picked dynamically based on the
148-- available space. Otherwise, any single icon has a size of `size`x`size`.
149--
150-- @property base_size
151-- @tparam integer|nil base_size The base size
152-- @propemits true false
153
154function systray:set_base_size(size)
155 base_size = get_args(self, size)
156 if instance then
157 instance:emit_signal("widget::layout_changed")
158 instance:emit_signal("property::base_size", size)
159 end
160end
161
162--- Decide between horizontal or vertical display.
163--
164-- @property horizontal
165-- @tparam boolean horizontal Use horizontal mode?
166-- @propemits true false
167
168function systray:set_horizontal(horiz)
169 horizontal = get_args(self, horiz)
170 if instance then
171 instance:emit_signal("widget::layout_changed")
172 instance:emit_signal("property::horizontal", horiz)
173 end
174end
175
176--- Should the systray icons be displayed in reverse order?
177--
178-- @property reverse
179-- @tparam boolean reverse Display in reverse order.
180-- @propemits true false
181
182function systray:set_reverse(rev)
183 reverse = get_args(self, rev)
184 if instance then
185 instance:emit_signal("widget::redraw_needed")
…lines 186–190 unchanged (5 lines)
191--
192-- This can either be a screen, in which case the systray will be displayed on
193-- exactly that screen, or the string `"primary"`, in which case it will be
194-- visible on the primary screen. The default value is "primary".
195--
196-- @property screen
197-- @tparam screen|"primary" screen The screen to display on.
198-- @propemits true false
199
200function systray:set_screen(s)
201 display_on_screen = get_args(self, s)
202 if instance then
203 instance:emit_signal("widget::layout_changed")
…lines 204–253 unchanged (50 lines)

After

…lines 1–144 unchanged (144 lines)
145--- Set the size of a single icon.
146--
147-- If this is set to nil, then the size is picked dynamically based on the
148-- available space. Otherwise, any single icon has a size of `size`x`size`.
149--
150-- @property base_size
151-- @tparam[opt=nil] integer|nil base_size The base size
152-- @propemits true false
153
154function systray:set_base_size(size)
155 base_size = get_args(self, size)
156 if instance then
157 instance:emit_signal("widget::layout_changed")
158 instance:emit_signal("property::base_size", size)
159 end
160end
161
162--- Decide between horizontal or vertical display.
163--
164-- @property horizontal
165-- @tparam[opt=true] boolean horizontal Use horizontal mode?
166-- @propemits true false
167
168function systray:set_horizontal(horiz)
169 horizontal = get_args(self, horiz)
170 if instance then
171 instance:emit_signal("widget::layout_changed")
172 instance:emit_signal("property::horizontal", horiz)
173 end
174end
175
176--- Should the systray icons be displayed in reverse order?
177--
178-- @property reverse
179-- @tparam[opt=false] boolean reverse Display in reverse order.
180-- @propemits true false
181
182function systray:set_reverse(rev)
183 reverse = get_args(self, rev)
184 if instance then
185 instance:emit_signal("widget::redraw_needed")
…lines 186–190 unchanged (5 lines)
191--
192-- This can either be a screen, in which case the systray will be displayed on
193-- exactly that screen, or the string `"primary"`, in which case it will be
194-- visible on the primary screen. The default value is "primary".
195--
196-- @property screen
197-- @tparam[opt=nil] screen|"primary" screen The screen to display on.
198-- @propemits true false
199
200function systray:set_screen(s)
201 display_on_screen = get_args(self, s)
202 if instance then
203 instance:emit_signal("widget::layout_changed")
…lines 204–253 unchanged (50 lines)

Before

chunk
comment
-- "--"
comment_content "------------------------------------------------------------"...
comment
-- "--"
comment_content " Container for the various system tray icons."
comment
-- "--"
comment_content ""
comment
-- "--"
comment_content " @author Uli Schlachter"
comment
-- "--"
comment_content " @copyright 2010 Uli Schlachter"
comment
-- "--"
comment_content " @widgetmod wibox.widget.systray"
comment
-- "--"
comment_content " @supermodule wibox.widget.base"
comment
-- "--"
comment_content "------------------------------------------------------------"...
variable_declaration
local "local"
assignment_statement
variable_list
identifier "wbase"
= "="
expression_list
function_call
identifier "require"
arguments
( "("
string
" "\""
string_content "wibox.widget.base"
" "\""
) ")"
variable_declaration
local "local"
assignment_statement
variable_list
identifier "drawable"
= "="
expression_list
function_call
identifier "require"
arguments
( "("
string
" "\""
string_content "wibox.drawable"
" "\""
) ")"
variable_declaration
local "local"
assignment_statement
variable_list
identifier "beautiful"
= "="
expression_list
function_call
identifier "require"
arguments
( "("
string
" "\""
string_content "beautiful"
" "\""
) ")"
variable_declaration
local "local"
assignment_statement
variable_list
identifier "gtable"
= "="
expression_list
function_call
identifier "require"
arguments
( "("
string
" "\""
string_content "gears.table"
" "\""
) ")"
variable_declaration
local "local"
assignment_statement
variable_list
identifier "capi"
= "="
expression_list
table_constructor
{ "{"
field
identifier "awesome"
= "="
identifier "awesome"
, ","
field
identifier "screen"
= "="
identifier "screen"
} "}"
variable_declaration
local "local"
assignment_statement
variable_list
identifier "setmetatable"
= "="
expression_list
identifier "setmetatable"
variable_declaration
local "local"
assignment_statement
variable_list
identifier "error"
= "="
expression_list
identifier "error"
variable_declaration
local "local"
assignment_statement
variable_list
identifier "abs"
= "="
expression_list
dot_index_expression
identifier "math"
. "."
identifier "abs"
variable_declaration
local "local"
assignment_statement
variable_list
identifier "systray"
= "="
expression_list
table_constructor
{ "{"
field
identifier "mt"
= "="
table_constructor
{ "{"
} "}"
} "}"
variable_declaration
local "local"
assignment_statement
variable_list
identifier "instance"
= "="
expression_list
nil "nil"
variable_declaration
local "local"
assignment_statement
variable_list
identifier "horizontal"
= "="
expression_list
true "true"
variable_declaration
local "local"
assignment_statement
variable_list
identifier "base_size"
= "="
expression_list
nil "nil"
variable_declaration
local "local"
assignment_statement
variable_list
identifier "reverse"
= "="
expression_list
false "false"
variable_declaration
local "local"
assignment_statement
variable_list
identifier "display_on_screen"
= "="
expression_list
string
" "\""
string_content "primary"
" "\""
comment
-- "--"
comment_content "- The systray background color."
comment
-- "--"
comment_content ""
comment
-- "--"
comment_content " Please note that only solid+opaque colors are supported. It"...
comment
-- "--"
comment_content " support gradients, patterns or transparent colors."
comment
-- "--"
comment_content ""
comment
-- "--"
comment_content " @beautiful beautiful.bg_systray"
comment
-- "--"
comment_content " @tparam string bg_systray The color (string like \"#ff0000\" "...
comment
-- "--"
comment_content "- The maximum number of rows for systray icons. Icons will f"...
comment
-- "--"
comment_content " current column (orthogonally to the systray direction) befo"...
comment
-- "--"
comment_content " filling the next column."
comment
-- "--"
comment_content ""
comment
-- "--"
comment_content " @beautiful beautiful.systray_max_rows"
comment
-- "--"
comment_content " @tparam[opt=1] integer systray_max_rows The positive number"...
comment
-- "--"
comment_content "- The systray icon spacing."
comment
-- "--"
comment_content ""
comment
-- "--"
comment_content " @beautiful beautiful.systray_icon_spacing"
comment
-- "--"
comment_content " @tparam[opt=0] integer systray_icon_spacing The icon spacin"...
function_declaration (+42 nodes collapsed)
function_declaration (+435 nodes collapsed)
comment
-- "--"
comment_content " Private API. Does not appear in LDoc on purpose. This funct"...
comment
-- "--"
comment_content " some time after the systray is removed from some drawable. "...
comment
-- "--"
comment_content " really remove the systray."
function_declaration (+30 nodes collapsed)
function_declaration (+348 nodes collapsed)
comment
-- "--"
comment_content " Check if the function was called like :foo() or .foo() and "...
function_declaration (+31 nodes collapsed)
comment
-- "--"
comment_content "- Set the size of a single icon."
comment
-- "--"
comment_content ""
comment
-- "--"
comment_content " If this is set to nil, then the size is picked dynamically "...
comment
-- "--"
comment_content " available space. Otherwise, any single icon has a size of `"...
comment
-- "--"
comment_content ""
comment
-- "--"
comment_content " @property base_size"
comment
-- "--"
comment_content " @tparam integer|nil base_size The base size"
comment
-- "--"
comment_content " @propemits true false"
function_declaration (+57 nodes collapsed)
comment
-- "--"
comment_content "- Decide between horizontal or vertical display."
comment
-- "--"
comment_content ""
comment
-- "--"
comment_content " @property horizontal"
comment
-- "--"
comment_content " @tparam boolean horizontal Use horizontal mode?"
comment
-- "--"
comment_content " @propemits true false"
function_declaration (+57 nodes collapsed)
comment
-- "--"
comment_content "- Should the systray icons be displayed in reverse order?"
comment
-- "--"
comment_content ""
comment
-- "--"
comment_content " @property reverse"
comment
-- "--"
comment_content " @tparam boolean reverse Display in reverse order."
comment
-- "--"
comment_content " @propemits true false"
function_declaration (+57 nodes collapsed)
comment
-- "--"
comment_content "- Set the screen that the systray should be displayed on."
comment
-- "--"
comment_content ""
comment
-- "--"
comment_content " This can either be a screen, in which case the systray will"...
comment
-- "--"
comment_content " exactly that screen, or the string `\"primary\"`, in which ca"...
comment
-- "--"
comment_content " visible on the primary screen. The default value is \"primar"...
comment
-- "--"
comment_content ""
comment
-- "--"
comment_content " @property screen"
comment
-- "--"
comment_content " @tparam screen|\"primary\" screen The screen to display on."
comment
-- "--"
comment_content " @propemits true false"
function_declaration (+57 nodes collapsed)
comment
-- "--"
comment_content "- Create the systray widget."
comment
-- "--"
comment_content ""
comment
-- "--"
comment_content " Note that this widget can only exist once."
comment
-- "--"
comment_content ""
comment
-- "--"
comment_content " @tparam boolean reverse Show in the opposite direction"
comment
-- "--"
comment_content " @treturn table The new `systray` widget"
comment
-- "--"
comment_content " @constructorfct wibox.widget.systray"
comment
-- "--"
comment_content " @usebeautiful beautiful.bg_systray"
comment
-- "--"
comment_content " @usebeautiful beautiful.systray_icon_spacing"
comment
-- "--"
comment_content " @usebeautiful beautiful.systray_max_rows"
function_declaration (+171 nodes collapsed)
function_declaration (+38 nodes collapsed)
return_statement
return "return"
expression_list
function_call
identifier "setmetatable"
arguments
( "("
identifier "systray"
, ","
dot_index_expression
identifier "systray"
. "."
identifier "mt"
) ")"
comment
-- "--"
comment_content " vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabs"...

After

chunk
comment
-- "--"
comment_content "------------------------------------------------------------"...
comment
-- "--"
comment_content " Container for the various system tray icons."
comment
-- "--"
comment_content ""
comment
-- "--"
comment_content " @author Uli Schlachter"
comment
-- "--"
comment_content " @copyright 2010 Uli Schlachter"
comment
-- "--"
comment_content " @widgetmod wibox.widget.systray"
comment
-- "--"
comment_content " @supermodule wibox.widget.base"
comment
-- "--"
comment_content "------------------------------------------------------------"...
variable_declaration
local "local"
assignment_statement
variable_list
identifier "wbase"
= "="
expression_list
function_call
identifier "require"
arguments
( "("
string
" "\""
string_content "wibox.widget.base"
" "\""
) ")"
variable_declaration
local "local"
assignment_statement
variable_list
identifier "drawable"
= "="
expression_list
function_call
identifier "require"
arguments
( "("
string
" "\""
string_content "wibox.drawable"
" "\""
) ")"
variable_declaration
local "local"
assignment_statement
variable_list
identifier "beautiful"
= "="
expression_list
function_call
identifier "require"
arguments
( "("
string
" "\""
string_content "beautiful"
" "\""
) ")"
variable_declaration
local "local"
assignment_statement
variable_list
identifier "gtable"
= "="
expression_list
function_call
identifier "require"
arguments
( "("
string
" "\""
string_content "gears.table"
" "\""
) ")"
variable_declaration
local "local"
assignment_statement
variable_list
identifier "capi"
= "="
expression_list
table_constructor
{ "{"
field
identifier "awesome"
= "="
identifier "awesome"
, ","
field
identifier "screen"
= "="
identifier "screen"
} "}"
variable_declaration
local "local"
assignment_statement
variable_list
identifier "setmetatable"
= "="
expression_list
identifier "setmetatable"
variable_declaration
local "local"
assignment_statement
variable_list
identifier "error"
= "="
expression_list
identifier "error"
variable_declaration
local "local"
assignment_statement
variable_list
identifier "abs"
= "="
expression_list
dot_index_expression
identifier "math"
. "."
identifier "abs"
variable_declaration
local "local"
assignment_statement
variable_list
identifier "systray"
= "="
expression_list
table_constructor
{ "{"
field
identifier "mt"
= "="
table_constructor
{ "{"
} "}"
} "}"
variable_declaration
local "local"
assignment_statement
variable_list
identifier "instance"
= "="
expression_list
nil "nil"
variable_declaration
local "local"
assignment_statement
variable_list
identifier "horizontal"
= "="
expression_list
true "true"
variable_declaration
local "local"
assignment_statement
variable_list
identifier "base_size"
= "="
expression_list
nil "nil"
variable_declaration
local "local"
assignment_statement
variable_list
identifier "reverse"
= "="
expression_list
false "false"
variable_declaration
local "local"
assignment_statement
variable_list
identifier "display_on_screen"
= "="
expression_list
string
" "\""
string_content "primary"
" "\""
comment
-- "--"
comment_content "- The systray background color."
comment
-- "--"
comment_content ""
comment
-- "--"
comment_content " Please note that only solid+opaque colors are supported. It"...
comment
-- "--"
comment_content " support gradients, patterns or transparent colors."
comment
-- "--"
comment_content ""
comment
-- "--"
comment_content " @beautiful beautiful.bg_systray"
comment
-- "--"
comment_content " @tparam string bg_systray The color (string like \"#ff0000\" "...
comment
-- "--"
comment_content "- The maximum number of rows for systray icons. Icons will f"...
comment
-- "--"
comment_content " current column (orthogonally to the systray direction) befo"...
comment
-- "--"
comment_content " filling the next column."
comment
-- "--"
comment_content ""
comment
-- "--"
comment_content " @beautiful beautiful.systray_max_rows"
comment
-- "--"
comment_content " @tparam[opt=1] integer systray_max_rows The positive number"...
comment
-- "--"
comment_content "- The systray icon spacing."
comment
-- "--"
comment_content ""
comment
-- "--"
comment_content " @beautiful beautiful.systray_icon_spacing"
comment
-- "--"
comment_content " @tparam[opt=0] integer systray_icon_spacing The icon spacin"...
function_declaration (+42 nodes collapsed)
function_declaration (+435 nodes collapsed)
comment
-- "--"
comment_content " Private API. Does not appear in LDoc on purpose. This funct"...
comment
-- "--"
comment_content " some time after the systray is removed from some drawable. "...
comment
-- "--"
comment_content " really remove the systray."
function_declaration (+30 nodes collapsed)
function_declaration (+348 nodes collapsed)
comment
-- "--"
comment_content " Check if the function was called like :foo() or .foo() and "...
function_declaration (+31 nodes collapsed)
comment
-- "--"
comment_content "- Set the size of a single icon."
comment
-- "--"
comment_content ""
comment
-- "--"
comment_content " If this is set to nil, then the size is picked dynamically "...
comment
-- "--"
comment_content " available space. Otherwise, any single icon has a size of `"...
comment
-- "--"
comment_content ""
comment
-- "--"
comment_content " @property base_size"
comment
-- "--"
comment_content " @tparam[opt=nil] integer|nil base_size The base size"
comment
-- "--"
comment_content " @propemits true false"
function_declaration (+57 nodes collapsed)
comment
-- "--"
comment_content "- Decide between horizontal or vertical display."
comment
-- "--"
comment_content ""
comment
-- "--"
comment_content " @property horizontal"
comment
-- "--"
comment_content " @tparam[opt=true] boolean horizontal Use horizontal mode?"
comment
-- "--"
comment_content " @propemits true false"
function_declaration (+57 nodes collapsed)
comment
-- "--"
comment_content "- Should the systray icons be displayed in reverse order?"
comment
-- "--"
comment_content ""
comment
-- "--"
comment_content " @property reverse"
comment
-- "--"
comment_content " @tparam[opt=false] boolean reverse Display in reverse order"...
comment
-- "--"
comment_content " @propemits true false"
function_declaration (+57 nodes collapsed)
comment
-- "--"
comment_content "- Set the screen that the systray should be displayed on."
comment
-- "--"
comment_content ""
comment
-- "--"
comment_content " This can either be a screen, in which case the systray will"...
comment
-- "--"
comment_content " exactly that screen, or the string `\"primary\"`, in which ca"...
comment
-- "--"
comment_content " visible on the primary screen. The default value is \"primar"...
comment
-- "--"
comment_content ""
comment
-- "--"
comment_content " @property screen"
comment
-- "--"
comment_content " @tparam[opt=nil] screen|\"primary\" screen The screen to disp"...
comment
-- "--"
comment_content " @propemits true false"
function_declaration (+57 nodes collapsed)
comment
-- "--"
comment_content "- Create the systray widget."
comment
-- "--"
comment_content ""
comment
-- "--"
comment_content " Note that this widget can only exist once."
comment
-- "--"
comment_content ""
comment
-- "--"
comment_content " @tparam boolean reverse Show in the opposite direction"
comment
-- "--"
comment_content " @treturn table The new `systray` widget"
comment
-- "--"
comment_content " @constructorfct wibox.widget.systray"
comment
-- "--"
comment_content " @usebeautiful beautiful.bg_systray"
comment
-- "--"
comment_content " @usebeautiful beautiful.systray_icon_spacing"
comment
-- "--"
comment_content " @usebeautiful beautiful.systray_max_rows"
function_declaration (+171 nodes collapsed)
function_declaration (+38 nodes collapsed)
return_statement
return "return"
expression_list
function_call
identifier "setmetatable"
arguments
( "("
identifier "systray"
, ","
dot_index_expression
identifier "systray"
. "."
identifier "mt"
) ")"
comment
-- "--"
comment_content " vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabs"...