Commit Graph

123 Commits

Author SHA1 Message Date
Julien Danjou 45c2ac38a4 image: only compute when needed
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-06-04 17:23:17 +02:00
Matus Telgarsky 30821f80a9 cosmetic fix for line drawing in graphs
When drawing graphs in line mode and growing right, instead of filling
in the last pixel (as the comments indicate is the intention), a line is
drawn to what is actually the first y value in the graph.  This is
because the index variable has already been incremented.  To fix it,
decrement it (correcting for modulus).  Patch attached.  Note I didn't
try it, since i am too lazy to update all the xcb stuff, but made sure
the patch goes cleanly against current head.

Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-29 10:04:57 +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
Uli Schlachter 5dadaa59a9 Move xcolor into its own source files
Signed-off-by: Uli Schlachter <psychon@znc.in>
2009-04-18 13:55:38 +02:00
Julien Danjou f473a107b0 cleanup #includes
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-17 16:52:25 +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
Alex Cornejo 106e6ed5ab Styling inconsistencies
Cheers,

Alex

From b5816ec55073507d4527ad3a77eae1878adb30d3 Mon Sep 17 00:00:00 2001
From: Alex Cornejo <acornejo@gmail.com>
Date: Sun, 29 Mar 2009 14:24:27 -0400
Subject: [PATCH] Fixed some styling issues.

Noticed in the latest pull that a commit introduced a lot of styling
inconsistencies, decided to remove those and others found by a simple
grep.

Signed-off-by: Alex Cornejo <acornejo@gmail.com>
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-03-30 12:53:12 +02:00
Lionel Ott 970b566580 Added AlignMiddle to alignment_t structure
- Added AlignMiddle to denote a vertically centered element

Signed-off-by: Julien Danjou <julien@danjou.info>
2009-03-12 11:49:58 +01:00
Julien Danjou c70f284b45 draw: check harder for visual
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-03-12 11:49:58 +01:00
Michael Hofmann 39cd86f976 widget: add fixed alignment
This makes it possible to have fixed-width textboxes in the flexible part of a wibox.

Signed-off-by: Julien Danjou <julien@danjou.info>
2008-12-14 10:28:23 +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 b5fb612ea3 draw: remove shadow support
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-12-14 10:28:23 +01:00
Julien Danjou 486e13eba0 draw: honor bottom margin
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 beabf82ddf draw: check more quickly if we need UTF-8 conversion
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-12-12 16:51:41 +01:00
Julien Danjou 00149a0e90 draw: fix text alignment on small width
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-12-03 11:11:11 +01:00
Julien Danjou 35811f9c36 draw: height computing honor margin top
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-12-03 11:10:05 +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 de9c2b1886 draw: stop exporting draw_text_markup_expand
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-11-05 13:16:02 +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 24a8e6d377 draw: support top and bottom as align
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-11-04 16:34:30 +01:00
Julien Danjou 737a70f60c remove a bunch of useless #include-s
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-10-24 20:57:29 +02:00
Julien Danjou 93be5b3cae draw: remove useless AlignAuto
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-10-23 15:53:04 +02:00
Julien Danjou 0261969930 draw: allow text to be on multiple lines
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-10-01 14:07:30 +02:00
Julien Danjou fcc93e5f88 draw: merge draw context into swindow
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-09-22 11:11:56 +02:00
Julien Danjou 6ac0c4130c image: merge draw_image_t and image_t
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-09-22 11:11:55 +02:00
Julien Danjou fbf0a785d5 draw: iconv is local
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-09-22 11:11:55 +02:00
Julien Danjou b48f094490 draw: remove GdkPixBuf support
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-09-22 11:11:55 +02:00
Julien Danjou 6a5ad6af9b common: move draw, xscreen and swindow out
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-09-22 11:11:55 +02:00
Julien Danjou 2ac27fdac4 move draw files to common/ 2008-01-24 18:48:11 +01:00
Julien Danjou 35803aff4c make draw functions more independant 2008-01-24 18:43:24 +01:00
Julien Danjou 7ad43fe713 stop being stupid, use only one Drawable 2008-01-23 19:10:53 +01:00
Julien Danjou 3e249cab4b change align type 2008-01-23 16:54:14 +01:00
Julien Danjou f17bf8b334 do not return nothing on errors 2008-01-23 15:56:40 +01:00
Julien Danjou 0b678ce0c2 print cairo errors 2008-01-23 13:47:56 +01:00
Julien Danjou e8bc0dac62 check cairo errors 2008-01-23 10:48:08 +01:00
Julien Danjou 668702b777 move list.h and util.[ch] to common/ 2008-01-21 18:14:59 +01:00
Julien Danjou 17a8c4a4c4 draw_text takes a Area as arg 2008-01-21 16:31:14 +01:00
Julien Danjou d59fc62739 draw rectangle take an Area as arg 2008-01-21 16:31:14 +01:00
marco candrian 23fc37a4a6 not needed i_tmp variable removed and using h_index instead 2008-01-07 09:24:31 +01:00
Julien Danjou 9fa01e34de rename textwidth to draw_textwidth 2008-01-06 22:57:23 +01:00
marco candrian 37da7d0d01 graph widget added
example config:

graph gr_cpu {
  width = 80
  height = "0.8"
  fg = "#336633"
  bg = "#000000"
  bordercolor = "#669966"
  padding_left = 0
  mouse = {...}
  x = ...
  y = ...
}

Looks like here: http://www.calmar.ws/tmp/112-Sun-screen.png

I renamed lpadding to padding_left, and bcolor to bordercolor
also on the progressbar widget.

The awesomerc page would still be to write, when this patch will get accepted.

Hints are always welcomed.
2008-01-06 20:51:40 +01:00
Julien Danjou 1d6613349e typedef enum Alignment 2008-01-04 19:17:20 +01:00
Julien Danjou bcebd5e1ce fix various uninit vars 2008-01-04 14:19:59 +01:00