white is better ... 32/13932/2
Antoine ELIAS [Thu, 6 Mar 2014 14:15:14 +0000 (15:15 +0100)]
Change-Id: I93102552cfbf62c2ff8334fc039f2dfd8cf33272

scilab/modules/demo_tools/macros/demo_gui.xml
scilab/modules/gui/demos/cb_uicontrol_plot3d.dem.sci

index 6e30020..d2dfab7 100644 (file)
@@ -1,65 +1,65 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <scilabgui usedeprecatedskin="off" version="1.0">
-    <figure axes_size="250,500" default_axes="off" dockable="off" figure_id="100000" figure_name="" infobar_visible="off" layout="1" menubar="0" menubar_visible="off" resizefcn="resize_demo_gui" tag="scilab_demo_fig" toolbar="0" toolbar_visible="off" visible="off" icon="applications-system">
-        <frame gridbagfill="3" gridbaggrid="10,1,1,1" gridbagpreferredsize="0,0" gridbagweight="1.0,1.0" layout="1" tag="frame_10" visible="off">
-            <borders color="black" fontangle="normal" fontname="" fontsize="12" fontweight="bold" justification="2" style="titled" title="">
+    <figure axes_size="250,500" default_axes="off" dockable="off" figure_id="100000" figure_name="" infobar_visible="off" layout="1" menubar="0" menubar_visible="off" resizefcn="resize_demo_gui" tag="scilab_demo_fig" toolbar="0" toolbar_visible="off" visible="off" icon="applications-system" >
+        <frame gridbagfill="3" gridbaggrid="10,1,1,1" gridbagpreferredsize="0,0" gridbagweight="1.0,1.0" layout="1" tag="frame_10" visible="off" backgroundcolor="1,1,1">
+            <borders color="black" fontangle="normal" fontname="" fontsize="12" fontweight="bold" justification="1" style="titled" title="">
                 <title style="empty"/>
             </borders>
             <listbox callback="script_path = demo_gui_update();if ~isempty(script_path) then exec(script_path, -1);end;clear script_path;" callback_type="0" fontsize="12.0" gridbagfill="3" gridbaggrid="1,1,1,4" gridbagweight="1.0,1.0" tag="listbox_10" value="3.0"/>
         </frame>
-        <frame gridbagfill="3" gridbaggrid="9,1,1,1" gridbagpreferredsize="0,0" gridbagweight="1.0,1.0" layout="1" tag="frame_9" visible="off">
-            <borders color="black" fontangle="normal" fontname="" fontsize="12" fontweight="bold" justification="2" style="titled" title="">
+        <frame gridbagfill="3" gridbaggrid="9,1,1,1" gridbagpreferredsize="0,0" gridbagweight="1.0,1.0" layout="1" tag="frame_9" visible="off" backgroundcolor="1,1,1">
+            <borders color="black" fontangle="normal" fontname="" fontsize="12" fontweight="bold" justification="1" style="titled" title="">
                 <title style="empty"/>
             </borders>
             <listbox callback="script_path = demo_gui_update();if ~isempty(script_path) then exec(script_path, -1);end;clear script_path;" callback_type="0" fontsize="12.0" gridbagfill="3" gridbaggrid="1,1,1,4" gridbagweight="1.0,1.0" tag="listbox_9" value="3.0"/>
         </frame>
-        <frame gridbagfill="3" gridbaggrid="8,1,1,1" gridbagpreferredsize="0,0" gridbagweight="1.0,1.0" layout="1" tag="frame_8" visible="off">
-            <borders color="black" fontangle="normal" fontname="" fontsize="12" fontweight="bold" justification="2" style="titled" title="">
+        <frame gridbagfill="3" gridbaggrid="8,1,1,1" gridbagpreferredsize="0,0" gridbagweight="1.0,1.0" layout="1" tag="frame_8" visible="off" backgroundcolor="1,1,1">
+            <borders color="black" fontangle="normal" fontname="" fontsize="12" fontweight="bold" justification="1" style="titled" title="">
                 <title style="empty"/>
             </borders>
             <listbox callback="script_path = demo_gui_update();if ~isempty(script_path) then exec(script_path, -1);end;clear script_path;" callback_type="0" fontsize="12.0" gridbagfill="3" gridbaggrid="1,1,1,4" gridbagweight="1.0,1.0" tag="listbox_8" value="3.0"/>
         </frame>
