]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt/GuiHSpace.cpp
Fix readability
[lyx.git] / src / frontends / qt / GuiHSpace.cpp
index 9a1437009b9d2f79c258b694bf3469933f0cc9e1..bc2696dfc9c252b330bad8aba92328f9ab0f85ac 100644 (file)
@@ -41,14 +41,14 @@ GuiHSpace::GuiHSpace(bool math_mode, QWidget * parent)
        setupUi(this);
 
        spacingCO->clear();
-       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_("Normal 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");
@@ -56,8 +56,13 @@ GuiHSpace::GuiHSpace(bool math_mode, QWidget * parent)
                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)),
@@ -107,6 +112,10 @@ void GuiHSpace::enableWidgets() const
                || (selection == "hfill" && no_pattern) || custom;
        keepCB->setEnabled(enable_keep);
        keepL->setEnabled(enable_keep);
+       // When Non-Breaking is disabled indicate that this is a non-breaking state
+       // by enabling the check-box
+       if (!enable_keep)
+               keepCB->setCheckState(Qt::Checked);
 }
 
 
@@ -293,13 +302,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();