mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-06 00:10:59 +00:00
small stuff
less debug output git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7344 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
a45815184b
commit
172c868068
@ -26,8 +26,8 @@
|
|||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
#include "rowpainter.h"
|
#include "rowpainter.h"
|
||||||
#include "insets/updatableinset.h"
|
#include "insets/updatableinset.h"
|
||||||
#include "mathed/formulabase.h"
|
|
||||||
#include "lyx_gui.h"
|
#include "lyx_gui.h"
|
||||||
|
#include "metricsinfo.h"
|
||||||
|
|
||||||
// Splash screen-specific stuff
|
// Splash screen-specific stuff
|
||||||
#include "lyxfont.h"
|
#include "lyxfont.h"
|
||||||
@ -147,8 +147,8 @@ void LyXScreen::showCursor(BufferView & bv)
|
|||||||
Cursor_Shape shape = BAR_SHAPE;
|
Cursor_Shape shape = BAR_SHAPE;
|
||||||
|
|
||||||
LyXText const & text = *bv.getLyXText();
|
LyXText const & text = *bv.getLyXText();
|
||||||
LyXFont const & realfont(text.real_current_font);
|
LyXFont const & realfont = text.real_current_font;
|
||||||
BufferParams const & bp(bv.buffer()->params);
|
BufferParams const & bp = bv.buffer()->params;
|
||||||
bool const samelang = realfont.language() == bp.language;
|
bool const samelang = realfont.language() == bp.language;
|
||||||
bool const isrtl = realfont.isVisibleRightToLeft();
|
bool const isrtl = realfont.isVisibleRightToLeft();
|
||||||
|
|
||||||
@ -453,6 +453,16 @@ void LyXScreen::drawFromTo(LyXText * text, BufferView * bv,
|
|||||||
|
|
||||||
hideCursor();
|
hideCursor();
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
// some day it should look like that:
|
||||||
|
// redo metrics
|
||||||
|
Dimension dim;
|
||||||
|
LyXFont font;
|
||||||
|
MetricsInfo mi(bv, font, workarea().workWidth());
|
||||||
|
text->metrics(mi, dim);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// draw it
|
||||||
RowList::iterator const rend = text->rows().end();
|
RowList::iterator const rend = text->rows().end();
|
||||||
while (rit != rend && y < y2) {
|
while (rit != rend && y < y2) {
|
||||||
paintRows(*bv, *text, rit, y + yo, xo, y + topy);
|
paintRows(*bv, *text, rit, y + yo, xo, y + topy);
|
||||||
|
@ -1950,6 +1950,8 @@ void InsetText::resizeLyXText(BufferView * bv, bool force) const
|
|||||||
text_.init(bv);
|
text_.init(bv);
|
||||||
restoreLyXTextState();
|
restoreLyXTextState();
|
||||||
|
|
||||||
|
// seems to be unneeded
|
||||||
|
#if 1
|
||||||
if (the_locking_inset) {
|
if (the_locking_inset) {
|
||||||
inset_x = cix(bv) - top_x + drawTextXOffset;
|
inset_x = cix(bv) - top_x + drawTextXOffset;
|
||||||
inset_y = ciy() + drawTextYOffset;
|
inset_y = ciy() + drawTextYOffset;
|
||||||
@ -1963,6 +1965,7 @@ void InsetText::resizeLyXText(BufferView * bv, bool force) const
|
|||||||
} else {
|
} else {
|
||||||
need_update |= FULL;
|
need_update |= FULL;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -24,7 +24,7 @@ public:
|
|||||||
///
|
///
|
||||||
Row();
|
Row();
|
||||||
///
|
///
|
||||||
Row(ParagraphList::iterator pit, lyx::pos_type po);
|
Row(ParagraphList::iterator pit, lyx::pos_type pos);
|
||||||
///
|
///
|
||||||
void par(ParagraphList::iterator pit);
|
void par(ParagraphList::iterator pit);
|
||||||
///
|
///
|
||||||
@ -70,7 +70,7 @@ private:
|
|||||||
ParagraphList::iterator pit_;
|
ParagraphList::iterator pit_;
|
||||||
///
|
///
|
||||||
lyx::pos_type pos_;
|
lyx::pos_type pos_;
|
||||||
/** what is missing to a full row can be negative.
|
/** what is missing to a full row. Can be negative.
|
||||||
Needed for hfills, flushright, block etc. */
|
Needed for hfills, flushright, block etc. */
|
||||||
mutable int fill_;
|
mutable int fill_;
|
||||||
///
|
///
|
||||||
|
@ -475,7 +475,7 @@ public:
|
|||||||
int singleWidth(ParagraphList::iterator pit,
|
int singleWidth(ParagraphList::iterator pit,
|
||||||
lyx::pos_type pos, char c) const;
|
lyx::pos_type pos, char c) const;
|
||||||
/// rebuild row cache
|
/// rebuild row cache
|
||||||
void rebuildRows();
|
void rebuildRows(ParagraphList::iterator pit);
|
||||||
|
|
||||||
/// return the color of the canvas
|
/// return the color of the canvas
|
||||||
LColor::color backgroundColor() const;
|
LColor::color backgroundColor() const;
|
||||||
|
@ -306,8 +306,8 @@ void RowPainter::paintChars(pos_type & vpos, bool hebrew, bool arabic)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Draw text and set the new x position
|
// Draw text and set the new x position
|
||||||
lyxerr << "paint row: yo_ " << yo_ << " baseline: " << row_->baseline()
|
//lyxerr << "paint row: yo_ " << yo_ << " baseline: " << row_->baseline()
|
||||||
<< "\n";
|
// << "\n";
|
||||||
pain_.text(int(x_), yo_ + row_->baseline(), str, orig_font);
|
pain_.text(int(x_), yo_ + row_->baseline(), str, orig_font);
|
||||||
x_ += font_metrics::width(str, orig_font);
|
x_ += font_metrics::width(str, orig_font);
|
||||||
}
|
}
|
||||||
|
@ -697,7 +697,7 @@ void LyXText::fullRebreak()
|
|||||||
|
|
||||||
void LyXText::metrics(MetricsInfo & mi, Dimension & dim)
|
void LyXText::metrics(MetricsInfo & mi, Dimension & dim)
|
||||||
{
|
{
|
||||||
lyxerr << "LyXText::metrics: width: " << mi.base.textwidth << "\n";
|
//lyxerr << "LyXText::metrics: width: " << mi.base.textwidth << "\n";
|
||||||
|
|
||||||
// rebuild row cache
|
// rebuild row cache
|
||||||
rowlist_.clear();
|
rowlist_.clear();
|
||||||
|
Loading…
Reference in New Issue
Block a user