diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-09-06 17:32:45 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-09-07 18:17:44 +0200 |
commit | 0593afe5606b6388a705f3e8b19e427fcbf7555b (patch) | |
tree | a3e95f1bedb3fa25a6809da1e5f19203af43d5b8 /vcl/source | |
parent | da8617d69a7b27a3eeb3f26e207ddf1b4de3eeb3 (diff) |
just edit Entry to readonly, instead of a shadow ro widget
Change-Id: I28d6d3cceec5224a6b38bd44ec380974cd3bae12
Reviewed-on: https://gerrit.libreoffice.org/60104
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl/source')
-rw-r--r-- | vcl/source/app/salvtables.cxx | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx index 6eff8ea00b1e..4ad3fd6cf393 100644 --- a/vcl/source/app/salvtables.cxx +++ b/vcl/source/app/salvtables.cxx @@ -220,6 +220,16 @@ public: return m_xWidget->IsReallyVisible(); } + virtual void set_can_focus(bool bCanFocus) override + { + auto nStyle = m_xWidget->GetStyle() & ~(WB_TABSTOP | WB_NOTABSTOP); + if (bCanFocus) + nStyle |= WB_TABSTOP; + else + nStyle |= WB_NOTABSTOP; + m_xWidget->SetStyle(nStyle); + } + virtual void grab_focus() override { m_xWidget->GrabFocus(); @@ -1419,6 +1429,11 @@ public: m_xEntry->SetReadOnly(!bEditable); } + virtual bool get_editable() const override + { + return !m_xEntry->IsReadOnly(); + } + virtual vcl::Font get_font() override { return m_xEntry->GetFont(); |