-        <frame gridbagfill="3" gridbaggrid="7,1,1,1" gridbagpreferredsize="0,0" gridbagweight="1.0,1.0" layout="1" tag="frame_7" visible="off">
-            <borders color="black" fontangle="normal" fontname="" fontsize="12" fontweight="bold" justification="2" style="titled" title="">
+        <frame gridbagfill="3" gridbaggrid="7,1,1,1" gridbagpreferredsize="0,0" gridbagweight="1.0,1.0" layout="1" tag="frame_7" visible="off" backgroundcolor="1,1,1">
+            <borders color="black" fontangle="normal" fontname="" fontsize="12" fontweight="bold" justification="1" style="titled" title="">
                 <title style="empty"/>
             </borders>
             <listbox callback="script_path = demo_gui_update();if ~isempty(script_path) then exec(script_path, -1);end;clear script_path;" callback_type="0" fontsize="12.0" gridbagfill="3" gridbaggrid="1,1,1,4" gridbagweight="1.0,1.0" tag="listbox_7" value="3.0"/>
         </frame>
-        <frame gridbagfill="3" gridbaggrid="6,1,1,1" gridbagpreferredsize="0,0" gridbagweight="1.0,1.0" layout="1" tag="frame_6" visible="off">
-            <borders color="black" fontangle="normal" fontname="" fontsize="12" fontweight="bold" justification="2" style="titled" title="">
+        <frame gridbagfill="3" gridbaggrid="6,1,1,1" gridbagpreferredsize="0,0" gridbagweight="1.0,1.0" layout="1" tag="frame_6" visible="off" backgroundcolor="1,1,1">
+            <borders color="black" fontangle="normal" fontname="" fontsize="12" fontweight="bold" justification="1" style="titled" title="">
                 <title style="empty"/>
             </borders>
             <listbox callback="script_path = demo_gui_update();if ~isempty(script_path) then exec(script_path, -1);end;clear script_path;" callback_type="0" fontsize="12.0" gridbagfill="3" gridbaggrid="1,1,1,4" gridbagweight="1.0,1.0" tag="listbox_6" value="3.0"/>
         </frame>
-        <frame gridbagfill="3" gridbaggrid="5,1,1,1" gridbagpreferredsize="0,0" gridbagweight="1.0,1.0" layout="1" tag="frame_5" visible="off">
-            <borders color="black" fontangle="normal" fontname="" fontsize="12" fontweight="bold" justification="2" style="titled" title="">
+        <frame gridbagfill="3" gridbaggrid="5,1,1,1" gridbagpreferredsize="0,0" gridbagweight="1.0,1.0" layout="1" tag="frame_5" visible="off" backgroundcolor="1,1,1">
+            <borders color="black" fontangle="normal" fontname="" fontsize="12" fontweight="bold" justification="1" style="titled" title="">
                 <title style="empty"/>
             </borders>
             <listbox callback="script_path = demo_gui_update();if ~isempty(script_path) then exec(script_path, -1);end;clear script_path;" callback_type="0" fontsize="12.0" gridbagfill="3" gridbaggrid="1,1,1,4" gridbagweight="1.0,1.0" tag="listbox_5" value="3.0"/>
         </frame>
-        <frame gridbagfill="3" gridbaggrid="4,1,1,1" gridbagpreferredsize="0,0" gridbagweight="1.0,1.0" layout="1" tag="frame_4" visible="off">
-            <borders color="black" fontangle="normal" fontname="" fontsize="12" fontweight="bold" justification="2" style="titled" title="">
+        <frame gridbagfill="3" gridbaggrid="4,1,1,1" gridbagpreferredsize="0,0" gridbagweight="1.0,1.0" layout="1" tag="frame_4" visible="off" backgroundcolor="1,1,1">
+            <borders color="black" fontangle="normal" fontname="" fontsize="12" fontweight="bold" justification="1" style="titled" title="">
                 <title style="empty"/>
             </borders>
             <listbox callback="script_path = demo_gui_update();if ~isempty(script_path) then exec(script_path, -1);end;clear script_path;" callback_type="0" fontsize="12.0" gridbagfill="3" gridbaggrid="1,1,1,4" gridbagweight="1.0,1.0" tag="listbox_74" value="3.0"/>
         </frame>
-        <frame gridbagfill="3" gridbaggrid="3,1,1,1" gridbagpreferredsize="0,0" gridbagweight="1.0,1.0" layout="1" tag="frame_3" visible="off">
-            <borders color="black" fontangle="normal" fontname="" fontsize="12" fontweight="bold" justification="2" style="titled" title="">
+        <frame gridbagfill="3" gridbaggrid="3,1,1,1" gridbagpreferredsize="0,0" gridbagweight="1.0,1.0" layout="1" tag="frame_3" visible="off" backgroundcolor="1,1,1">
+            <borders color="black" fontangle="normal" fontname="" fontsize="12" fontweight="bold" justification="1" style="titled" title="">
                 <title style="empty"/>
             </borders>
             <listbox callback="script_path = demo_gui_update();if ~isempty(script_path) then exec(script_path, -1);end;clear script_path;" callback_type="0" fontsize="12.0" gridbagfill="3" gridbaggrid="1,1,1,4" gridbagweight="1.0,1.0" tag="listbox_3" value="3.0"/>
         </frame>
