summaryrefslogtreecommitdiff
path: root/vcl/unx/gtk3
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-05-10 16:42:15 +0100
committerCaolán McNamara <caolanm@redhat.com>2018-05-10 21:57:53 +0200
commita4d35e9ed6b26d329d05bc4f39e21aac34510e0a (patch)
tree37907984b564d1818841fc0161c81885474faaf2 /vcl/unx/gtk3
parent8154d17893afff1b910dfe51cb6a6f9c78c301bb (diff)
weld SdVectorizeDlg
Change-Id: I15469be36807bcfca9882d04dd5d55933692abf7 Reviewed-on: https://gerrit.libreoffice.org/54092 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl/unx/gtk3')
-rw-r--r--vcl/unx/gtk3/gtk3gtkinst.cxx27
1 files changed, 27 insertions, 0 deletions
diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index 7b972cebea00..8ffa151cd4b7 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -2747,6 +2747,24 @@ public:
}
};
+class GtkInstanceProgressBar : public GtkInstanceWidget, public virtual weld::ProgressBar
+{
+private:
+ GtkProgressBar* m_pProgressBar;
+
+public:
+ GtkInstanceProgressBar(GtkProgressBar* pProgressBar, bool bTakeOwnership)
+ : GtkInstanceWidget(GTK_WIDGET(pProgressBar), bTakeOwnership)
+ , m_pProgressBar(pProgressBar)
+ {
+ }
+
+ virtual void set_percentage(int value) override
+ {
+ gtk_progress_bar_set_fraction(m_pProgressBar, value / 100.0);
+ }
+};
+
class GtkInstanceEntry : public GtkInstanceWidget, public virtual weld::Entry
{
private:
@@ -4598,6 +4616,15 @@ public:
return new GtkInstanceScale(pScale, bTakeOwnership);
}
+ virtual weld::ProgressBar* weld_progress_bar(const OString &id, bool bTakeOwnership) override
+ {
+ GtkProgressBar* pProgressBar = GTK_PROGRESS_BAR(gtk_builder_get_object(m_pBuilder, id.getStr()));
+ if (!pProgressBar)
+ return nullptr;
+ auto_add_parentless_widgets_to_container(GTK_WIDGET(pProgressBar));
+ return new GtkInstanceProgressBar(pProgressBar, bTakeOwnership);
+ }
+
virtual weld::Entry* weld_entry(const OString &id, bool bTakeOwnership) override
{
GtkEntry* pEntry = GTK_ENTRY(gtk_builder_get_object(m_pBuilder, id.getStr()));