cui/inc/bitmaps.hlst | 2 ++ cui/source/dialogs/AdditionsDialog.cxx | 12 +++++++----- cui/source/tabpages/tpcolor.cxx | 1 - cui/uiconfig/ui/colorpage.ui | 12 ++++++++---- svx/source/gallery2/galbrws1.cxx | 1 - svx/uiconfig/ui/sidebargallery.ui | 10 +++++++--- 6 files changed, 24 insertions(+), 14 deletions(-)
New commits: commit 483166b3d05d7c8e973c2e7f1a4fbb797ca5c745 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Wed Feb 15 12:38:30 2023 +0000 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Wed Feb 15 15:27:09 2023 +0000 list icons in .hlst files otherwise they might not get packed into iconset Change-Id: I64cb4b4f12189f402334fff185d8fdf0db4e4536 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147083 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/cui/inc/bitmaps.hlst b/cui/inc/bitmaps.hlst index 733ce7b26478..e36184208fc5 100644 --- a/cui/inc/bitmaps.hlst +++ b/cui/inc/bitmaps.hlst @@ -72,4 +72,6 @@ inline constexpr OUStringLiteral RID_SVXBMP_LEGTYP3 = u"svx/res/legtyp3.png"; inline constexpr OUStringLiteral RID_SVXBMP_COMPONENT = u"res/component_16.png"; inline constexpr OUStringLiteral RID_SVXBMP_MACRO = u"svx/res/id018.png"; +inline constexpr OUStringLiteral RID_SVXBMP_STARS_FULL = u"cmd/sc_stars-full.png"; + /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ diff --git a/cui/source/dialogs/AdditionsDialog.cxx b/cui/source/dialogs/AdditionsDialog.cxx index 7c76f9c9872a..bf386e597412 100644 --- a/cui/source/dialogs/AdditionsDialog.cxx +++ b/cui/source/dialogs/AdditionsDialog.cxx @@ -54,6 +54,8 @@ #include <orcus/json_parser.hpp> #include <orcus/config.hpp> +#include <bitmaps.hlst> + #define PAGE_SIZE 30 using namespace css; @@ -644,19 +646,19 @@ AdditionsItem::AdditionsItem(weld::Widget* pParent, AdditionsDialog* pParentDial switch (std::isnan(aExtensionRating) ? 0 : int(std::clamp(aExtensionRating, 0.0, 5.0))) { case 5: - m_xImageVoting5->set_from_icon_name("cmd/sc_stars-full.png"); + m_xImageVoting5->set_from_icon_name(RID_SVXBMP_STARS_FULL); [[fallthrough]]; case 4: - m_xImageVoting4->set_from_icon_name("cmd/sc_stars-full.png"); + m_xImageVoting4->set_from_icon_name(RID_SVXBMP_STARS_FULL); [[fallthrough]]; case 3: - m_xImageVoting3->set_from_icon_name("cmd/sc_stars-full.png"); + m_xImageVoting3->set_from_icon_name(RID_SVXBMP_STARS_FULL); [[fallthrough]]; case 2: - m_xImageVoting2->set_from_icon_name("cmd/sc_stars-full.png"); + m_xImageVoting2->set_from_icon_name(RID_SVXBMP_STARS_FULL); [[fallthrough]]; case 1: - m_xImageVoting1->set_from_icon_name("cmd/sc_stars-full.png"); + m_xImageVoting1->set_from_icon_name(RID_SVXBMP_STARS_FULL); break; } commit 67446d9bf896f7196d796c62d29a1f7cc815d765 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Wed Feb 15 12:25:19 2023 +0000 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Wed Feb 15 15:27:00 2023 +0000 move the sc_additionsdialog.png into the .ui the mechanism for determining that an image is in use in order to not pack unused icons only scans .ui and .hlst files, not all source code, so this was fragile Change-Id: Ic06c6a451cff3def8547b3ab085be70f6870054e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147080 Tested-by: Caolán McNamara <caol...@redhat.com> Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/cui/source/tabpages/tpcolor.cxx b/cui/source/tabpages/tpcolor.cxx index 9c0b5b457525..694fce496f96 100644 --- a/cui/source/tabpages/tpcolor.cxx +++ b/cui/source/tabpages/tpcolor.cxx @@ -131,7 +131,6 @@ SvxColorTabPage::SvxColorTabPage(weld::Container* pPage, weld::DialogController* m_xBtnDelete->set_sensitive(false); m_xBtnDelete->set_tooltip_text( CuiResId(RID_CUISTR_DELETEUSERCOLOR1) ); - m_xMoreColors->set_from_icon_name("cmd/sc_additionsdialog.png"); m_xMoreColors->connect_clicked(LINK(this, SvxColorTabPage, OnMoreColorsClick)); // disable preset color values diff --git a/cui/uiconfig/ui/colorpage.ui b/cui/uiconfig/ui/colorpage.ui index ac680de34ef0..db84f206a57d 100644 --- a/cui/uiconfig/ui/colorpage.ui +++ b/cui/uiconfig/ui/colorpage.ui @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- Generated with glade 3.38.2 --> +<!-- Generated with glade 3.40.0 --> <interface domain="cui"> <requires lib="gtk+" version="3.20"/> <object class="GtkAdjustment" id="adjustment1"> @@ -37,6 +37,11 @@ <property name="step-increment">1</property> <property name="page-increment">10</property> </object> + <object class="GtkImage" id="image1"> + <property name="visible">True</property> + <property name="can-focus">False</property> + <property name="icon-name">cmd/sc_additionsdialog.png</property> + </object> <object class="GtkImage" id="image3"> <property name="visible">True</property> <property name="can-focus">False</property> @@ -105,9 +110,8 @@ <property name="can-focus">True</property> <property name="receives-default">True</property> <property name="tooltip-text" translatable="yes" context="colorpage|btnMoreColors">Add color palettes via extension</property> - <child> - <placeholder/> - </child> + <property name="image">image1</property> + <property name="always-show-image">True</property> </object> <packing> <property name="expand">False</property> diff --git a/svx/source/gallery2/galbrws1.cxx b/svx/source/gallery2/galbrws1.cxx index 5a01e2d61874..85f0f8c69657 100644 --- a/svx/source/gallery2/galbrws1.cxx +++ b/svx/source/gallery2/galbrws1.cxx @@ -69,7 +69,6 @@ GalleryBrowser1::GalleryBrowser1( mxThemes->connect_key_press(LINK(this, GalleryBrowser1, KeyInputHdl)); mxThemes->set_size_request(-1, mxThemes->get_height_rows(6)); - mxMoreGalleries->set_from_icon_name("cmd/sc_additionsdialog.png"); mxMoreGalleries->connect_clicked(LINK(this, GalleryBrowser1, OnMoreGalleriesClick)); // disable creation of new themes if a writable directory is not available diff --git a/svx/uiconfig/ui/sidebargallery.ui b/svx/uiconfig/ui/sidebargallery.ui index d3ee0e6f14d2..97b2b322ef0e 100644 --- a/svx/uiconfig/ui/sidebargallery.ui +++ b/svx/uiconfig/ui/sidebargallery.ui @@ -12,6 +12,11 @@ <property name="can-focus">False</property> <property name="icon-name">svx/res/galdetail.png</property> </object> + <object class="GtkImage" id="image3"> + <property name="visible">True</property> + <property name="can-focus">False</property> + <property name="icon-name">cmd/sc_additionsdialog.png</property> + </object> <object class="GtkTreeStore" id="liststore1"> <columns> <!-- column-name image --> @@ -329,9 +334,8 @@ <property name="can-focus">True</property> <property name="receives-default">True</property> <property name="tooltip-text" translatable="yes" context="sidebargallery|btnMoreGalleries">Add more galleries via extension</property> - <child> - <placeholder/> - </child> + <property name="image">image3</property> + <property name="always-show-image">True</property> </object> <packing> <property name="left-attach">3</property>