images. Tested and verified to work beautifully.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@5951
a592a061-630c-0410-9148-
cb99ea01b6c8
+2003-01-13 Michael Schmitt <michael.schmitt@teststep.org>
+
+ * xformsImage.C (getWidth): revert "fix" that breaks behavior with
+ xforms 1.0.
+
2003-01-13 John Levon <levon@movementarian.org>
* forms/form_spellchecker.fd: remove replicated M-R shortcut.
2003-01-13 John Levon <levon@movementarian.org>
* forms/form_spellchecker.fd: remove replicated M-R shortcut.
- // Why, oh why, do we need such hacks?
- // Angus 12 July 2002
- return image_->w + 4;
+2003-01-12 Michael Schmitt <michael.schmitt@teststep.org>
+
+ * insetgraphics.C (draw, width): Fix spacing around graphics inset
+
2002-12-17 Juergen Vigna <jug@lyx.org>
* insettext.C (localDispatch): hopefully fixed cursor up down
2002-12-17 Juergen Vigna <jug@lyx.org>
* insettext.C (localDispatch): hopefully fixed cursor up down
int InsetGraphics::width(BufferView *, LyXFont const & font) const
{
if (imageIsDrawable())
int InsetGraphics::width(BufferView *, LyXFont const & font) const
{
if (imageIsDrawable())
- return cache_->loader.image()->getWidth();
+ return cache_->loader.image()->getWidth() + 2 * TEXT_TO_INSET_OFFSET;
else {
int font_width = 0;
else {
int font_width = 0;
Painter & paint = bv->painter();
if (imageIsDrawable()) {
Painter & paint = bv->painter();
if (imageIsDrawable()) {
- paint.image(old_x + 2, baseline - lascent,
- lwidth - 4, lascent + ldescent,
+ paint.image(old_x + TEXT_TO_INSET_OFFSET, baseline - lascent,
+ lwidth - 2 * TEXT_TO_INSET_OFFSET, lascent + ldescent,
*cache_->loader.image());
} else {
*cache_->loader.image());
} else {
- paint.rectangle(old_x + 2, baseline - lascent,
- lwidth - 4,
- lascent + ldescent);
+ paint.rectangle(old_x + TEXT_TO_INSET_OFFSET, baseline - lascent,
+ lwidth - 2 * TEXT_TO_INSET_OFFSET, lascent + ldescent);
// Print the file name.
LyXFont msgFont(font);
// Print the file name.
LyXFont msgFont(font);
string const justname = OnlyFilename (params().filename);
if (!justname.empty()) {
msgFont.setSize(LyXFont::SIZE_FOOTNOTE);
string const justname = OnlyFilename (params().filename);
if (!justname.empty()) {
msgFont.setSize(LyXFont::SIZE_FOOTNOTE);
+ paint.text(old_x + TEXT_TO_INSET_OFFSET + 6,
baseline - font_metrics::maxAscent(msgFont) - 4,
justname, msgFont);
}
baseline - font_metrics::maxAscent(msgFont) - 4,
justname, msgFont);
}
string const msg = statusMessage();
if (!msg.empty()) {
msgFont.setSize(LyXFont::SIZE_TINY);
string const msg = statusMessage();
if (!msg.empty()) {
msgFont.setSize(LyXFont::SIZE_TINY);
- paint.text(old_x + 8, baseline - 4, msg, msgFont);
+ paint.text(old_x + TEXT_TO_INSET_OFFSET + 6, baseline - 4, msg, msgFont);
+2003-01-12 Michael Schmitt <michael.schmitt@teststep.org>
+
+ * formula.C (draw, width): Fix spacing around previewed formula.
+
2003-01-13 Michael Schmitt <Michael.Schmitt@teststep.org>
* formulabse.C (localDispatch): make CTRL-Pos1/End behave a little
2003-01-13 Michael Schmitt <Michael.Schmitt@teststep.org>
* formulabse.C (localDispatch): make CTRL-Pos1/End behave a little
MathPainterInfo pi(bv->painter());
if (use_preview) {
MathPainterInfo pi(bv->painter());
if (use_preview) {
- pi.pain.image(x, y - a, w, h,
+ pi.pain.image(x + 1, y - a, w, h, // one pixel gap in front
*(preview_->pimage()->image(*this, *bv)));
} else {
pi.base.style = LM_ST_TEXT;
*(preview_->pimage()->image(*this, *bv)));
} else {
pi.base.style = LM_ST_TEXT;
{
metrics(bv, font);
return preview_->previewReady() ?
{
metrics(bv, font);
return preview_->previewReady() ?
- preview_->pimage()->width() : par_->width();
+ 1 + preview_->pimage()->width() : par_->width();
+ // insert a one pixel gap in front of the formula