[alsa-devel] [PATCH] hdspmixer: fix drawing problems with black background
Takashi Iwai
tiwai at suse.de
Wed Apr 6 08:29:22 CEST 2011
At Sat, 2 Apr 2011 14:44:11 +0200,
Tim Blechmann wrote:
>
> - use foreground color instead of black
> - HDSPMixerSelector: set colors before setting labels
>
> Signed-off-by: Tim Blechmann <tim at klingt.org>
Thanks, applied now.
Takashi
> ---
> hdspmixer/src/HDSPMixerAboutText.cxx | 2 +-
> hdspmixer/src/HDSPMixerIOMixer.cxx | 2 +-
> hdspmixer/src/HDSPMixerOutput.cxx | 2 +-
> hdspmixer/src/HDSPMixerSelector.cxx | 4 ++--
> 4 files changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/hdspmixer/src/HDSPMixerAboutText.cxx b/hdspmixer/src/HDSPMixerAboutText.cxx
> index c8c9b1a..26a5bbc 100644
> --- a/hdspmixer/src/HDSPMixerAboutText.cxx
> +++ b/hdspmixer/src/HDSPMixerAboutText.cxx
> @@ -48,7 +48,7 @@ HDSPMixerAboutText::HDSPMixerAboutText(int x, int y, int w, int h):Fl_Widget(x,
>
> void HDSPMixerAboutText::draw()
> {
> - fl_color(FL_BLACK);
> + fl_color(FL_FOREGROUND_COLOR);
> fl_font(FL_HELVETICA, 10);
> fl_draw(text, x(), y(), w(), h(), FL_ALIGN_LEFT);
> }
> diff --git a/hdspmixer/src/HDSPMixerIOMixer.cxx b/hdspmixer/src/HDSPMixerIOMixer.cxx
> index 987be41..b5c293b 100644
> --- a/hdspmixer/src/HDSPMixerIOMixer.cxx
> +++ b/hdspmixer/src/HDSPMixerIOMixer.cxx
> @@ -71,7 +71,7 @@ void HDSPMixerIOMixer::draw()
> Fl_Widget *const* a = array();
> if (damage() & ~FL_DAMAGE_CHILD) {
> draw_background();
> - fl_color(FL_BLACK);
> + fl_color(FL_FOREGROUND_COLOR);
> fl_font(FL_HELVETICA, 8);
> fl_draw(channel_name.str().c_str(), x()+4, y()+225, 27, 9, FL_ALIGN_CENTER);
> for (int i=children(); i--;) {
> diff --git a/hdspmixer/src/HDSPMixerOutput.cxx b/hdspmixer/src/HDSPMixerOutput.cxx
> index 5047825..f30d8c6 100644
> --- a/hdspmixer/src/HDSPMixerOutput.cxx
> +++ b/hdspmixer/src/HDSPMixerOutput.cxx
> @@ -303,7 +303,7 @@ void HDSPMixerOutput::draw()
> Fl_Widget*const* a = array();
> if (damage() & ~FL_DAMAGE_CHILD) {
> draw_background();
> - fl_color(FL_BLACK);
> + fl_color(FL_FOREGROUND_COLOR);
> fl_font(FL_HELVETICA, 8);
> fl_draw(labels_playback[out_num], x()+4, y()+193, 27, 9, FL_ALIGN_CENTER);
> for (int i=children(); i--;) {
> diff --git a/hdspmixer/src/HDSPMixerSelector.cxx b/hdspmixer/src/HDSPMixerSelector.cxx
> index 098658f..12f186f 100644
> --- a/hdspmixer/src/HDSPMixerSelector.cxx
> +++ b/hdspmixer/src/HDSPMixerSelector.cxx
> @@ -164,10 +164,10 @@ HDSPMixerSelector::HDSPMixerSelector(int x, int y, int w, int h):Fl_Menu_(x, y,
> max_dest = 0;
> selected = 0;
> basew = (HDSPMixerWindow *)window();
> - setLabels();
> textfont(FL_HELVETICA);
> textsize(8);
> - textcolor(FL_BLACK);
> + textcolor(FL_FOREGROUND_COLOR);
> + setLabels();
> }
>
> void HDSPMixerSelector::draw() {
> --
> 1.7.4.1
>
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel at alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
>
More information about the Alsa-devel
mailing list