mirror of
https://github.com/Llewellynvdm/conky.git
synced 2025-01-28 01:28:30 +00:00
Code formatting.
This commit is contained in:
parent
358a2b989e
commit
47b2869028
56
src/conky.c
56
src/conky.c
@ -7304,15 +7304,15 @@ static void main_loop(void)
|
|||||||
|
|
||||||
/* resize window if it isn't right size */
|
/* resize window if it isn't right size */
|
||||||
if (!fixed_size
|
if (!fixed_size
|
||||||
&& (text_width + window.border_inner_margin * 2 + window.border_outer_margin * 2 + window.border_width * 2 != window.width
|
&& (text_width + window.border_inner_margin * 2 + window.border_outer_margin * 2 + window.border_width * 2 != window.width
|
||||||
|| text_height + window.border_inner_margin * 2 + window.border_outer_margin * 2 + window.border_width * 2 != window.height)) {
|
|| text_height + window.border_inner_margin * 2 + window.border_outer_margin * 2 + window.border_width * 2 != window.height)) {
|
||||||
window.width = text_width + window.border_inner_margin * 2 + window.border_outer_margin * 2 + window.border_width * 2;
|
window.width = text_width + window.border_inner_margin * 2 + window.border_outer_margin * 2 + window.border_width * 2;
|
||||||
window.height = text_height + window.border_inner_margin * 2 + window.border_outer_margin * 2 + window.border_width * 2;
|
window.height = text_height + window.border_inner_margin * 2 + window.border_outer_margin * 2 + window.border_width * 2;
|
||||||
XResizeWindow(display, window.window, window.width,
|
XResizeWindow(display, window.window, window.width,
|
||||||
window.height);
|
window.height);
|
||||||
set_transparent_background(window.window);
|
set_transparent_background(window.window);
|
||||||
|
|
||||||
changed++;
|
changed++;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* move window if it isn't in right position */
|
/* move window if it isn't in right position */
|
||||||
@ -7321,42 +7321,42 @@ static void main_loop(void)
|
|||||||
changed++;
|
changed++;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* update struts */
|
/* update struts */
|
||||||
if (changed && window.type == TYPE_PANEL) {
|
if (changed && window.type == TYPE_PANEL) {
|
||||||
int sidenum = -1;
|
int sidenum = -1;
|
||||||
|
|
||||||
fprintf(stderr, PACKAGE_NAME": defining struts\n");
|
fprintf(stderr, PACKAGE_NAME": defining struts\n");
|
||||||
fflush(stderr);
|
fflush(stderr);
|
||||||
|
|
||||||
switch (text_alignment) {
|
switch (text_alignment) {
|
||||||
case TOP_LEFT:
|
case TOP_LEFT:
|
||||||
case TOP_RIGHT:
|
case TOP_RIGHT:
|
||||||
case TOP_MIDDLE:
|
case TOP_MIDDLE:
|
||||||
{
|
{
|
||||||
sidenum = 2;
|
sidenum = 2;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case BOTTOM_LEFT:
|
case BOTTOM_LEFT:
|
||||||
case BOTTOM_RIGHT:
|
case BOTTOM_RIGHT:
|
||||||
case BOTTOM_MIDDLE:
|
case BOTTOM_MIDDLE:
|
||||||
{
|
{
|
||||||
sidenum = 3;
|
sidenum = 3;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case MIDDLE_LEFT:
|
case MIDDLE_LEFT:
|
||||||
{
|
{
|
||||||
sidenum = 0;
|
sidenum = 0;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case MIDDLE_RIGHT:
|
case MIDDLE_RIGHT:
|
||||||
{
|
{
|
||||||
sidenum = 1;
|
sidenum = 1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
set_struts(sidenum);
|
set_struts(sidenum);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user