1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-11-17 10:35:10 +00:00
git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky@50 7f574dfc-610e-0410-a909-a81674777703
This commit is contained in:
Brenden Matthews 2005-08-04 02:17:25 +00:00
parent 8a7eecd655
commit 5f16cd8fd5
4 changed files with 23 additions and 23 deletions

View File

@ -1,3 +1,6 @@
2005-07-03
* many small fixes, thanks to those who reported problems
2005-07-02
* dramatically improved how conky handles fonts
* fixed issues with graph args

39
conky.c
View File

@ -75,6 +75,7 @@ struct font_list *fonts = NULL;
int addfont(const char *data_in)
{
//printf("setting additional font %s\n");
if (font_count > MAX_FONTS) {
CRIT_ERR("you don't need that many fonts, sorry.");
}
@ -101,6 +102,7 @@ int addfont(const char *data_in)
void set_first_font(const char *data_in)
{
//printf("setting first font %s\n");
if (font_count < 0) {
if ((fonts = (struct font_list*)malloc(sizeof(struct font_list))) == NULL) {
CRIT_ERR("malloc");
@ -2595,13 +2597,13 @@ static void text_size_updater(char *s)
p++;
}
w += get_string_width(s);
if (fontchange) {
selected_font = 0;
}
if (w > text_width)
text_width = w;
text_height += h;
if (fontchange) {
selected_font = 0;
}
}
static void update_text_area()
@ -2755,8 +2757,6 @@ static void draw_string(const char *s)
}
memcpy(tmpstring1, s, TEXT_BUFFER_SIZE);
cur_x += width_of_s;
}
inline unsigned long do_gradient(unsigned long first_colour, unsigned long last_colour) { /* this function returns the next colour between two colours for a gradient */
@ -2952,9 +2952,16 @@ static void draw_line(char *s)
{
int h =
specials[special_index].height;
int by =
cur_y - (font_ascent() +
int by;
#ifdef XFT
if (use_xft) {
by = cur_y - (font_ascent() +
h) / 2 - 1;
} else
#endif
{
by = cur_y - (font_ascent()/2);
}
w = specials[special_index].width;
if (w == 0)
w = text_start_x +
@ -3028,7 +3035,7 @@ static void draw_line(char *s)
cur_y -= font_ascent();
selected_font = specials[special_index].font_added;
cur_y += font_ascent();
set_font();
//set_font();
}
break;
@ -3103,21 +3110,11 @@ static void draw_line(char *s)
}
draw_string(s);
if (fontchange) {
selected_font = 0;
set_font();
}
/*if (fontchange) {
fontchange = 0;
free(font_name);
font_name = tmpfont;
tmpfont = NULL;
load_font();
set_font();
}*/
cur_y += font_descent();
if (fontchange) {
selected_font = 0;
}
}
static void draw_text()

View File

@ -1,7 +1,7 @@
#ifndef _conky_h_
#define _conky_h_
#include <mcheck.h>
//#include <mcheck.h>
#include "config.h"
#include <sys/utsname.h>
#include <stdio.h>

2
x11.c
View File

@ -11,7 +11,7 @@ int use_xdbe;
#endif
#ifdef XFT
int use_xft;
int use_xft = 0;
#endif
/* some basic X11 stuff */