~canonical-dx-team/unity/unity.fix-ql-losing-focus

« back to all changes in this revision

Viewing changes to src/StaticCairoText.cpp

Merge

Show diffs side-by-side

added added

removed removed

Lines of Context:
162
162
  gfxContext.GetRenderStates ().GetBlend (alpha, src, dest);
163
163
  gfxContext.GetRenderStates ().SetBlend (true, GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
164
164
 
 
165
  Color col = Color::Black;
 
166
  col.SetAlpha (0.0f);
 
167
  gfxContext.QRP_Color (base.x,
 
168
      base.y,
 
169
      base.width,
 
170
      base.height,
 
171
      col);
 
172
 
165
173
  gfxContext.QRP_1Tex (base.x,
166
 
                        base.y,
167
 
                        base.width,
168
 
                        base.height,
169
 
                        _texture2D->GetDeviceTexture(),
170
 
                        texxform,
171
 
                        _textColor);
 
174
                       base.y + ((base.height - _cached_extent_height)/2),
 
175
                       base.width,
 
176
                       base.height,
 
177
                       _texture2D->GetDeviceTexture(),
 
178
                       texxform,
 
179
                       _textColor);
172
180
  
173
181
  gfxContext.GetRenderStates ().SetBlend (alpha, src, dest);
174
182
  
223
231
  int width = 0;
224
232
  int height = 0;
225
233
  GetTextExtents (width, height);
 
234
  SetMinimumHeight (height);
226
235
  NeedRedraw ();
227
236
  sigFontChanged.emit (this);
228
237
}