-        <frame gridbagfill="3" gridbaggrid="2,1,1,1" gridbagpreferredsize="0,0" gridbagweight="1.0,1.0" layout="1" tag="frame_2" visible="off">
-            <borders color="black" fontangle="normal" fontname="" fontsize="12" fontweight="bold" justification="2" style="titled" title="">
+        <frame gridbagfill="3" gridbaggrid="2,1,1,1" gridbagpreferredsize="0,0" gridbagweight="1.0,1.0" layout="1" tag="frame_2" visible="off" backgroundcolor="1,1,1">
+            <borders color="black" fontangle="normal" fontname="" fontsize="12" fontweight="bold" justification="1" style="titled" title="">
                 <title style="empty"/>
             </borders>
             <listbox callback="script_path = demo_gui_update();if ~isempty(script_path) then exec(script_path, -1);end;clear script_path;" callback_type="0" fontsize="12.0" gridbagfill="3" gridbaggrid="1,1,1,4" gridbagweight="1.0,1.0" tag="listbox_2" value="3.0"/>
         </frame>
-        <frame gridbagfill="3" gridbaggrid="1,1,1,1" gridbagpreferredsize="0,0" gridbagweight="1.0,1.0" layout="1" tag="frame_1">
-            <borders color="black" fontangle="normal" fontname="" fontsize="12" fontweight="bold" justification="2" style="titled" title="">
+        <frame gridbagfill="3" gridbaggrid="1,1,1,1" gridbagpreferredsize="0,0" gridbagweight="1.0,1.0" layout="1" tag="frame_1" backgroundcolor="1,1,1">
+            <borders color="black" fontangle="normal" fontname="" fontsize="12" fontweight="bold" justification="1" style="titled" title="">
                 <title style="empty"/>
             </borders>
-            <image gridbagfill="3" gridbaggrid="1,5,1,1" gridbagweight="1.0,0.1" horizontalalignment="center" string="SCI/modules/demo_tools/images/logo_scilab.png" tag="scilab_logo"/>
+            <image gridbagfill="3" gridbaggrid="1,5,1,1" gridbagweight="1.0,0.1" horizontalalignment="center" string="SCI/modules/demo_tools/images/logo_scilab.png" tag="scilab_logo" backgroundcolor="1,1,1"/>
             <listbox callback="script_path = demo_gui_update();if ~isempty(script_path) then exec(script_path, -1);end;clear script_path;" callback_type="0" fontsize="12.0" gridbagfill="3" gridbaggrid="1,1,1,4" gridbagweight="1.0,1.0" tag="listbox_1" value="3.0"/>
         </frame>
     </figure>
index dfed178..1fb53cd 100644 (file)
@@ -21,15 +21,15 @@ function uicontrol_plot3d()
         "layout", "gridbag", ...
         "visible", "off");
 
+    fakeframe_height = 10;
     demo_plot3d.figure_id       = 100001;
     demo_plot3d.background      = -2;
-    demo_plot3d.color_map       = jetcolormap(32);
+    demo_plot3d.color_map       = jetcolormap(128);
     demo_plot3d.figure_position = [0 0];
     demo_plot3d.figure_name     = gettext("Control Plot3d");
     demo_plot3d.axes_size       = [900 450];
 
     // New menu
-
     h = uimenu(demo_plot3d, ...
         "label" , gettext("File"));
 
