summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2022-05-24 18:43:45 +0200
committerMike Kaganski <mike.kaganski@collabora.com>2022-06-01 16:29:42 +0200
commita130f0f406e67cda098adc3086e937317f737583 (patch)
treeefca8adf88b4e191c2d2bb31bebcafce6dddddec /vcl
parent1c2d3b069859f466f59f35e50819fadc0ab61af7 (diff)
Implement weld::IconView::[gs]et_item_width
Change-Id: I211e3c21b4e0148c4ff6fc9931838e37ccd0cc41 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134897 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/inc/salvtables.hxx3
-rw-r--r--vcl/source/app/salvtables.cxx3
-rw-r--r--vcl/unx/gtk3/gtkinst.cxx10
3 files changed, 16 insertions, 0 deletions
diff --git a/vcl/inc/salvtables.hxx b/vcl/inc/salvtables.hxx
index 7752b5243c11..45e9700ad2c8 100644
--- a/vcl/inc/salvtables.hxx
+++ b/vcl/inc/salvtables.hxx
@@ -1761,6 +1761,9 @@ private:
public:
SalInstanceIconView(::IconView* pIconView, SalInstanceBuilder* pBuilder, bool bTakeOwnership);
+ virtual int get_item_width() const override;
+ virtual void set_item_width(int width) override;
+
virtual void freeze() override;
virtual void thaw() override;
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index 4755c94e51cb..4432b4c5afe6 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -5308,6 +5308,9 @@ SalInstanceIconView::SalInstanceIconView(::IconView* pIconView, SalInstanceBuild
m_xIconView->SetPopupMenuHdl(LINK(this, SalInstanceIconView, CommandHdl));
}
+int SalInstanceIconView::get_item_width() const { return m_xIconView->GetEntryWidth(); }
+void SalInstanceIconView::set_item_width(int width) { m_xIconView->SetEntryWidth(width); }
+
void SalInstanceIconView::freeze()
{
bool bIsFirstFreeze = IsFirstFreeze();
diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx
index 1f61fc49db3d..0575aa8c3c7a 100644
--- a/vcl/unx/gtk3/gtkinst.cxx
+++ b/vcl/unx/gtk3/gtkinst.cxx
@@ -16252,6 +16252,16 @@ public:
m_nIdCol = m_nTextCol + 1;
}
+ virtual int get_item_width() const override
+ {
+ return gtk_icon_view_get_item_width(m_pIconView);
+ }
+
+ virtual void set_item_width(int width) override
+ {
+ gtk_icon_view_set_item_width(m_pIconView, width);
+ }
+
virtual void insert(int pos, const OUString* pText, const OUString* pId, const OUString* pIconName, weld::TreeIter* pRet) override
{
disable_notify_events();