X-Git-Url: https://git.cinelerra-gg.org/git/?p=goodguy%2Fcinelerra.git;a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Fstatusbar.C;h=13169c870c53e7e5274432ede78f6adaed7af353;hp=4e86de5916f346b2926d6826cc33993d39dba551;hb=ac8f3979437fb45effb135a1bb6bee871f52d635;hpb=7fd85fb66168f6b518c5f2d73e04036e87faa0e1 diff --git a/cinelerra-5.1/cinelerra/statusbar.C b/cinelerra-5.1/cinelerra/statusbar.C index 4e86de59..13169c87 100644 --- a/cinelerra-5.1/cinelerra/statusbar.C +++ b/cinelerra-5.1/cinelerra/statusbar.C @@ -103,12 +103,30 @@ void StatusBar::resize_event() flash(0); } -void StatusBar::show_message(const char *text, int color) +void StatusBar::show_message(const char *text, int msg_color, int box_color) { - if( color < 0 ) color = mwindow->theme->message_normal; - status_text->set_color(color); + int mx = mwindow->theme->mstatus_message_x; + int my = mwindow->theme->mstatus_message_y; + int tx = status_text->get_x(), th = status_text->get_h(); + if( box_color >= 0 ) { + set_color(box_color); + int bb = th/4, bh = th - bb*2; + draw_box(mx+bb,my+bb, bh,bh); + flash(mx,my, th,th); mx += 5; + if( (mx+=th) != tx ) + status_text->reposition_window(mx, my); + } + else if( tx != mx ) { + draw_top_background(get_parent(), mx,my, th,th); + flash(mx,my, th,th); + status_text->reposition_window(mx, my); + } + if( msg_color < 0 ) + msg_color = mwindow->theme->message_normal; + status_text->set_color(msg_color); status_text->update(text); } + void StatusBar::reset_default_message() { status_color = -1;