check widgets position
This commit is contained in:
parent
960d870b0b
commit
f54ff424a0
1
client.c
1
client.c
|
@ -35,7 +35,6 @@
|
||||||
#include "xutil.h"
|
#include "xutil.h"
|
||||||
#include "layouts/floating.h"
|
#include "layouts/floating.h"
|
||||||
|
|
||||||
|
|
||||||
extern AwesomeConf globalconf;
|
extern AwesomeConf globalconf;
|
||||||
|
|
||||||
/** Load windows properties, restoring client's tag
|
/** Load windows properties, restoring client's tag
|
||||||
|
|
32
widget.c
32
widget.c
|
@ -32,18 +32,36 @@ void
|
||||||
widget_calculate_alignments(Widget *widget)
|
widget_calculate_alignments(Widget *widget)
|
||||||
{
|
{
|
||||||
for(; widget && widget->alignment != AlignFlex; widget = widget->next)
|
for(; widget && widget->alignment != AlignFlex; widget = widget->next)
|
||||||
if(widget->alignment == AlignAuto)
|
{
|
||||||
|
switch(widget->alignment)
|
||||||
|
{
|
||||||
|
case AlignCenter:
|
||||||
|
warn("widgets cannot be center aligned\n");
|
||||||
|
case AlignAuto:
|
||||||
widget->alignment = AlignLeft;
|
widget->alignment = AlignLeft;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if(widget)
|
if(widget)
|
||||||
for(widget = widget->next; widget; widget = widget->next)
|
for(widget = widget->next; widget; widget = widget->next)
|
||||||
{
|
switch(widget->alignment)
|
||||||
if(widget->alignment == AlignFlex)
|
{
|
||||||
warn("Multiple flex widgets in panel -"
|
case AlignFlex:
|
||||||
" ignoring flex for all but the first.");
|
warn("multiple flex widgets in panel -"
|
||||||
if(widget->alignment == AlignAuto)
|
" ignoring flex for all but the first.\n");
|
||||||
widget->alignment = AlignRight;
|
widget->alignment = AlignRight;
|
||||||
}
|
break;
|
||||||
|
case AlignCenter:
|
||||||
|
warn("widgets cannot be center aligned\n");
|
||||||
|
case AlignAuto:
|
||||||
|
widget->alignment = AlignRight;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
|
Loading…
Reference in New Issue