]> git.lyx.org Git - lyx.git/commitdiff
Allow negative offset in GuiLine (#13102)
authorJuergen Spitzmueller <spitz@lyx.org>
Wed, 25 Sep 2024 07:53:00 +0000 (09:53 +0200)
committerJuergen Spitzmueller <spitz@lyx.org>
Wed, 25 Sep 2024 07:53:00 +0000 (09:53 +0200)
src/frontends/qt/GuiLine.cpp

index 2a8b9de2bc16429900fdb3d98c6da4af9c8037f0..8587a5d6ebb1aac6255591f2592f443171d5d5c5 100644 (file)
@@ -56,7 +56,10 @@ GuiLine::GuiLine(QWidget * parent) : InsetParamsWidget(parent)
        addCheckedWidget(WidthLE, WidthValueL);
        addCheckedWidget(HeightLE, HeightValueL);
 
-       OffsetLE->setValidator(unsignedGlueLengthValidator(OffsetLE));
+       // Set up a signed glue length validator
+       LengthValidator * v = new LengthValidator(OffsetLE);
+       v->setBottom(GlueLength());
+       OffsetLE->setValidator(v);
        WidthLE->setValidator(unsignedGlueLengthValidator(WidthLE));
        HeightLE->setValidator(unsignedGlueLengthValidator(HeightLE));