make Window::SetColor protected as it doesn't respect stacked colors
it should only be used internally by Window and derives.
This commit is contained in:
@@ -275,9 +275,9 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
if (!Config.new_design)
|
||||
{
|
||||
wHeader->SetColor(Config.volume_color);
|
||||
*wHeader << Config.volume_color;
|
||||
*wHeader << XY(wHeader->GetWidth()-VolumeState.length(), 0) << VolumeState;
|
||||
wHeader->SetColor(Config.header_color);
|
||||
*wHeader << clEnd;
|
||||
}
|
||||
wHeader->Refresh();
|
||||
RedrawHeader = 0;
|
||||
|
||||
@@ -335,9 +335,9 @@ void NcmpcppStatusChanged(Connection *, StatusChanges changed, void *)
|
||||
case psStop:
|
||||
{
|
||||
WindowTitle("ncmpc++ ver. "VERSION);
|
||||
wFooter->SetColor(Config.progressbar_color);
|
||||
*wFooter << Config.progressbar_color;
|
||||
mvwhline(wFooter->Raw(), 0, 0, 0, wFooter->GetWidth());
|
||||
wFooter->SetColor(Config.statusbar_color);
|
||||
*wFooter << clEnd;
|
||||
Playlist::ReloadRemaining = 1;
|
||||
myPlaylist->NowPlaying = -1;
|
||||
if (Config.new_design)
|
||||
@@ -497,7 +497,7 @@ void NcmpcppStatusChanged(Connection *, StatusChanges changed, void *)
|
||||
{
|
||||
double progressbar_size = elapsed/double(np.GetTotalLength());
|
||||
unsigned howlong = wFooter->GetWidth()*progressbar_size;
|
||||
wFooter->SetColor(Config.progressbar_color);
|
||||
*wFooter << Config.progressbar_color;
|
||||
mvwhline(wFooter->Raw(), 0, 0, 0, wFooter->GetWidth());
|
||||
if (np.GetTotalLength())
|
||||
{
|
||||
@@ -506,7 +506,7 @@ void NcmpcppStatusChanged(Connection *, StatusChanges changed, void *)
|
||||
if (howlong < wFooter->GetWidth())
|
||||
*wFooter << Config.progressbar[1];
|
||||
}
|
||||
wFooter->SetColor(Config.statusbar_color);
|
||||
*wFooter << Config.statusbar_color;
|
||||
}
|
||||
RedrawStatusbar = 0;
|
||||
}
|
||||
@@ -621,9 +621,9 @@ void NcmpcppStatusChanged(Connection *, StatusChanges changed, void *)
|
||||
VolumeState += IntoStr(volume);
|
||||
VolumeState += "%";
|
||||
}
|
||||
wHeader->SetColor(Config.volume_color);
|
||||
*wHeader << Config.volume_color;
|
||||
*wHeader << XY(wHeader->GetWidth()-VolumeState.length(), 0) << VolumeState;
|
||||
wHeader->SetColor(Config.header_color);
|
||||
*wHeader << clEnd;
|
||||
wHeader->Refresh();
|
||||
}
|
||||
if (myScreen->ActiveWindow() == myPlaylist->Items)
|
||||
|
||||
@@ -117,7 +117,6 @@ namespace NCurses
|
||||
bool hasCoords(int &, int &);
|
||||
|
||||
void SetGetStringHelper(GetStringHelper helper) { itsGetStringHelper = helper; }
|
||||
void SetColor(Color, Color = clDefault);
|
||||
void SetBaseColor(Color, Color = clDefault);
|
||||
void SetBorder(Border);
|
||||
void SetTimeout(int);
|
||||
@@ -172,6 +171,7 @@ namespace NCurses
|
||||
void Bold(bool) const;
|
||||
void Reverse(bool) const;
|
||||
void AltCharset(bool) const;
|
||||
void SetColor(Color, Color = clDefault);
|
||||
|
||||
void ShowBorder() const;
|
||||
void AdjustDimensions(size_t &, size_t &);
|
||||
|
||||
Reference in New Issue
Block a user