diff options
Diffstat (limited to 'vcl/unx/gtk3/gtk3gtkinst.cxx')
-rw-r--r-- | vcl/unx/gtk3/gtk3gtkinst.cxx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx index 3b54fbbb3415..e249a21dc5aa 100644 --- a/vcl/unx/gtk3/gtk3gtkinst.cxx +++ b/vcl/unx/gtk3/gtk3gtkinst.cxx @@ -1238,17 +1238,16 @@ public: return Size(size.width, size.height); } - virtual float get_approximate_char_width() const override + virtual float get_approximate_digit_width() const override { PangoContext* pContext = gtk_widget_get_pango_context(m_pWidget); PangoFontMetrics* pMetrics = pango_context_get_metrics(pContext, pango_context_get_font_description(pContext), pango_context_get_language(pContext)); - float nCharWidth = pango_font_metrics_get_approximate_char_width(pMetrics); float nDigitWidth = pango_font_metrics_get_approximate_digit_width(pMetrics); pango_font_metrics_unref(pMetrics); - return std::max(nCharWidth, nDigitWidth) / PANGO_SCALE; + return nDigitWidth / PANGO_SCALE; } virtual int get_text_height() const override |