diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-07-06 12:22:36 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-07-06 20:29:33 +0200 |
commit | 15682c2338e2fee0b3965c20bba0c0869975eaca (patch) | |
tree | 841d8c371d8b10ca5cdebf90da199397322f0328 /vcl/unx | |
parent | c02601b467c0878a24ce917853aa9e0781fedf2a (diff) |
add alignment to TextView
Change-Id: I10a4c97ccaa927c14d62f4f22b50a0b5cdfd757e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98208
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl/unx')
-rw-r--r-- | vcl/unx/gtk3/gtk3gtkinst.cxx | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx index bd7d718c1945..bf81847a3a80 100644 --- a/vcl/unx/gtk3/gtk3gtkinst.cxx +++ b/vcl/unx/gtk3/gtk3gtkinst.cxx @@ -12557,6 +12557,24 @@ public: gtk_text_buffer_paste_clipboard(m_pTextBuffer, pClipboard, nullptr, get_editable()); } + virtual void set_alignment(TxtAlign eXAlign) override + { + GtkJustification eJust; + switch (eXAlign) + { + case TxtAlign::Left: + eJust = GTK_JUSTIFY_LEFT; + break; + case TxtAlign::Center: + eJust = GTK_JUSTIFY_CENTER; + break; + case TxtAlign::Right: + eJust = GTK_JUSTIFY_RIGHT; + break; + } + gtk_text_view_set_justification(m_pTextView, eJust); + } + virtual int vadjustment_get_value() const override { return gtk_adjustment_get_value(m_pVAdjustment); |