@@ -43,23 +43,27 @@ function uicontrol_plot3d()
     frame_left = uicontrol(demo_plot3d, ...
         "style", "frame", ...
         "constraints", createConstraints("gridbag", [1, 1, 1, 1], [0.4, 1], "both", "left", [0, 0], [0, 0]), ...
-        "border", createBorders("titled", createBorders("empty"), _("Control Panel"), "center", "top", createFontBorder("", 16, "bold"), "black"), ...
+        "border", createBorders("titled", createBorders("line", "lightGray", 1), _("Control Panel"), "center", "below_top", createFontBorder("", 16, "normal"), "black"), ...
+        "backgroundcolor", [1 1 1], ...
         "layout", "gridbag");
 
     //estetic panel
     frame_angle = uicontrol(frame_left, ...
         "style", "frame", ...
-        "constraints", createConstraints("gridbag", [1, 1, 1, 1], [0, 0], "both", "center", [0, 5]));
+        "backgroundcolor", [1 1 1], ...
+        "constraints", createConstraints("gridbag", [1, 1, 1, 1], [0, 0], "both", "center", [0, fakeframe_height]));
 
     //angle
     frame_angle = uicontrol(frame_left, ...
         "style", "frame", ...
+        "backgroundcolor", [1 1 1], ...
         "constraints", createConstraints("gridbag", [1, 2, 1, 1], [0, 0], "both", "center"), ...
-        "border", createBorders("titled", createBorders("line", "lightGray", 1), _("Rotation angle"), "center", "top", createFontBorder("", 11, "bold"), "black"), ...
+        "border", createBorders("titled", createBorders("line", "lightGray", 1), _("Rotation angle"), "center", "top", createFontBorder("", 11, "normal"), "black"), ...
         "layout", "border");
 
     uicontrol(frame_angle, ...
         "style", "slider", ...
+        "backgroundcolor", [1 1 1], ...
         "value", 70, ...
         "min", 0, ...
         "max", 360, ...
@@ -69,19 +73,22 @@ function uicontrol_plot3d()
     //estetic panel
     frame_angle = uicontrol(frame_left, ...
         "style", "frame", ...
-        "constraints", createConstraints("gridbag", [1, 3, 1, 1], [0, 0], "both", "center", [0, 5]));
+        "backgroundcolor", [1 1 1], ...
+        "constraints", createConstraints("gridbag", [1, 3, 1, 1], [0, 0], "both", "center", [0, fakeframe_height]));
 
     //colormap
     frame_colormap = uicontrol(frame_left, ...
         "style", "frame", ...
+        "backgroundcolor", [1 1 1], ...
         "constraints", createConstraints("gridbag", [1, 4, 1, 1], [0, 0], "both", "center"), ...
-        "border", createBorders("titled", createBorders("line", "lightGray", 1), _("Colormap"), "center", "top", createFontBorder("", 11, "bold"), "black"), ...
+        "border", createBorders("titled", createBorders("line", "lightGray", 1), _("Colormap"), "center", "top", createFontBorder("", 11, "normal"), "black"), ...
         "layout_options", createLayoutOptions("grid", [3, 1]));
 
     frame_colormap.layout = "grid";
 
     uicontrol(frame_colormap, ...
         "style", "radiobutton", ...
+        "backgroundcolor", [1 1 1], ...
         "tag", "graycolormap", ...
         "string", "Graycolormap", ...
         "groupname", "colormap", ...
@@ -89,6 +96,7 @@ function uicontrol_plot3d()
 
     uicontrol(frame_colormap, ...
         "style", "radiobutton", ...
+        "backgroundcolor", [1 1 1], ...
         "tag", "hotcolormap", ...
         "string", "Hotcolormap", ...
         "groupname", "colormap", ...
@@ -96,6 +104,7 @@ function uicontrol_plot3d()
 
     jet = uicontrol(frame_colormap, ...
         "tag", "jetcolormap", ...
+        "backgroundcolor", [1 1 1], ...
         "style", "radiobutton", ...
         "string", "Jetcolormap", ...
         "groupname", "colormap", ...
@@ -106,13 +115,15 @@ function uicontrol_plot3d()
     //estetic panel
     frame_angle = uicontrol(frame_left, ...
         "style", "frame", ...
-        "constraints", createConstraints("gridbag", [1, 5, 1, 1], [0, 0], "both", "center", [0, 5]));
+        "backgroundcolor", [1 1 1], ...
+        "constraints", createConstraints("gridbag", [1, 5, 1, 1], [0, 0], "both", "center", [0, fakeframe_height]));
 
     //background
     frame_background = uicontrol(frame_left, ...
         "style", "frame", ...
+        "backgroundcolor", [1 1 1], ...
         "constraints", createConstraints("gridbag", [1, 6, 1, 1], [0, 0], "both", "center"), ...
-        "border", createBorders("titled", createBorders("line", "lightGray", 1), _("Background Color"), "center", "top", createFontBorder("", 11, "bold"), "black"), ..
+        "border", createBorders("titled", createBorders("line", "lightGray", 1), _("Background Color"), "center", "top", createFontBorder("", 11, "normal"), "black"), ..
         "layout", "border");
 
     uicontrol(frame_background, ...
@@ -127,37 +138,43 @@ function uicontrol_plot3d()
     //estetic panel
     frame_angle = uicontrol(frame_left, ...
         "style", "frame", ...
-        "constraints", createConstraints("gridbag", [1, 7, 1, 1], [0, 0], "both", "center", [0, 5]));
+        "backgroundcolor", [1 1 1], ...
+        "constraints", createConstraints("gridbag", [1, 7, 1, 1], [0, 0], "both", "center", [0, fakeframe_height]));
 
     //Show/hide
     frame_style = uicontrol(frame_left, ...
         "style", "frame", ...
+        "backgroundcolor", [1 1 1], ...
         "constraints", createConstraints("gridbag", [1, 8, 1, 1], [1, 1], "both", "center"), ...
-        "border", createBorders("titled", createBorders("line", "lightGray", 1), _("Show / Hide"), "center", "top", createFontBorder("", 11, "bold"), "black"), ...
+        "border", createBorders("titled", createBorders("line", "lightGray", 1), _("Show / Hide"), "center", "top", createFontBorder("", 11, "normal"), "black"), ...
         "layout_options", createLayoutOptions("grid", [4, 1]));
 
     frame_style.layout = "grid";
 
     uicontrol(frame_style, ...
         "style", "checkbox", ...
+        "backgroundcolor", [1 1 1], ...
         "value", 1, ...
         "string", "Edges", ...
         "callback", "update_edges_visible");
 
     uicontrol(frame_style, ...
         "style", "checkbox", ...
+        "backgroundcolor", [1 1 1], ...
         "value", 1, ...
         "string", "Labels", ...
         "callback", "update_labels_visible");
 
     uicontrol(frame_style, ...
         "style", "checkbox", ...
+        "backgroundcolor", [1 1 1], ...
         "value", 1, ...
         "string", "Title", ...
         "callback", "update_title_visible");
 
     uicontrol(frame_style, ...
         "style", "checkbox", ...
+        "backgroundcolor", [1 1 1], ...
         "value", 1, ...
         "string", "Tics", ...
         "callback", "update_tics_visible");
@@ -165,17 +182,20 @@ function uicontrol_plot3d()
     //estetic panel
     frame_angle = uicontrol(frame_left, ...
         "style", "frame", ...
-        "constraints", createConstraints("gridbag", [1, 9, 1, 1], [0, 0], "both", "center", [0, 5]));
+        "backgroundcolor", [1 1 1], ...
+        "constraints", createConstraints("gridbag", [1, 9, 1, 1], [0, 0], "both", "center", [0, fakeframe_height]));
 
     //Title
     frame_style = uicontrol(frame_left, ...
         "style", "frame", ...
+        "backgroundcolor", [1 1 1], ...
         "constraints", createConstraints("gridbag", [1, 10, 1, 1], [1, 0], "both", "center"), ...
-        "border", createBorders("titled", createBorders("line", "lightGray", 1), _("Title"), "center", "top", createFontBorder("", 11, "bold"), "black"), ...
+        "border", createBorders("titled", createBorders("line", "lightGray", 1), _("Title"), "center", "top", createFontBorder("", 11, "normal"), "black"), ...
         "layout", "border");
 
     uicontrol(frame_style, ...
         "style", "edit", ...
+        "backgroundcolor", [1 1 1], ...
         "string", "My Beautiful Plot", ...
         "callback", "update_title_string", ...
         "tag", "title");
@@ -190,7 +210,6 @@ function uicontrol_plot3d()
     newaxes(frame_right);
     demo_plot3d.immediate_drawing = "off";
     plot3d();
-    light(visible="on", type="point", position=[0 0 1]);
 
     a = gca();
     a.tag                   = "plot";
@@ -237,11 +256,11 @@ function update_colormap()
     end
 
     if get(gcbo, "tag") == "jetcolormap" then
-        my_figure.color_map = jetcolormap(32);
+        my_figure.color_map = jetcolormap(128);
     elseif get(gcbo, "tag") == "hotcolormap" then
-        my_figure.color_map = hotcolormap(32);
+        my_figure.color_map = hotcolormap(128);
     elseif get(gcbo, "tag") == "graycolormap" then
-        my_figure.color_map = graycolormap(32);
+        my_figure.color_map = graycolormap(128);
     end
 
     if my_cur_bg_color_id > 32 then
@@ -317,7 +336,7 @@ endfunction
 function update_edges_visible()
 
     my_plot_axes = gca();
-    my_plot3d    = my_plot_axes.children(2);
+    my_plot3d    = my_plot_axes.children($);
 
     if get(gcbo,"value") == 0 then
         my_plot3d.color_mode = -1;