summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/source/ui/misc/bookmark.cxx20
-rw-r--r--sw/uiconfig/swriter/ui/insertbookmark.ui74
2 files changed, 56 insertions, 38 deletions
diff --git a/sw/source/ui/misc/bookmark.cxx b/sw/source/ui/misc/bookmark.cxx
index 77ff0b3bbd49..90c905d7a408 100644
--- a/sw/source/ui/misc/bookmark.cxx
+++ b/sw/source/ui/misc/bookmark.cxx
@@ -20,6 +20,7 @@
#include <rtl/ustrbuf.hxx>
#include <sfx2/request.hxx>
#include <svl/stritem.hxx>
+#include <unotools/viewoptions.hxx>
#include <vcl/weld.hxx>
#include <com/sun/star/frame/XModel.hpp>
#include <com/sun/star/text/XBookmarksSupplier.hpp>
@@ -349,6 +350,20 @@ SwInsertBookmarkDlg::SwInsertBookmarkDlg(weld::Window* pParent, SwWrtShell& rS)
// disabled until "Hide" flag is not checked
m_xConditionED->set_sensitive(false);
m_xConditionFT->set_sensitive(false);
+
+ // restore dialog size
+ SvtViewOptions aDlgOpt(EViewType::Dialog, "BookmarkDialog");
+ if (aDlgOpt.Exists())
+ m_xDialog->set_window_state(aDlgOpt.GetWindowState().toUtf8());
+}
+
+SwInsertBookmarkDlg::~SwInsertBookmarkDlg()
+{
+ // tdf#146261 - Remember size of bookmark dialog
+ SvtViewOptions aDlgOpt(EViewType::Dialog, "BookmarkDialog");
+ OString sWindowState
+ = m_xDialog->get_window_state(WindowStateMask::Pos | WindowStateMask::Size);
+ aDlgOpt.SetWindowState(OUString::fromUtf8(sWindowState));
}
IMPL_LINK(SwInsertBookmarkDlg, HeaderBarClick, int, nColumn, void)
@@ -382,13 +397,10 @@ IMPL_LINK(SwInsertBookmarkDlg, HeaderBarClick, int, nColumn, void)
}
}
-SwInsertBookmarkDlg::~SwInsertBookmarkDlg() {}
-
BookmarkTable::BookmarkTable(std::unique_ptr<weld::TreeView> xControl)
: m_xControl(std::move(xControl))
{
- m_xControl->set_size_request(450, 250);
- m_xControl->set_column_fixed_widths({ 40, 110, 150, 160 });
+ m_xControl->set_size_request(-1, m_xControl->get_height_rows(8));
m_xControl->set_selection_mode(SelectionMode::Multiple);
}
diff --git a/sw/uiconfig/swriter/ui/insertbookmark.ui b/sw/uiconfig/swriter/ui/insertbookmark.ui
index e8e4aebacd7e..0cd5225733f0 100644
--- a/sw/uiconfig/swriter/ui/insertbookmark.ui
+++ b/sw/uiconfig/swriter/ui/insertbookmark.ui
@@ -74,11 +74,10 @@
</packing>
</child>
<child>
- <!-- n-columns=3 n-rows=5 -->
+ <!-- n-columns=3 n-rows=4 -->
<object class="GtkGrid">
<property name="visible">True</property>
<property name="can-focus">False</property>
- <property name="vexpand">True</property>
<property name="row-spacing">6</property>
<property name="column-spacing">6</property>
<child>
@@ -122,6 +121,7 @@
<property name="can-default">True</property>
<property name="has-default">True</property>
<property name="receives-default">True</property>
+ <property name="halign">end</property>
</object>
<packing>
<property name="left-attach">2</property>
@@ -186,25 +186,36 @@
</packing>
</child>
<child>
- <object class="GtkLabel" id="lbBookmarks">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="halign">start</property>
- <property name="valign">start</property>
- <property name="vexpand">True</property>
- <property name="label" translatable="yes" context="insertbookmark|bookmarks">_Bookmarks:</property>
- <property name="use-underline">True</property>
- <property name="mnemonic-widget">bookmarks</property>
- </object>
- <packing>
- <property name="left-attach">0</property>
- <property name="top-attach">4</property>
- </packing>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
</child>
<child>
+ <placeholder/>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkFrame">
+ <property name="visible">True</property>
+ <property name="can-focus">False</property>
+ <property name="label-xalign">0</property>
+ <property name="shadow-type">none</property>
+ <child>
<object class="GtkScrolledWindow">
<property name="visible">True</property>
<property name="can-focus">True</property>
+ <property name="margin-start">12</property>
+ <property name="margin-top">6</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="shadow-type">in</property>
@@ -219,7 +230,7 @@
<property name="search-column">0</property>
<property name="show-expanders">False</property>
<child internal-child="selection">
- <object class="GtkTreeSelection" id="Macro Library List-selection2"/>
+ <object class="GtkTreeSelection"/>
</child>
<child>
<object class="GtkTreeViewColumn" id="treeviewcolumn0">
@@ -294,27 +305,22 @@
</object>
</child>
</object>
- <packing>
- <property name="left-attach">1</property>
- <property name="top-attach">4</property>
- <property name="width">2</property>
- </packing>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
</child>
- <child>
- <placeholder/>
+ <child type="label">
+ <object class="GtkLabel" id="lbBookmarks">
+ <property name="visible">True</property>
+ <property name="can-focus">False</property>
+ <property name="label" translatable="yes" context="insertbookmark|bookmarks">_Bookmarks:</property>
+ <property name="use-underline">True</property>
+ <property name="mnemonic-widget">bookmarks</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </object>
</child>
</object>
<packing>
- <property name="expand">False</property>
+ <property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>