]> git.lyx.org Git - features.git/blobdiff - src/frontends/qt/GuiHSpace.cpp
Show size of named spaces in dialog
[features.git] / src / frontends / qt / GuiHSpace.cpp
index 4307ae0e0f35ec1f659719dc5f85ab542705ee63..3c4c62a5d7afc27481fae43f8cf37eab2deaa3bb 100644 (file)
@@ -41,35 +41,28 @@ GuiHSpace::GuiHSpace(bool math_mode, QWidget * parent)
        setupUi(this);
 
        spacingCO->clear();
-       if (math_mode_) {
-               spacingCO->addItem(qt_("Interword Space"), "normal");
-               spacingCO->addItem(qt_("Thin Space"), "thinspace");
-               spacingCO->addItem(qt_("Medium Space"), "medspace");
-               spacingCO->addItem(qt_("Thick Space"), "thickspace");
-               spacingCO->addItem(qt_("Negative Thin Space"), "negthinspace");
-               spacingCO->addItem(qt_("Negative Medium Space"), "negmedspace");
-               spacingCO->addItem(qt_("Negative Thick Space"), "negthickspace");
-               spacingCO->addItem(qt_("Half Quad (0.5 em)"), "halfquad");
-               spacingCO->addItem(qt_("Quad (1 em)"), "quad");
-               spacingCO->addItem(qt_("Double Quad (2 em)"), "qquad");
-               spacingCO->addItem(qt_("Horizontal Fill"), "hfill");
-               spacingCO->addItem(qt_("Custom"), "custom");
-       } else {
-               spacingCO->addItem(qt_("Interword Space"), "normal");
-               spacingCO->addItem(qt_("Thin Space"), "thinspace");
-               spacingCO->addItem(qt_("Negative Thin Space"), "negthinspace");
-               spacingCO->addItem(qt_("Negative Medium Space"), "negmedspace");
-               spacingCO->addItem(qt_("Negative Thick Space"), "negthickspace");
-               spacingCO->addItem(qt_("Half Quad (0.5 em)"), "halfquad");
-               spacingCO->addItem(qt_("Quad (1 em)"), "quad");
-               spacingCO->addItem(qt_("Double Quad (2 em)"), "qquad");
-               spacingCO->addItem(qt_("Horizontal Fill"), "hfill");
-               spacingCO->addItem(qt_("Custom"), "custom");
+       spacingCO->addItem(qt_("Interword Space"), "normal");
+       spacingCO->addItem(qt_("Thin Space (1/6 em)"), "thinspace");
+       spacingCO->addItem(qt_("Medium Space (2/9 em)"), "medspace");
+       spacingCO->addItem(qt_("Thick Space (5/18 em)"), "thickspace");
+       spacingCO->addItem(qt_("Negative Thin Space (−1/6 em)"), "negthinspace");
+       spacingCO->addItem(qt_("Negative Medium Space (−2/9 em)"), "negmedspace");
+       spacingCO->addItem(qt_("Negative Thick Space (−5/18 em)"), "negthickspace");
+       spacingCO->addItem(qt_("Half Quad (1/2 em)"), "halfquad");
+       spacingCO->addItem(qt_("Quad (1 em)"), "quad");
+       spacingCO->addItem(qt_("Double Quad (2 em)"), "qquad");
+       spacingCO->addItem(qt_("Horizontal Fill"), "hfill");
+       if (!math_mode_)
                spacingCO->addItem(qt_("Visible Space"), "visible");
-       }
+       spacingCO->addItem(qt_("Custom"), "custom");
 
+#if QT_VERSION < 0x050e00
        connect(spacingCO, SIGNAL(highlighted(QString)),
                this, SLOT(changedSlot()));
+#else
+       connect(spacingCO, SIGNAL(textHighlighted(QString)),
+               this, SLOT(changedSlot()));
+#endif
        connect(valueLE, SIGNAL(textChanged(QString)),
                this, SLOT(changedSlot()));
        connect(spacingCO, SIGNAL(activated(int)),
@@ -305,13 +298,17 @@ docstring GuiHSpace::dialogToParams() const
 bool GuiHSpace::checkWidgets(bool readonly) const
 {
        valueLE->setReadOnly(readonly);
-
+       spacingCO->setEnabled(!readonly);
+       spacingL->setEnabled(!readonly);
+       
        if (readonly) {
-               spacingCO->setEnabled(false);
-               unitCO->setEnabled(false);
                fillPatternCO->setEnabled(false);
+               fillPatternL->setEnabled(false);
                keepCB->setEnabled(false);
+               keepL->setEnabled(false);
                valueLE->setEnabled(false);
+               valueL->setEnabled(false);
+               unitCO->setEnabled(false);
        } else
                enableWidgets();