<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://torbutton/skin/preferences.css" type="text/css"?>

<!DOCTYPE overlay SYSTEM "chrome://torbutton/locale/torbutton.dtd">

<dialog id="torbutton-prefs"
        xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
        xmlns:html="http://www.w3.org/1999/xhtml"
        title="&torbutton.prefs.security_settings;"
        buttons="accept,cancel"
        persist="screenX screenY width height"
        onload="torbutton_init_security_ui()"
        align="stretch"
        pack="center"
        maxheight="350"
        minwidth="400"
        maxwidth="600"
        ondialogaccept="torbutton_save_security_settings()"
        width="400" >

    <script type="application/x-javascript" src="torbutton_util.js"/>
    <script type="application/x-javascript" src="preferences.js"/>
    <vbox flex="1" align="stretch">
        <groupbox align="stretch" flex="1"> <!-- security settings container -->
          <caption label="&torbutton.prefs.sec_caption;"/>
          <hbox id="torbutton_slider_settings" flex="1" align="stretch" hidden="false">
            <vbox>
              <hbox height="200">
                <vbox>
                  <scale id="torbutton_sec_slider" flex="1" min="1" max="3"
                         movetoclick="true" orient="vertical"
                         onchange="torbutton_set_slider(this.value)"/>
                </vbox>
                <vbox>
                  <hbox flex="1" align="start">
                    <description id="torbutton_sec_high"
                                 onclick="torbutton_set_slider(1);"
                                 tooltip="high_preview">
                      &torbutton.prefs.sec_high;
                    </description>
                  </hbox>
                  <hbox flex="1" align="center">
                    <description id="torbutton_sec_medium"
                                 onclick="torbutton_set_slider(2);"
                                 tooltip="medium_preview">
                      &torbutton.prefs.sec_medium;
                    </description>
                  </hbox>
                  <hbox flex="1" align="end">
                    <description id="torbutton_sec_low"
                                 onclick="torbutton_set_slider(3);"
                                 tooltip="low_preview">
                      &torbutton.prefs.sec_low;
                    </description>
                  </hbox>
                </vbox>
              </hbox>
            </vbox>
            <vbox flex="1" width="400" style="overflow: auto;">
              <vbox id="desc_high" collapsed="true">
                <description
                  class="slider-text-size, slider-text-weight">
                  &torbutton.prefs.sec_gen_desc;
                </description>
                <description class="slider-text-size"
                  tooltiptext="&torbutton.prefs.sec_js_desc_tooltip;">
                  &torbutton.prefs.sec_all_js_desc;
                </description>
                <description class="slider-text-size"
                  tooltiptext="&torbutton.prefs.sec_jit_desc_tooltip; &torbutton.prefs.sec_baseline_jit_desc_tooltip;">
                  &torbutton.prefs.sec_all_jit_desc; &torbutton.prefs.sec_jit_slower_desc;
                </description>
                <description class="slider-text-size"
                  tooltiptext="&torbutton.prefs.sec_html5_tooltip;">
                  &torbutton.prefs.sec_html5_desc;
                </description>
                <description class="slider-text-size"
                  tooltiptext="&torbutton.prefs.sec_mathml_desc_tooltip;">
                  &torbutton.prefs.sec_mathml_desc;
                </description>
                <description class="slider-text-size"
                  tooltiptext="&torbutton.prefs.sec_font_rend_svg_tooltip;">
                  &torbutton.prefs.sec_font_rend_desc;
                </description>
                <description class="slider-text-size"
                  tooltiptext="&torbutton.prefs.sec_svg_desc_tooltip;">
                  &torbutton.prefs.sec_svg_desc;
                </description>
                <description class="slider-text-size"
                  tooltiptext="&torbutton.prefs.sec_webfonts_desc_tooltip;">
                  &torbutton.prefs.sec_webfonts_desc;
                </description>
              </vbox>
              <vbox id="desc_medium" collapsed="true">
                <description
                  class="slider-text-size, slider-text-weight">
                  &torbutton.prefs.sec_gen_desc;
                </description>
                <description class="slider-text-size"
                  tooltiptext="&torbutton.prefs.sec_js_desc_tooltip;">
                  &torbutton.prefs.sec_js_https_desc;
                </description>
                <description class="slider-text-size"
                  tooltiptext="&torbutton.prefs.sec_jit_desc_tooltip; &torbutton.prefs.sec_baseline_jit_desc_tooltip;">
                  &torbutton.prefs.sec_all_jit_desc; &torbutton.prefs.sec_jit_slower_desc;
                </description>
                <description class="slider-text-size"
                  tooltiptext="&torbutton.prefs.sec_html5_tooltip;">
                  &torbutton.prefs.sec_html5_desc;
                </description>
                <description class="slider-text-size"
                  tooltiptext="&torbutton.prefs.sec_mathml_desc_tooltip;">
                  &torbutton.prefs.sec_mathml_desc;
                </description>
                <description class="slider-text-size"
                  tooltiptext="&torbutton.prefs.sec_font_rend_svg_tooltip;">
                  &torbutton.prefs.sec_font_rend_desc;
                </description>
              </vbox>
              <vbox id="desc_low" collapsed="false">
                <description
                  class="slider-text-size, slider-text-weight">
                  &torbutton.prefs.sec_low_desc;
                </description>
                <description class="slider-text-size">
                  &torbutton.prefs.sec_low_usable_desc;
                </description>
              </vbox>
            </vbox>
          </hbox>
          <vbox id="torbutton_custom_settings"
                hidden="true"
                width="300"
                height="200"
                style="overflow:auto;">
            <description>
              &torbutton.prefs.custom_warning;
            </description>
            <hbox>
              <button id="torbutton_restore_defaults_button"
                      oncommand="torbutton_set_custom(false);"
                      label="&torbutton.prefs.restore_defaults;"/>
            </hbox>
          </vbox>
        </groupbox>
      </vbox>

   <tooltip id="high_preview">
     <html:b>&torbutton.prefs.sec_gen_desc;</html:b>
     <html:br></html:br>
     <html:br></html:br>
     <html:div>&torbutton.prefs.sec_all_js_desc;</html:div>
     <html:div>&torbutton.prefs.sec_all_jit_desc; &torbutton.prefs.sec_jit_slower_desc;</html:div>
     <html:div>&torbutton.prefs.sec_html5_desc;</html:div>
     <html:div>&torbutton.prefs.sec_mathml_desc;</html:div>
     <html:div>&torbutton.prefs.sec_font_rend_desc;</html:div>
     <html:div>&torbutton.prefs.sec_svg_desc;</html:div>
     <html:div>&torbutton.prefs.sec_webfonts_desc;</html:div>
   </tooltip>
   <tooltip id="medium_preview">
     <html:b>&torbutton.prefs.sec_gen_desc;</html:b>
     <html:br></html:br>
     <html:br></html:br>
     <html:div>&torbutton.prefs.sec_js_https_desc;</html:div>
     <html:div>&torbutton.prefs.sec_all_jit_desc; &torbutton.prefs.sec_jit_slower_desc;</html:div>
     <html:div>&torbutton.prefs.sec_html5_desc;</html:div>
     <html:div>&torbutton.prefs.sec_mathml_desc;</html:div>
     <html:div>&torbutton.prefs.sec_font_rend_desc;</html:div>
   </tooltip>
   <tooltip id="low_preview">
     <html:b>&torbutton.prefs.sec_low_desc;</html:b>
     <html:br></html:br>
     <html:br></html:br>
     <html:div>&torbutton.prefs.sec_low_usable_desc;</html:div>
   </tooltip>
 </dialog>
