Julien Danjou
3f6ab274c0
wibox: all wiboxes go into one and only one array
...
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-06-04 17:51:35 +02:00
Gregor Best
0f2da4b9bf
widgets: export extents() function
...
This commit adds a function called extents() to widgets. In the case of
a systray, it takes the systray's screen as its argument to correctly
calculate the width. By default, 1 is assumed. For all other widgets,
the argument can be ommitted.
The function doesn't return the geometry as drawn, instead it returns
the geometry the widget _wants_ to be drawn at, for example an imagebox
always has (image width, image height) as the return values even if it's
drawn with a smaller width and height on a smaller wibox.
Signed-off-by: Gregor Best <farhaven@googlemail.com>
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-06-04 17:23:29 +02:00
Julien Danjou
45c2ac38a4
image: only compute when needed
...
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-06-04 17:23:17 +02:00
Julien Danjou
1e6d4747be
graph: deprecate in favor of awful widget
...
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-06-04 17:23:13 +02:00
Julien Danjou
9e7054f3c0
progressbar: deprecate old widget
...
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-06-04 17:23:05 +02:00
Uli Schlachter
df0df1bc37
Fix a couple of harmless compiler warnings
...
In each widget's *_geometry function, two warnings were generated, e.g.:
warning: ‘geometry.y’ is used uninitialized in this function
warning: ‘geometry.x’ is used uninitialized in this function
Found by gogonkt with GCC 4.2.4 on gentoo.
Signed-off-by: Uli Schlachter <psychon@znc.in>
2009-05-25 12:07:06 +02:00
Julien Danjou
4a34693bfb
screen: remove index field
...
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-18 17:51:31 +02:00
Uli Schlachter
708636b5bf
Convert the textbox widget to color_t
...
Signed-off-by: Uli Schlachter <psychon@znc.in>
2009-04-18 14:02:21 +02:00
Uli Schlachter
829caf45ba
Convert the progressbar widget to color_t
...
Signed-off-by: Uli Schlachter <psychon@znc.in>
2009-04-18 14:02:21 +02:00
Uli Schlachter
69082ddf5f
Convert the imagebox widget to color_t
...
Signed-off-by: Uli Schlachter <psychon@znc.in>
2009-04-18 14:02:21 +02:00
Uli Schlachter
3216a849b5
Convert the graph widget to color_t
...
Signed-off-by: Uli Schlachter <psychon@znc.in>
2009-04-18 14:02:21 +02:00
Uli Schlachter
99b521b2c7
Rename luaA_pushcolor() to luaA_pushxcolor()
...
Signed-off-by: Uli Schlachter <psychon@znc.in>
2009-04-18 14:02:21 +02:00
Uli Schlachter
37862c83c0
Make the draw_*() functions take a color_t*
...
Signed-off-by: Uli Schlachter <psychon@znc.in>
2009-04-18 14:02:21 +02:00
Julien Danjou
486ef71a7f
screen: replace screens pointer by a screen_t array
...
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-17 16:14:09 +02:00
Matus Telgarsky
1c147a6d76
graph: fix for missing allocation
...
resizing graph widgets (by setting the width parameter) was failing to
update the caches draw_to and draw_from. I have attached a 2-line patch
remedying this. The bug wasn't caught earlier because the default size,
80, is bigger than what people typically use.
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-15 11:36:11 +02:00
Julien Danjou
045d4c823b
textbox: unref image on destruction
...
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-13 12:43:00 +02:00
Julien Danjou
b1a59aca07
widget: widget are now full Lua object
...
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-12 15:11:33 +02:00
Julien Danjou
541d4f565f
image: use new object system
...
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-12 15:11:32 +02:00
Uli Schlachter
95457c5ab7
Move the definition of globalconf into a header file
...
Pretty much every single source file needs this struct, so it makes sense to
define it in a common header instead of in every single .c file.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-10 16:32:42 +02:00
Lionel Ott
858802537f
Implemented bottom and middle alignment for textbox backgrounds
...
- background images of textbox widgets can now be aligned vertically
to the bottom and middle aswell as the top
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-03-12 11:49:58 +01:00
Julien Danjou
527e6308c3
graph: return if size is 0 (FS#466)
...
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-03-02 17:43:14 +01:00
Julien Danjou
ab0220274e
graph: check width value (FS#465)
...
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-03-02 14:20:08 +01:00
Julien Danjou
8f9cc9a262
widgets: use integer instead of int8_t
...
The computer is smart, and the compiler also.
Should fix:
widgets/progressbar.c:451: warning: array subscript has type `char'
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-01-18 11:03:13 +01:00
Julien Danjou
4379b19eb9
textbox: include margin when computing needed width
...
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-12-19 12:59:16 +01:00
Julien Danjou
7f3e831221
draw: stop using font as argument, use global
...
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-12-14 10:28:23 +01:00
Julien Danjou
26da80f90a
draw: remove custom markup support
...
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-12-14 10:28:23 +01:00
Julien Danjou
a4d914f0e4
draw: fix UTF-8 string len computation upon conversion
...
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-12-14 10:28:23 +01:00
Julien Danjou
9adf3fd869
draw: remove bg color markup, move to textbox
...
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-12-14 10:28:23 +01:00
Julien Danjou
8e9f0c8857
draw: remove margin markup, move to textbox widget
...
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-12-14 10:28:23 +01:00
Julien Danjou
3c304bca07
draw: remove alignment markup
...
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-12-14 10:28:23 +01:00
Julien Danjou
68f31f0629
draw: remove border markup, move it to textbox
...
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-12-14 10:28:23 +01:00
Julien Danjou
da99991223
draw: draw_text take extents as argument
...
This avoid one call of pango_layout_get_pixel_extents().
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-12-14 10:28:22 +01:00
Julien Danjou
8b88541f0a
xembed: store windows in an array
...
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-12-14 10:28:22 +01:00
Julien Danjou
ccc6452d49
widget: change widget initialization code
...
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-12-12 16:51:41 +01:00
Julien Danjou
f556c04868
widget: remove common_new()
...
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-12-12 16:51:41 +01:00
Julien Danjou
0716ecb4fd
widget: remove old cache system
...
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-12-12 16:51:40 +01:00
Julien Danjou
34c0244d5a
imagebox: don't draw anything is not enough space (FS#368)
...
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-11-10 15:22:39 +01:00
Julien Danjou
e0816a3340
textbox: document wrap and ellipsize
...
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-11-07 16:01:20 +01:00
Julien Danjou
a5cb98162d
textbox: add ellipsize and wrap mode support
...
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-11-06 17:04:23 +01:00
Julien Danjou
8e66a543bc
draw: remove phys_screen from font handling
...
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-11-04 17:50:10 +01:00
Julien Danjou
10df0a9dc4
imagebox: support vertical alignment
...
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-11-04 16:38:06 +01:00
Julien Danjou
0b6b96131a
imagebox: allow to not resize images
...
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-11-04 16:34:29 +01:00
Julien Danjou
a7a8c2d024
imagebox: fix index return value
...
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-11-04 16:34:25 +01:00
Julien Danjou
2e3744de9d
widget: store supported align and use to render flex widgets
...
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-10-23 17:28:07 +02:00
Julien Danjou
25bf12868a
widgets: use a geometry callback
...
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-10-22 17:32:17 +02:00
Julien Danjou
0178a75c7d
graph, progressbar: fix bar/plot additions
...
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-10-22 10:30:20 +02:00
Julien Danjou
7b6ba906d4
imagebox: fix luadoc fields
...
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-10-21 18:32:48 +02:00
Julien Danjou
c0f75c2ed8
widgets: clear private struct
...
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-10-21 15:07:41 +02:00
Julien Danjou
fba1a96737
progressbar: use bar array rather than linked list
...
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-10-21 14:48:49 +02:00
Julien Danjou
96929faa69
graph: use array instead of linked list
...
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-10-21 12:04:19 +02:00