From 3a635d78846ede7be867281a6a7db972bd0d478c Mon Sep 17 00:00:00 2001 From: Matthias Melcher Date: Fri, 16 Dec 2005 15:33:47 +0000 Subject: STR #1046: Fl_Window does not directly support a background image in FLTK 1.1.6 because those images are overwritten by Fl_Window::show() anyways. FLUID now grays out the unused "image" and "inactive image" input fields. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4716 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- fluid/Fl_Widget_Type.cxx | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/fluid/Fl_Widget_Type.cxx b/fluid/Fl_Widget_Type.cxx index accaa3a2a..d5f3f0e36 100644 --- a/fluid/Fl_Widget_Type.cxx +++ b/fluid/Fl_Widget_Type.cxx @@ -363,7 +363,7 @@ static Fl_Input *image_input; void image_cb(Fl_Input* i, void *v) { if (v == LOAD) { image_input = i; - if (current_widget->is_widget()) { + if (current_widget->is_widget() && !current_widget->is_window()) { i->activate(); i->static_value(((Fl_Widget_Type*)current_widget)->image_name()); } else i->deactivate(); @@ -381,8 +381,10 @@ void image_cb(Fl_Input* i, void *v) { void image_browse_cb(Fl_Button* b, void *v) { if (v == LOAD) { - if (current_widget->is_widget()) b->activate(); - else b->deactivate(); + if (current_widget->is_widget() && !current_widget->is_window()) + b->activate(); + else + b->deactivate(); } else { int mod = 0; if (ui_find_image(image_input->value())) { @@ -403,7 +405,7 @@ static Fl_Input *inactive_input; void inactive_cb(Fl_Input* i, void *v) { if (v == LOAD) { inactive_input = i; - if (current_widget->is_widget()) { + if (current_widget->is_widget() && !current_widget->is_window()) { i->activate(); i->static_value(((Fl_Widget_Type*)current_widget)->inactive_name()); } else i->deactivate(); @@ -421,8 +423,10 @@ void inactive_cb(Fl_Input* i, void *v) { void inactive_browse_cb(Fl_Button* b, void *v) { if (v == LOAD) { - if (current_widget->is_widget()) b->activate(); - else b->deactivate(); + if (current_widget->is_widget() && !current_widget->is_window()) + b->activate(); + else + b->deactivate(); } else { int mod = 0; if (ui_find_image(inactive_input->value())) { -- cgit v1.2.3