mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-03 20:29:35 +01:00
make computation of OS X pango text width correction less intrusive/more efficient.
Compute the correction only once after each font specification setting.
This commit is contained in:
parent
5fe0c4be63
commit
75a150ecc0
2 changed files with 27 additions and 24 deletions
|
|
@ -52,8 +52,6 @@ public:
|
|||
double text_width() const { return _width; }
|
||||
|
||||
private:
|
||||
double _width_correction;
|
||||
|
||||
std::string _text;
|
||||
uint32_t _color;
|
||||
Pango::FontDescription* _font_description;
|
||||
|
|
@ -63,6 +61,7 @@ private:
|
|||
mutable double _width;
|
||||
mutable double _height;
|
||||
mutable bool _need_redraw;
|
||||
mutable double _width_correction;
|
||||
double _clamped_width;
|
||||
|
||||
void redraw (Cairo::RefPtr<Cairo::Context>) const;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue