mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 13:18:28 +00:00
better (and localizable) display of vertical spaces
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9968 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
9e5d7cddf3
commit
0f51d7cabf
@ -153,6 +153,7 @@ src/frontends/xforms/FormVSpace.C
|
|||||||
src/frontends/xforms/FormWrap.C
|
src/frontends/xforms/FormWrap.C
|
||||||
src/frontends/xforms/XFormsMenubar.C
|
src/frontends/xforms/XFormsMenubar.C
|
||||||
src/frontends/xforms/XMiniBuffer.C
|
src/frontends/xforms/XMiniBuffer.C
|
||||||
|
src/frontends/xforms/checkedwidgets.C
|
||||||
src/frontends/xforms/xformsBC.h
|
src/frontends/xforms/xformsBC.h
|
||||||
src/frontends/xforms/xforms_helpers.C
|
src/frontends/xforms/xforms_helpers.C
|
||||||
src/gettext.h
|
src/gettext.h
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
2005-05-23 Jean-Marc Lasgouttes <lasgouttes@lyx.org>
|
||||||
|
|
||||||
|
* vspace.C (asGUIName): new method. A version of the space
|
||||||
|
suitable for showing on screen.
|
||||||
|
|
||||||
2005-05-20 Michael Schmitt <michael.schmitt@teststep.org>
|
2005-05-20 Michael Schmitt <michael.schmitt@teststep.org>
|
||||||
|
|
||||||
* MenuBackend.C:
|
* MenuBackend.C:
|
||||||
|
@ -1,3 +1,7 @@
|
|||||||
|
2005-05-23 Jean-Marc Lasgouttes <lasgouttes@lyx.org>
|
||||||
|
|
||||||
|
* insetvspace.C (draw): use VSpace::asGUIName.
|
||||||
|
|
||||||
2005-05-17 Georg Baum <Georg.Baum@post.rwth-aachen.de>
|
2005-05-17 Georg Baum <Georg.Baum@post.rwth-aachen.de>
|
||||||
|
|
||||||
* insetbase.C (getStatus): allow LFUN_INSET_MODIFY unconditionally
|
* insetbase.C (getStatus): allow LFUN_INSET_MODIFY unconditionally
|
||||||
|
@ -144,7 +144,7 @@ void InsetVSpace::draw(PainterInfo & pi, int x, int y) const
|
|||||||
// y-values for bottom arrow
|
// y-values for bottom arrow
|
||||||
int by1, by2;
|
int by1, by2;
|
||||||
|
|
||||||
str = label + " (" + space_.asLyXCommand() + ")";
|
str = label + " (" + space_.asGUIName() + ")";
|
||||||
|
|
||||||
if (space_.kind() == VSpace::VFILL) {
|
if (space_.kind() == VSpace::VFILL) {
|
||||||
ty1 = ty2 = start;
|
ty1 = ty2 = start;
|
||||||
|
29
src/vspace.C
29
src/vspace.C
@ -14,6 +14,7 @@
|
|||||||
#include "buffer.h"
|
#include "buffer.h"
|
||||||
#include "bufferparams.h"
|
#include "bufferparams.h"
|
||||||
#include "BufferView.h"
|
#include "BufferView.h"
|
||||||
|
#include "gettext.h"
|
||||||
#include "lengthcommon.h"
|
#include "lengthcommon.h"
|
||||||
#include "lyxtext.h"
|
#include "lyxtext.h"
|
||||||
|
|
||||||
@ -478,6 +479,34 @@ string const VSpace::asLatexCommand(BufferParams const & params) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
string const VSpace::asGUIName() const
|
||||||
|
{
|
||||||
|
string result;
|
||||||
|
switch (kind_) {
|
||||||
|
case DEFSKIP:
|
||||||
|
result = _("Default skip");
|
||||||
|
break;
|
||||||
|
case SMALLSKIP:
|
||||||
|
result = _("Small skip");
|
||||||
|
break;
|
||||||
|
case MEDSKIP:
|
||||||
|
result = _("Medium skip");
|
||||||
|
break;
|
||||||
|
case BIGSKIP:
|
||||||
|
result = _("Big skip");
|
||||||
|
break;
|
||||||
|
case VFILL:
|
||||||
|
result = _("Vertical fill");
|
||||||
|
break;
|
||||||
|
case LENGTH:
|
||||||
|
result = len_.asString();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (keep_)
|
||||||
|
result += ", " + _("protected");
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
int VSpace::inPixels(BufferView const & bv) const
|
int VSpace::inPixels(BufferView const & bv) const
|
||||||
{
|
{
|
||||||
|
@ -61,6 +61,8 @@ public:
|
|||||||
std::string const asLyXCommand() const;
|
std::string const asLyXCommand() const;
|
||||||
/// the latex representation
|
/// the latex representation
|
||||||
std::string const asLatexCommand(BufferParams const & params) const;
|
std::string const asLatexCommand(BufferParams const & params) const;
|
||||||
|
/// how it is seen in the LyX window
|
||||||
|
std::string const VSpace::asGUIName() const;
|
||||||
/// the size of the space on-screen
|
/// the size of the space on-screen
|
||||||
int inPixels(BufferView const & bv) const;
|
int inPixels(BufferView const & bv) const;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user