mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-14 12:25:11 +00:00
Removed some unneeded casts
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2249 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
9ecaaf3ec9
commit
1111df8541
@ -1,3 +1,7 @@
|
|||||||
|
2001-07-17 Baruch Even <baruch@lyx.org>
|
||||||
|
|
||||||
|
* insetgraphics.C (draw): Removed unneeded casts.
|
||||||
|
|
||||||
2001-07-16 Juergen Vigna <jug@sad.it>
|
2001-07-16 Juergen Vigna <jug@sad.it>
|
||||||
|
|
||||||
* insettext.C (update): fixed small oversight (reset lt to 0).
|
* insettext.C (update): fixed small oversight (reset lt to 0).
|
||||||
|
@ -261,16 +261,16 @@ void InsetGraphics::draw(BufferView * bv, LyXFont const & font,
|
|||||||
int lwidth = width(bv, font);
|
int lwidth = width(bv, font);
|
||||||
|
|
||||||
// Make sure x is updated upon exit from this routine
|
// Make sure x is updated upon exit from this routine
|
||||||
float old_x = x;
|
int old_x = x;
|
||||||
x += lwidth;
|
x += lwidth;
|
||||||
|
|
||||||
// This will draw the graphics. If the graphics has not been loaded yet,
|
// This will draw the graphics. If the graphics has not been loaded yet,
|
||||||
// we draw just a rectangle.
|
// we draw just a rectangle.
|
||||||
if (imageLoaded) {
|
if (imageLoaded) {
|
||||||
|
|
||||||
paint.image(int(old_x) + 2, baseline - lascent,
|
paint.image(old_x + 2, baseline - lascent,
|
||||||
lwidth - 4, lascent + ldescent,
|
lwidth - 4, lascent + ldescent,
|
||||||
cacheHandle->getImage());
|
cacheHandle->getImage());
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
// Get the image status, default to unknown error.
|
// Get the image status, default to unknown error.
|
||||||
@ -287,25 +287,24 @@ void InsetGraphics::draw(BufferView * bv, LyXFont const & font,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
string const msg = statusMessage();
|
|
||||||
|
|
||||||
paint.rectangle(int(old_x) + 2, baseline - lascent,
|
paint.rectangle(old_x + 2, baseline - lascent,
|
||||||
lwidth - 4,
|
lwidth - 4,
|
||||||
lascent + ldescent);
|
lascent + ldescent);
|
||||||
|
|
||||||
|
string const msg = statusMessage();
|
||||||
if (!msg.empty()) {
|
if (!msg.empty()) {
|
||||||
// Print the message.
|
// Print the message.
|
||||||
LyXFont msgFont(font);
|
LyXFont msgFont(font);
|
||||||
msgFont.setFamily(LyXFont::SANS_FAMILY);
|
msgFont.setFamily(LyXFont::SANS_FAMILY);
|
||||||
msgFont.setSize(LyXFont::SIZE_FOOTNOTE);
|
msgFont.setSize(LyXFont::SIZE_FOOTNOTE);
|
||||||
string const justname = OnlyFilename (params.filename);
|
string const justname = OnlyFilename (params.filename);
|
||||||
paint.text(int(old_x) + 8,
|
paint.text(old_x + 8,
|
||||||
baseline - lyxfont::maxAscent(msgFont) - 4,
|
baseline - lyxfont::maxAscent(msgFont) - 4,
|
||||||
justname, msgFont);
|
justname, msgFont);
|
||||||
|
|
||||||
msgFont.setSize(LyXFont::SIZE_TINY);
|
msgFont.setSize(LyXFont::SIZE_TINY);
|
||||||
paint.text(int(old_x) + 8, baseline - 4,
|
paint.text(old_x + 8, baseline - 4, msg, msgFont);
|
||||||
msg, msgFont);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user