ignore width of last column and use all remained space for it
This commit is contained in:
@@ -38,7 +38,13 @@ std::string Display::Columns()
|
|||||||
|
|
||||||
for (std::vector<Column>::const_iterator it = Config.columns.begin(); it != Config.columns.end(); ++it)
|
for (std::vector<Column>::const_iterator it = Config.columns.begin(); it != Config.columns.end(); ++it)
|
||||||
{
|
{
|
||||||
width = last_fixed && it == next2last ? COLS-where-(++next2last)->width : (it->width*(it->fixed ? 1 : COLS/100.0));
|
width = (last_fixed && it == next2last
|
||||||
|
? COLS-where-(++next2last)->width
|
||||||
|
: (it == Config.columns.end()-1
|
||||||
|
? COLS-where
|
||||||
|
: (it->width*(it->fixed ? 1 : COLS/100.0))
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
switch (it->type)
|
switch (it->type)
|
||||||
{
|
{
|
||||||
@@ -130,7 +136,14 @@ void Display::SongsInColumns(const MPD::Song &s, void *, Menu<MPD::Song> *menu)
|
|||||||
*menu << clEnd;
|
*menu << clEnd;
|
||||||
}
|
}
|
||||||
|
|
||||||
width = last_fixed && it == next2last ? COLS-where-(++next2last)->width : (it->width*(it->fixed ? 1 : COLS/100.0));
|
width = (last_fixed && it == next2last
|
||||||
|
? COLS-where-(++next2last)->width
|
||||||
|
: (it == Config.columns.end()-1
|
||||||
|
? menu->GetWidth()-where
|
||||||
|
: (it->width*(it->fixed ? 1 : COLS/100.0))
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
MPD::Song::GetFunction get = 0;
|
MPD::Song::GetFunction get = 0;
|
||||||
|
|
||||||
switch (it->type)
|
switch (it->type)
|
||||||
|
|||||||
Reference in New Issue
Block a user