commit 34da63445181325d846d47e866637fe72b38b984
Author: Uwe Stöhr <uwesto...@lyx.org>
Date:   Tue May 12 00:28:29 2015 +0200

    BoxUi.ui: update tooltips and tab order
    
    - InsetBox.cpp: constify

diff --git a/src/frontends/qt4/ui/BoxUi.ui b/src/frontends/qt4/ui/BoxUi.ui
index bd530c2..22ae57d 100644
--- a/src/frontends/qt4/ui/BoxUi.ui
+++ b/src/frontends/qt4/ui/BoxUi.ui
@@ -39,32 +39,55 @@
         </property>
        </widget>
       </item>
-      <item row="1" column="0">
-       <widget class="QCheckBox" name="widthCB">
+      <item row="0" column="1" colspan="2">
+       <widget class="QComboBox" name="innerBoxCO">
         <property name="toolTip">
-         <string/>
+         <string>Inner box type</string>
         </property>
-        <property name="text">
-         <string>&amp;Width:</string>
+        <item>
+         <property name="text">
+          <string>None</string>
+         </property>
+        </item>
+        <item>
+         <property name="text">
+          <string>Parbox</string>
+         </property>
+        </item>
+        <item>
+         <property name="text">
+          <string>Minipage</string>
+         </property>
+        </item>
+       </widget>
+      </item>
+      <item row="3" column="0" colspan="2">
+       <widget class="QCheckBox" name="pagebreakCB">
+        <property name="toolTip">
+         <string>Check this if the box should break across pages</string>
         </property>
-        <property name="checked">
-         <bool>false</bool>
+        <property name="text">
+         <string>Allow &amp;page breaks</string>
         </property>
-        <property name="tristate">
+       </widget>
+      </item>
+      <item row="2" column="2">
+       <widget class="lyx::frontend::LengthCombo" name="heightUnitsLC">
+        <property name="enabled">
          <bool>false</bool>
         </property>
        </widget>
       </item>
-      <item row="1" column="1">
-       <widget class="QLineEdit" name="widthED">
+      <item row="2" column="1">
+       <widget class="QLineEdit" name="heightED">
+        <property name="enabled">
+         <bool>false</bool>
+        </property>
         <property name="toolTip">
-         <string>Width value</string>
+         <string>Height value</string>
         </property>
        </widget>
       </item>
-      <item row="1" column="2">
-       <widget class="lyx::frontend::LengthCombo" name="widthUnitsLC"/>
-      </item>
       <item row="2" column="0">
        <widget class="QCheckBox" name="heightCB">
         <property name="toolTip">
@@ -81,53 +104,30 @@
         </property>
        </widget>
       </item>
-      <item row="2" column="1">
-       <widget class="QLineEdit" name="heightED">
-        <property name="enabled">
-         <bool>false</bool>
-        </property>
-        <property name="toolTip">
-         <string>Height value</string>
-        </property>
-       </widget>
+      <item row="1" column="2">
+       <widget class="lyx::frontend::LengthCombo" name="widthUnitsLC"/>
       </item>
-      <item row="2" column="2">
-       <widget class="lyx::frontend::LengthCombo" name="heightUnitsLC">
-        <property name="enabled">
-         <bool>false</bool>
+      <item row="1" column="1">
+       <widget class="QLineEdit" name="widthED">
+        <property name="toolTip">
+         <string>Width value</string>
         </property>
        </widget>
       </item>
-      <item row="3" column="0" colspan="2">
-       <widget class="QCheckBox" name="pagebreakCB">
+      <item row="1" column="0">
+       <widget class="QCheckBox" name="widthCB">
         <property name="toolTip">
-         <string>Check this if the box should break across pages</string>
+         <string/>
         </property>
         <property name="text">
-         <string>Allow &amp;page breaks</string>
+         <string>&amp;Width:</string>
         </property>
-       </widget>
-      </item>
-      <item row="0" column="1" colspan="2">
-       <widget class="QComboBox" name="innerBoxCO">
-        <property name="toolTip">
-         <string>Inner box -- needed for fixed width &amp; line breaks</string>
+        <property name="checked">
+         <bool>false</bool>
+        </property>
+        <property name="tristate">
+         <bool>false</bool>
         </property>
-        <item>
-         <property name="text">
-          <string>None</string>
-         </property>
-        </item>
-        <item>
-         <property name="text">
-          <string>Parbox</string>
-         </property>
-        </item>
-        <item>
-         <property name="text">
-          <string>Minipage</string>
-         </property>
-        </item>
        </widget>
       </item>
      </layout>
@@ -142,8 +142,51 @@
       <bool>true</bool>
      </property>
      <layout class="QGridLayout" name="gridLayout_2">
