summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2022-01-24 12:49:29 +0000
committerCaolán McNamara <caolanm@redhat.com>2022-01-24 15:57:31 +0100
commit20a0356a7b389cbae723d5b302ffd3737677ac84 (patch)
tree43298cd63be26e32e709fdb878eac6801d6cc9b7
parent2bec949e85dc058b2e9009b2b7eb03745a5be71b (diff)
gtk3: set placeholder image in GtkButton in .ui
so the image+text layout is created by default Change-Id: Id5e9801274ebaa9e9cfdddcfac628b83828342fc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128865 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
-rwxr-xr-xbin/ui-rules-enforcer.py2
-rw-r--r--dbaccess/uiconfig/ui/generalpagewizard.ui7
-rw-r--r--vcl/inc/bitmaps.hlst1
-rw-r--r--vcl/source/window/builder.cxx2
4 files changed, 12 insertions, 0 deletions
diff --git a/bin/ui-rules-enforcer.py b/bin/ui-rules-enforcer.py
index 7c20ee0a6db7..15b04c65bd1d 100755
--- a/bin/ui-rules-enforcer.py
+++ b/bin/ui-rules-enforcer.py
@@ -137,6 +137,8 @@ def do_replace_image_stock(current, stock):
stock.text = "go-last"
elif stock.text == 'gtk-new':
stock.text = "document-new"
+ elif stock.text == 'gtk-open':
+ stock.text = "document-open"
elif stock.text == 'gtk-media-stop':
stock.text = "media-playback-stop"
elif stock.text == 'gtk-media-play':
diff --git a/dbaccess/uiconfig/ui/generalpagewizard.ui b/dbaccess/uiconfig/ui/generalpagewizard.ui
index 79ebee3bcce0..5abb1a7ec7c1 100644
--- a/dbaccess/uiconfig/ui/generalpagewizard.ui
+++ b/dbaccess/uiconfig/ui/generalpagewizard.ui
@@ -2,6 +2,11 @@
<!-- Generated with glade 3.38.2 -->
<interface domain="dba">
<requires lib="gtk+" version="3.20"/>
+ <object class="GtkImage" id="image1">
+ <property name="visible">True</property>
+ <property name="can-focus">False</property>
+ <property name="icon-name">document-open</property>
+ </object>
<!-- n-columns=1 n-rows=12 -->
<object class="GtkGrid" id="PageGeneral">
<property name="visible">True</property>
@@ -189,6 +194,8 @@
<property name="receives-default">True</property>
<property name="halign">start</property>
<property name="margin-start">24</property>
+ <property name="image">image1</property>
+ <property name="use-underline">True</property>
<property name="always-show-image">True</property>
<child internal-child="accessible">
<object class="AtkObject" id="openDatabase-atkobject">
diff --git a/vcl/inc/bitmaps.hlst b/vcl/inc/bitmaps.hlst
index 40d726477e8e..69621765e1f2 100644
--- a/vcl/inc/bitmaps.hlst
+++ b/vcl/inc/bitmaps.hlst
@@ -103,6 +103,7 @@ inline constexpr OUStringLiteral IMG_COPY = u"cmd/sc_copy.png";
inline constexpr OUStringLiteral IMG_PASTE = u"cmd/sc_paste.png";
inline constexpr OUStringLiteral IMG_MENU = u"sfx2/res/menu.png";
inline constexpr OUStringLiteral IMG_CALENDAR = u"sc/res/date.png";
+inline constexpr OUStringLiteral IMG_OPEN = u"cmd/sc_open.png";
inline constexpr OUStringLiteral RID_BMP_TREENODE_COLLAPSED = u"res/plus.png";
inline constexpr OUStringLiteral RID_BMP_TREENODE_EXPANDED = u"res/minus.png";
diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index 5aa38a038ea8..03620bc4a992 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -107,6 +107,8 @@ namespace
return IMG_COPY;
else if (sType == u"edit-paste")
return IMG_PASTE;
+ else if (sType == u"document-open")
+ return IMG_OPEN;
else if (sType == u"open-menu-symbolic")
return IMG_MENU;
else if (sType == u"window-close-symbolic")