1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-11-18 02:55:12 +00:00

make draw_(graph_)borders lua settings

This commit is contained in:
Pavel Labath 2010-03-05 14:06:15 +01:00
parent 147d16e763
commit 22931c2c67

View File

@ -344,8 +344,8 @@ static conky::simple_config_setting<bool> show_graph_range("show_graph_range", f
static int gap_x, gap_y; static int gap_x, gap_y;
/* border */ /* border */
static int draw_borders; static conky::simple_config_setting<bool> draw_borders("draw_borders", false, false);
static int draw_graph_borders; static conky::simple_config_setting<bool> draw_graph_borders("draw_graph_borders", true, false);
static int stippled_borders; static int stippled_borders;
int get_stippled_borders(void) int get_stippled_borders(void)
@ -1414,7 +1414,7 @@ int draw_each_line_inner(char *s, int special_index, int last_special_applied)
if (w < 0) { if (w < 0) {
w = 0; w = 0;
} }
if (draw_graph_borders) { if (draw_graph_borders.get(*state)) {
XSetLineAttributes(display, window.gc, 1, LineSolid, XSetLineAttributes(display, window.gc, 1, LineSolid,
CapButt, JoinMiter); CapButt, JoinMiter);
XDrawRectangle(display, window.drawable, window.gc, XDrawRectangle(display, window.drawable, window.gc,
@ -1714,7 +1714,7 @@ static void draw_text(void)
cur_y = text_start_y; cur_y = text_start_y;
/* draw borders */ /* draw borders */
if (draw_borders && window.border_width > 0) { if (draw_borders.get(*state) && window.border_width > 0) {
if (stippled_borders) { if (stippled_borders) {
char ss[2] = { (char)stippled_borders, (char)stippled_borders }; char ss[2] = { (char)stippled_borders, (char)stippled_borders };
XSetLineAttributes(display, window.gc, window.border_width, LineOnOffDash, XSetLineAttributes(display, window.gc, window.border_width, LineOnOffDash,
@ -2547,8 +2547,6 @@ static void set_default_configurations(void)
#endif #endif
#ifdef BUILD_X11 #ifdef BUILD_X11
draw_shades = 1; draw_shades = 1;
draw_borders = 0;
draw_graph_borders = 1;
draw_outline = 0; draw_outline = 0;
set_first_font("6x10"); set_first_font("6x10");
gap_x = 5; gap_x = 5;
@ -2983,12 +2981,6 @@ char load_config_file(const char *f)
CONF("override_utf8_locale") { CONF("override_utf8_locale") {
utf8_mode = string_to_bool(value); utf8_mode = string_to_bool(value);
} }
CONF("draw_borders") {
draw_borders = string_to_bool(value);
}
CONF("draw_graph_borders") {
draw_graph_borders = string_to_bool(value);
}
CONF("draw_shades") { CONF("draw_shades") {
draw_shades = string_to_bool(value); draw_shades = string_to_bool(value);
} }