-      <item row="1" column="2">
-       <widget class="QComboBox" name="halignCO">
+      <item row="0" column="2">
+       <widget class="QLabel" name="halignLA">
+        <property name="toolTip">
+         <string>Horizontal alignment of the content inside the box</string>
+        </property>
+        <property name="text">
+         <string>Horizontal</string>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="1">
+       <widget class="QLabel" name="ialignLA">
+        <property name="toolTip">
+         <string>Vertical alignment of the content inside the box</string>
+        </property>
+        <property name="text">
+         <string>Vertical</string>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="0">
+       <widget class="QLabel" name="label">
+        <property name="text">
+         <string>Co&amp;ntent:</string>
+        </property>
+        <property name="buddy">
+         <cstring>ialignCO</cstring>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="0">
+       <widget class="QLabel" name="valignLA">
+        <property name="toolTip">
+         <string>Vertical alignment of the box (with regard to 
baseline)</string>
+        </property>
+        <property name="text">
+         <string>&amp;Box:</string>
+        </property>
+        <property name="buddy">
+         <cstring>valignCO</cstring>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="1">
+       <widget class="QComboBox" name="ialignCO">
         <property name="enabled">
          <bool>true</bool>
         </property>
@@ -154,43 +197,28 @@
          </sizepolicy>
         </property>
         <property name="toolTip">
-         <string>Horizontal alignment of the content inside the box</string>
+         <string>Vertical alignment of the content inside the box</string>
         </property>
         <item>
          <property name="text">
-          <string>Left</string>
+          <string>Top</string>
          </property>
         </item>
         <item>
          <property name="text">
-          <string>Center</string>
+          <string>Middle</string>
          </property>
         </item>
         <item>
          <property name="text">
-          <string>Right</string>
+          <string>Bottom</string>
+         </property>
+        </item>
+        <item>
+         <property name="text">
+          <string>Stretch</string>
          </property>
         </item>
-       </widget>
-      </item>
-      <item row="0" column="1">
-       <widget class="QLabel" name="ialignLA">
-        <property name="toolTip">
-         <string>Vertical alignment of the content inside the box</string>
-        </property>
-        <property name="text">
-         <string>Vertical</string>
-        </property>
-       </widget>
-      </item>
-      <item row="0" column="2">
-       <widget class="QLabel" name="halignLA">
-        <property name="toolTip">
-         <string>Horizontal alignment of the content inside the box</string>
-        </property>
-        <property name="text">
-         <string>Horizontal</string>
-        </property>
        </widget>
       </item>
       <item row="2" column="1">
@@ -218,8 +246,8 @@
         </item>
        </widget>
       </item>
-      <item row="1" column="1">
-       <widget class="QComboBox" name="ialignCO">
+      <item row="1" column="2">
+       <widget class="QComboBox" name="halignCO">
         <property name="enabled">
          <bool>true</bool>
         </property>
@@ -230,53 +258,25 @@
          </sizepolicy>
         </property>
         <property name="toolTip">
-         <string>Vertical alignment of the content inside the box</string>
+         <string>Horizontal alignment of the content inside the box</string>
         </property>
         <item>
          <property name="text">
-          <string>Top</string>
-         </property>
-        </item>
-        <item>
-         <property name="text">
-          <string>Middle</string>
+          <string>Left</string>
          </property>
         </item>
         <item>
          <property name="text">
-          <string>Bottom</string>
+          <string>Center</string>
          </property>
         </item>
         <item>
          <property name="text">
-          <string>Stretch</string>
+          <string>Right</string>
          </property>
         </item>
        </widget>
       </item>
-      <item row="1" column="0">
-       <widget class="QLabel" name="label">
-        <property name="text">
-         <string>Co&amp;ntent:</string>
-        </property>
-        <property name="buddy">
-         <cstring>ialignCO</cstring>
-        </property>
-       </widget>
-      </item>
-      <item row="2" column="0">
-       <widget class="QLabel" name="valignLA">
-        <property name="toolTip">
-         <string>Vertical alignment of the box (with regard to 
baseline)</string>
-        </property>
-        <property name="text">
-         <string>&amp;Box:</string>
-        </property>
-        <property name="buddy">
-         <cstring>valignCO</cstring>
-        </property>
-       </widget>
-      </item>
      </layout>
     </widget>
    </item>
@@ -289,30 +289,30 @@
       <bool>true</bool>
      </property>
      <layout class="QGridLayout" name="gridLayout">
-      <item row="0" column="0">
-       <widget class="QLabel" name="typeLA">
-        <property name="toolTip">
-         <string/>
-        </property>
+      <item row="1" column="0">
+       <widget class="QLabel" name="thicknessLA">
         <property name="text">
