reportdesign/uiconfig/dbreport/ui/condformatdialog.ui | 55 ++--- reportdesign/uiconfig/dbreport/ui/conditionwin.ui | 172 +++++++++--------- vcl/qt5/QtBuilder.cxx | 9 3 files changed, 120 insertions(+), 116 deletions(-)
New commits: commit 2b6547f1c34c88fbdc25a455493f4426522255e0 Author: Michael Weghorn <m.wegh...@posteo.de> AuthorDate: Mon Jul 21 13:19:16 2025 +0200 Commit: Michael Weghorn <m.wegh...@posteo.de> CommitDate: Tue Jul 22 07:21:00 2025 +0200 tdf#130857 qt weld: Support "GtkToggleToolButton" This is used e.g. by the (not yet supported) "Conditional Formatting" reportdesign dialog that can be triggered as follows: * open a database in Base or create a new one * select "Reports" * select "Create Report in Design View" * click the "Text Box" item in the toolbar, click + drag mouse to insert * "Format" -> "Conditional Formatting" Change-Id: I2abb920b379e3e0a5b2ee82de26dd4595dfda2e2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188119 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.wegh...@posteo.de> diff --git a/vcl/qt5/QtBuilder.cxx b/vcl/qt5/QtBuilder.cxx index 9e773819f631..27b9e1f0b6b0 100644 --- a/vcl/qt5/QtBuilder.cxx +++ b/vcl/qt5/QtBuilder.cxx @@ -375,7 +375,7 @@ QObject* QtBuilder::makeObject(QObject* pParent, std::u16string_view sName, std: { pObject = new QToolBar(pParentWidget); } - else if (sName == u"GtkToolButton") + else if (sName == u"GtkToggleToolButton" || sName == u"GtkToolButton") { QToolButton* pToolButton = new QToolButton(pParentWidget); const OUString sIconName = extractIconName(rMap); @@ -385,6 +385,7 @@ QObject* QtBuilder::makeObject(QObject* pParent, std::u16string_view sName, std: pToolButton->setIcon(toQPixmap(aImage)); } pToolButton->setText(toQString(extractLabel(rMap))); + pToolButton->setCheckable(sName == u"GtkToggleToolButton"); pObject = pToolButton; } else if (sName == u"GtkTreeView") commit 73c5ebb33f0b7809f882c7dcaf6b8689e71a8b00 Author: Michael Weghorn <m.wegh...@posteo.de> AuthorDate: Mon Jul 21 13:21:29 2025 +0200 Commit: Michael Weghorn <m.wegh...@posteo.de> CommitDate: Tue Jul 22 07:20:56 2025 +0200 tdf#130857 qt weld: Support "GtkSeparatorToolItem" This is used e.g. by the (not yet supported) "Conditional Formatting" reportdesign dialog that can be triggered as follows: * open a database in Base or create a new one * select "Reports" * select "Create Report in Design View" * click the "Text Box" item in the toolbar, click + drag mouse to insert * "Format" -> "Conditional Formatting" Change-Id: Ia4bcc22eb1575d7025521d428a652198f3d613b1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188118 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.wegh...@posteo.de> diff --git a/vcl/qt5/QtBuilder.cxx b/vcl/qt5/QtBuilder.cxx index 0aa9a415083b..9e773819f631 100644 --- a/vcl/qt5/QtBuilder.cxx +++ b/vcl/qt5/QtBuilder.cxx @@ -347,6 +347,12 @@ QObject* QtBuilder::makeObject(QObject* pParent, std::u16string_view sName, std: setScaleProperties(*pSlider, rMap); pObject = pSlider; } + else if (sName == u"GtkSeparatorToolItem") + { + QToolBar* pToolBar = qobject_cast<QToolBar*>(pParentWidget); + assert(pToolBar && "GtkSeparatorToolItem doesn't have a toolbar parent"); + pToolBar->addSeparator(); + } else if (sName == u"GtkSpinButton") { QtDoubleSpinBox* pSpinBox = new QtDoubleSpinBox(pParentWidget); commit 6d1ed3efa22b75db2414208b5bf6c97660c542ed Author: Michael Weghorn <m.wegh...@posteo.de> AuthorDate: Mon Jul 21 13:07:00 2025 +0200 Commit: Michael Weghorn <m.wegh...@posteo.de> CommitDate: Tue Jul 22 07:20:50 2025 +0200 reportdesign: Resave conditionwin.ui and condformatdialog.ui ... with glade 3.40 Manually drop some <property name="can-focus">False</property> properties again for now that were inserted on resave to avoid potential unexpected side-effects. These .ui files are used for the "Conditional Formatting" dialog that can be triggered as follows: * open a database in Base or create a new one * select "Reports" * select "Create Report in Design View" * click the "Text Box" item in the toolbar, click + drag mouse to insert * "Format" -> "Conditional Formatting" Change-Id: I79fd396d2cb881acc896471c2c4cb931e596101a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188117 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.wegh...@posteo.de> diff --git a/reportdesign/uiconfig/dbreport/ui/condformatdialog.ui b/reportdesign/uiconfig/dbreport/ui/condformatdialog.ui index 72a65d988478..b334625a0db3 100644 --- a/reportdesign/uiconfig/dbreport/ui/condformatdialog.ui +++ b/reportdesign/uiconfig/dbreport/ui/condformatdialog.ui @@ -1,39 +1,36 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- Generated with glade 3.22.1 --> +<!-- Generated with glade 3.40.0 --> <interface domain="rpt"> <requires lib="gtk+" version="3.20"/> <object class="GtkDialog" id="CondFormat"> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="hexpand">True</property> <property name="vexpand">True</property> - <property name="border_width">6</property> + <property name="border-width">6</property> <property name="title" translatable="yes" context="condformatdialog|CondFormat">Conditional Formatting</property> <property name="modal">True</property> - <property name="default_width">0</property> - <property name="default_height">0</property> - <property name="type_hint">dialog</property> - <child> - <placeholder/> - </child> + <property name="default-width">0</property> + <property name="default-height">0</property> + <property name="type-hint">dialog</property> <child internal-child="vbox"> <object class="GtkBox" id="dialog-vbox1"> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="hexpand">True</property> <property name="vexpand">True</property> <property name="orientation">vertical</property> <property name="spacing">12</property> <child internal-child="action_area"> <object class="GtkButtonBox" id="dialog-action_area1"> - <property name="can_focus">False</property> - <property name="layout_style">end</property> + <property name="can-focus">False</property> + <property name="layout-style">end</property> <child> <object class="GtkButton" id="ok"> <property name="label" translatable="yes" context="stock">_OK</property> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="can_default">True</property> - <property name="has_default">True</property> - <property name="receives_default">True</property> + <property name="can-focus">True</property> + <property name="can-default">True</property> + <property name="has-default">True</property> + <property name="receives-default">True</property> <property name="use-underline">True</property> </object> <packing> @@ -46,9 +43,9 @@ <object class="GtkButton" id="cancel"> <property name="label" translatable="yes" context="stock">_Cancel</property> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="can_default">True</property> - <property name="receives_default">True</property> + <property name="can-focus">True</property> + <property name="can-default">True</property> + <property name="receives-default">True</property> <property name="use-underline">True</property> </object> <packing> @@ -61,9 +58,9 @@ <object class="GtkButton" id="help"> <property name="label" translatable="yes" context="stock">_Help</property> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="can_default">True</property> - <property name="receives_default">True</property> + <property name="can-focus">True</property> + <property name="can-default">True</property> + <property name="receives-default">True</property> <property name="use-underline">True</property> </object> <packing> @@ -77,32 +74,32 @@ <packing> <property name="expand">False</property> <property name="fill">True</property> - <property name="pack_type">end</property> + <property name="pack-type">end</property> <property name="position">0</property> </packing> </child> <child> <object class="GtkBox" id="box1"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="hexpand">True</property> <property name="vexpand">True</property> <child> <object class="GtkScrolledWindow" id="scrolledwindow"> <property name="visible">True</property> - <property name="can_focus">True</property> + <property name="can-focus">True</property> <property name="hexpand">True</property> <property name="vexpand">True</property> - <property name="hscrollbar_policy">never</property> - <property name="shadow_type">in</property> + <property name="hscrollbar-policy">never</property> + <property name="shadow-type">in</property> <child> <object class="GtkViewport" id="viewport1"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <child> <object class="GtkBox" id="condPlaygroundDrawingarea"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="hexpand">True</property> <property name="vexpand">True</property> <property name="orientation">vertical</property> diff --git a/reportdesign/uiconfig/dbreport/ui/conditionwin.ui b/reportdesign/uiconfig/dbreport/ui/conditionwin.ui index 96b6f9a0ab1d..3926d66b44dc 100644 --- a/reportdesign/uiconfig/dbreport/ui/conditionwin.ui +++ b/reportdesign/uiconfig/dbreport/ui/conditionwin.ui @@ -1,28 +1,28 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- Generated with glade 3.22.1 --> +<!-- Generated with glade 3.40.0 --> <interface domain="rpt"> <requires lib="gtk+" version="3.20"/> <object class="GtkImage" id="image1"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="icon-name">go-up</property> </object> <object class="GtkImage" id="image2"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="icon-name">go-down</property> </object> <object class="GtkBox" id="ConditionWin"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="hexpand">True</property> - <property name="border_width">6</property> + <property name="border-width">6</property> <property name="orientation">vertical</property> <property name="spacing">6</property> <child> <object class="GtkLabel" id="headerLabel"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="halign">start</property> </object> <packing> @@ -32,23 +32,23 @@ </packing> </child> <child> - <!-- n-columns=1 n-rows=1 --> + <!-- n-columns=2 n-rows=2 --> <object class="GtkGrid" id="grid1"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="hexpand">True</property> - <property name="row_spacing">6</property> - <property name="column_spacing">12</property> + <property name="row-spacing">6</property> + <property name="column-spacing">12</property> <child> <object class="GtkBox" id="box1"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="hexpand">True</property> <property name="spacing">12</property> <child> <object class="GtkComboBoxText" id="typeCombobox"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <items> <item translatable="yes" context="conditionwin|typeCombobox">Field Value Is</item> <item translatable="yes" context="conditionwin|typeCombobox">Expression Is</item> @@ -63,7 +63,7 @@ <child> <object class="GtkComboBoxText" id="opCombobox"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <items> <item translatable="yes" context="conditionwin|opCombobox">between</item> <item translatable="yes" context="conditionwin|opCombobox">not between</item> @@ -82,36 +82,36 @@ </packing> </child> <child> - <!-- n-columns=1 n-rows=1 --> + <!-- n-columns=2 n-rows=1 --> <object class="GtkGrid" id="grid4"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="valign">center</property> <property name="hexpand">True</property> - <property name="column_spacing">6</property> + <property name="column-spacing">6</property> <child> <object class="GtkEntry" id="lhsEntry"> <property name="visible">True</property> - <property name="can_focus">True</property> + <property name="can-focus">True</property> <property name="hexpand">True</property> + <property name="activates-default">True</property> <property name="truncate-multiline">True</property> - <property name="activates_default">True</property> </object> <packing> - <property name="left_attach">0</property> - <property name="top_attach">0</property> + <property name="left-attach">0</property> + <property name="top-attach">0</property> </packing> </child> <child> <object class="GtkButton" id="lhsButton"> <property name="label" translatable="yes" context="conditionwin|lhsButton">...</property> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">True</property> + <property name="can-focus">True</property> + <property name="receives-default">True</property> </object> <packing> - <property name="left_attach">1</property> - <property name="top_attach">0</property> + <property name="left-attach">1</property> + <property name="top-attach">0</property> </packing> </child> </object> @@ -124,7 +124,7 @@ <child> <object class="GtkLabel" id="andLabel"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="valign">center</property> <property name="label" translatable="yes" context="conditionwin|andLabel">and</property> </object> @@ -135,36 +135,36 @@ </packing> </child> <child> - <!-- n-columns=1 n-rows=1 --> + <!-- n-columns=2 n-rows=1 --> <object class="GtkGrid" id="grid5"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="valign">center</property> <property name="hexpand">True</property> - <property name="column_spacing">6</property> + <property name="column-spacing">6</property> <child> <object class="GtkEntry" id="rhsEntry"> <property name="visible">True</property> - <property name="can_focus">True</property> + <property name="can-focus">True</property> <property name="hexpand">True</property> + <property name="activates-default">True</property> <property name="truncate-multiline">True</property> - <property name="activates_default">True</property> </object> <packing> - <property name="left_attach">0</property> - <property name="top_attach">0</property> + <property name="left-attach">0</property> + <property name="top-attach">0</property> </packing> </child> <child> <object class="GtkButton" id="rhsButton"> <property name="label" translatable="yes" context="conditionwin|rhsButton">...</property> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">True</property> + <property name="can-focus">True</property> + <property name="receives-default">True</property> </object> <packing> - <property name="left_attach">1</property> - <property name="top_attach">0</property> + <property name="left-attach">1</property> + <property name="top-attach">0</property> </packing> </child> </object> @@ -176,44 +176,44 @@ </child> </object> <packing> - <property name="left_attach">0</property> - <property name="top_attach">0</property> + <property name="left-attach">0</property> + <property name="top-attach">0</property> </packing> </child> <child> <object class="GtkButton" id="upButton"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="focus_on_click">False</property> - <property name="receives_default">True</property> + <property name="can-focus">True</property> + <property name="focus-on-click">False</property> + <property name="receives-default">True</property> <property name="image">image1</property> <property name="always-show-image">True</property> </object> <packing> - <property name="left_attach">1</property> - <property name="top_attach">0</property> + <property name="left-attach">1</property> + <property name="top-attach">0</property> </packing> </child> <child> <object class="GtkBox" id="box2"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="hexpand">True</property> <property name="spacing">12</property> <child> <object class="GtkToolbar" id="formatToolbox"> <property name="visible">True</property> - <property name="can_focus">True</property> + <property name="can-focus">True</property> <property name="halign">start</property> <property name="valign">start</property> - <property name="toolbar_style">icons</property> - <property name="show_arrow">False</property> + <property name="toolbar-style">icons</property> + <property name="show-arrow">False</property> <child> <object class="GtkToggleToolButton" id="bold"> <property name="visible">True</property> <property name="label" translatable="yes" context="conditionwin|ToolBoxItem1">Bold</property> - <property name="use_underline">True</property> - <property name="icon_name">cmd/sc_bold.png</property> + <property name="use-underline">True</property> + <property name="icon-name">cmd/sc_bold.png</property> </object> <packing> <property name="expand">False</property> @@ -224,8 +224,8 @@ <object class="GtkToggleToolButton" id="italic"> <property name="visible">True</property> <property name="label" translatable="yes" context="conditionwin|ToolBoxItem2">Italic</property> - <property name="use_underline">True</property> - <property name="icon_name">cmd/sc_italic.png</property> + <property name="use-underline">True</property> + <property name="icon-name">cmd/sc_italic.png</property> </object> <packing> <property name="expand">False</property> @@ -236,8 +236,8 @@ <object class="GtkToggleToolButton" id="underline"> <property name="visible">True</property> <property name="label" translatable="yes" context="conditionwin|ToolBoxItem3">Underline</property> - <property name="use_underline">True</property> - <property name="icon_name">cmd/sc_underline.png</property> + <property name="use-underline">True</property> + <property name="icon-name">cmd/sc_underline.png</property> </object> <packing> <property name="expand">False</property> @@ -247,7 +247,7 @@ <child> <object class="GtkSeparatorToolItem" id="separatortoolitem1"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> </object> <packing> <property name="expand">False</property> @@ -258,8 +258,8 @@ <object class="GtkMenuToolButton" id="background"> <property name="visible">True</property> <property name="label" translatable="yes" context="conditionwin|ToolBoxItem4">Background Color</property> - <property name="use_underline">True</property> - <property name="icon_name">cmd/sc_backgroundcolor.png</property> + <property name="use-underline">True</property> + <property name="icon-name">cmd/sc_backgroundcolor.png</property> </object> <packing> <property name="expand">False</property> @@ -270,8 +270,8 @@ <object class="GtkMenuToolButton" id="foreground"> <property name="visible">True</property> <property name="label" translatable="yes" context="conditionwin|ToolBoxItem5">Font Color</property> - <property name="use_underline">True</property> - <property name="icon_name">cmd/sc_fontcolor.png</property> + <property name="use-underline">True</property> + <property name="icon-name">cmd/sc_fontcolor.png</property> </object> <packing> <property name="expand">False</property> @@ -282,8 +282,8 @@ <object class="GtkToggleToolButton" id="fontdialog"> <property name="visible">True</property> <property name="label" translatable="yes" context="conditionwin|ToolBoxItem6">Character Formatting</property> - <property name="use_underline">True</property> - <property name="icon_name">cmd/sc_fontdialog.png</property> + <property name="use-underline">True</property> + <property name="icon-name">cmd/sc_fontdialog.png</property> </object> <packing> <property name="expand">False</property> @@ -300,19 +300,19 @@ <child> <object class="GtkScrolledWindow"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="hexpand">True</property> - <property name="hscrollbar_policy">never</property> - <property name="vscrollbar_policy">never</property> - <property name="shadow_type">in</property> + <property name="hscrollbar-policy">never</property> + <property name="vscrollbar-policy">never</property> + <property name="shadow-type">in</property> <child> <object class="GtkViewport"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <child> <object class="GtkDrawingArea" id="previewDrawingarea"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="hexpand">True</property> </object> </child> @@ -327,23 +327,23 @@ </child> </object> <packing> - <property name="left_attach">0</property> - <property name="top_attach">1</property> + <property name="left-attach">0</property> + <property name="top-attach">1</property> </packing> </child> <child> <object class="GtkButton" id="downButton"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="focus_on_click">False</property> - <property name="receives_default">True</property> + <property name="can-focus">True</property> + <property name="focus-on-click">False</property> + <property name="receives-default">True</property> <property name="valign">start</property> <property name="image">image2</property> <property name="always-show-image">True</property> </object> <packing> - <property name="left_attach">1</property> - <property name="top_attach">1</property> + <property name="left-attach">1</property> + <property name="top-attach">1</property> </packing> </child> </object> @@ -354,37 +354,37 @@ </packing> </child> <child> - <!-- n-columns=1 n-rows=1 --> + <!-- n-columns=2 n-rows=1 --> <object class="GtkGrid" id="grid2"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="halign">end</property> - <property name="column_spacing">6</property> + <property name="column-spacing">6</property> <child> <object class="GtkButton" id="removeButton"> <property name="label" translatable="yes" context="conditionwin|removeButton">-</property> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="focus_on_click">False</property> - <property name="receives_default">True</property> + <property name="can-focus">True</property> + <property name="focus-on-click">False</property> + <property name="receives-default">True</property> </object> <packing> - <property name="left_attach">1</property> - <property name="top_attach">0</property> + <property name="left-attach">1</property> + <property name="top-attach">0</property> </packing> </child> <child> <object class="GtkButton" id="addButton"> <property name="label" translatable="yes" context="conditionwin|addButton">+</property> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="focus_on_click">False</property> - <property name="receives_default">True</property> + <property name="can-focus">True</property> + <property name="focus-on-click">False</property> + <property name="receives-default">True</property> <property name="halign">end</property> </object> <packing> - <property name="left_attach">0</property> - <property name="top_attach">0</property> + <property name="left-attach">0</property> + <property name="top-attach">0</property> </packing> </child> </object>