mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-11 11:08:41 +00:00
fix math cursor size in non-standard font sizes (again *sigh*)
make some stuff 'protected' instead of public git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3021 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
ec2e5fa868
commit
3e3a56bb6a
@ -104,10 +104,15 @@ void InsetFormulaBase::validate(LaTeXFeatures &) const
|
||||
|
||||
|
||||
void InsetFormulaBase::metrics(BufferView * bv, LyXFont const & f) const
|
||||
{
|
||||
font_ = f;
|
||||
metrics(bv);
|
||||
}
|
||||
|
||||
void InsetFormulaBase::metrics(BufferView * bv) const
|
||||
{
|
||||
if (bv)
|
||||
view_ = bv;
|
||||
font_ = f;
|
||||
MathMetricsInfo mi(view_, font_, display() ? LM_ST_DISPLAY : LM_ST_TEXT);
|
||||
par()->metrics(mi);
|
||||
}
|
||||
@ -181,7 +186,7 @@ void InsetFormulaBase::toggleInsetCursor(BufferView * bv)
|
||||
y -= yo_;
|
||||
int asc = 0;
|
||||
int des = 0;
|
||||
MathMetricsInfo mi(bv, font_, LM_ST_TEXT);
|
||||
MathMetricsInfo mi(bv, font_, display() ? LM_ST_DISPLAY : LM_ST_TEXT);
|
||||
math_font_max_dim(LM_TC_TEXTRM, mi, asc, des);
|
||||
bv->showLockedInsetCursor(x, y, asc, des);
|
||||
//lyxerr << "toggleInsetCursor: " << x << " " << y << "\n";
|
||||
@ -200,7 +205,7 @@ void InsetFormulaBase::showInsetCursor(BufferView * bv, bool)
|
||||
mathcursor->getPos(x, y);
|
||||
int asc = 0;
|
||||
int des = 0;
|
||||
MathMetricsInfo mi(bv, font_, LM_ST_TEXT);
|
||||
MathMetricsInfo mi(bv, font_, display() ? LM_ST_DISPLAY : LM_ST_TEXT);
|
||||
math_font_max_dim(LM_TC_TEXTRM, mi, asc, des);
|
||||
//bv->fitLockedInsetCursor(x, y, asc, des);
|
||||
//metrics(bv);
|
||||
|
@ -94,8 +94,6 @@ public:
|
||||
///
|
||||
virtual MathAtom & par() = 0;
|
||||
///
|
||||
virtual void metrics(BufferView * bv = 0, LyXFont const & font = LyXFont()) const;
|
||||
///
|
||||
virtual void updateLocal(BufferView * bv, bool mark_dirty);
|
||||
///
|
||||
int xo() const { return xo_; }
|
||||
@ -103,14 +101,22 @@ public:
|
||||
int yo() const { return yo_; }
|
||||
///
|
||||
BufferView * view() const { return view_; }
|
||||
|
||||
private:
|
||||
/// unimplemented
|
||||
void operator=(const InsetFormulaBase &);
|
||||
|
||||
///
|
||||
mutable BufferView * view_;
|
||||
///
|
||||
mutable LyXFont font_;
|
||||
|
||||
protected:
|
||||
///
|
||||
void metrics(BufferView * bv, LyXFont const & font) const;
|
||||
///
|
||||
void metrics(BufferView * bv = 0) const;
|
||||
|
||||
///
|
||||
mutable int xo_;
|
||||
///
|
||||
|
Loading…
Reference in New Issue
Block a user