-         <string>&amp;Decoration:</string>
-        </property>
-        <property name="buddy">
-         <cstring>typeCO</cstring>
+         <string>Line thickness:</string>
         </property>
        </widget>
       </item>
       <item row="0" column="1" colspan="2">
        <widget class="QComboBox" name="typeCO">
         <property name="toolTip">
-         <string>Supported box types</string>
+         <string>Decoration box types</string>
         </property>
        </widget>
       </item>
-      <item row="1" column="0">
-       <widget class="QLabel" name="thicknessLA">
+      <item row="0" column="0">
+       <widget class="QLabel" name="typeLA">
+        <property name="toolTip">
+         <string/>
+        </property>
         <property name="text">
-         <string>Line thickness:</string>
+         <string>&amp;Decoration:</string>
+        </property>
+        <property name="buddy">
+         <cstring>typeCO</cstring>
         </property>
        </widget>
       </item>
@@ -322,7 +322,14 @@
          <bool>false</bool>
         </property>
         <property name="toolTip">
-         <string>Width value</string>
+         <string>Thickness value</string>
+        </property>
+       </widget>
+      </item>
+      <item row="3" column="0">
+       <widget class="QLabel" name="shadowsizeLA">
+        <property name="text">
+         <string>Shadow size:</string>
         </property>
        </widget>
       </item>
@@ -346,7 +353,7 @@
          <bool>false</bool>
         </property>
         <property name="toolTip">
-         <string>Width value</string>
+         <string>Separation value</string>
         </property>
        </widget>
       </item>
@@ -357,10 +364,10 @@
         </property>
        </widget>
       </item>
-      <item row="3" column="0">
-       <widget class="QLabel" name="shadowsizeLA">
-        <property name="text">
-         <string>Shadow size:</string>
+      <item row="3" column="2">
+       <widget class="lyx::frontend::LengthCombo" name="shadowsizeUnitsLC">
+        <property name="enabled">
+         <bool>false</bool>
         </property>
        </widget>
       </item>
@@ -370,14 +377,7 @@
          <bool>false</bool>
         </property>
         <property name="toolTip">
-         <string>Width value</string>
-        </property>
-       </widget>
-      </item>
-      <item row="3" column="2">
-       <widget class="lyx::frontend::LengthCombo" name="shadowsizeUnitsLC">
-        <property name="enabled">
-         <bool>false</bool>
+         <string>Size value</string>
         </property>
        </widget>
       </item>
@@ -394,12 +394,24 @@
   </customwidget>
  </customwidgets>
  <tabstops>
-  <tabstop>typeCO</tabstop>
   <tabstop>innerBoxCO</tabstop>
+  <tabstop>widthCB</tabstop>
+  <tabstop>widthED</tabstop>
+  <tabstop>widthUnitsLC</tabstop>
   <tabstop>heightCB</tabstop>
+  <tabstop>heightED</tabstop>
+  <tabstop>heightUnitsLC</tabstop>
+  <tabstop>pagebreakCB</tabstop>
   <tabstop>ialignCO</tabstop>
   <tabstop>halignCO</tabstop>
   <tabstop>valignCO</tabstop>
+  <tabstop>typeCO</tabstop>
+  <tabstop>thicknessED</tabstop>
+  <tabstop>thicknessUnitsLC</tabstop>
+  <tabstop>separationED</tabstop>
+  <tabstop>separationUnitsLC</tabstop>
+  <tabstop>shadowsizeED</tabstop>
+  <tabstop>shadowsizeUnitsLC</tabstop>
  </tabstops>
  <includes>
   <include location="local">qt_i18n.h</include>
diff --git a/src/insets/InsetBox.cpp b/src/insets/InsetBox.cpp
index 011df87..0156603 100644
--- a/src/insets/InsetBox.cpp
+++ b/src/insets/InsetBox.cpp
@@ -274,11 +274,11 @@ void InsetBox::latex(otexstream & os, OutputParams const 
& runparams) const
 
        string width_string = params_.width.asLatexString();
        string thickness_string = params_.thickness.asLatexString();
-       string defaultThick = "0.4pt";
+       const string defaultThick = "0.4pt";
        string separation_string = params_.separation.asLatexString();
-       string defaultSep = "3pt";
+       const string defaultSep = "3pt";
        string shadowsize_string = params_.shadowsize.asLatexString();
-       string defaultShadow = "4pt";
+       const string defaultShadow = "4pt";
        bool stdwidth = false;
        // in general the overall width of some decorated boxes is wider thean 
the inner box
        // we could therefore calculate the real width for all sizes so that if 
the user wants

Reply via email to