diff options
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/options/optcolor.cxx | 27 | ||||
-rw-r--r-- | cui/uiconfig/ui/chapterfragment.ui | 31 | ||||
-rw-r--r-- | cui/uiconfig/ui/colorfragment.ui | 38 |
3 files changed, 46 insertions, 50 deletions
diff --git a/cui/source/options/optcolor.cxx b/cui/source/options/optcolor.cxx index 0296e9a0d132..9ab34dd61434 100644 --- a/cui/source/options/optcolor.cxx +++ b/cui/source/options/optcolor.cxx @@ -185,7 +185,7 @@ public: weld::Widget& GetBody() { - return *m_xGrid; + return *m_xBox; } void AdjustExtraWidths(int nTextWidth); @@ -240,7 +240,7 @@ private: private: weld::Window* m_pTopLevel; std::unique_ptr<weld::Builder> m_xBuilder; - std::unique_ptr<weld::Container> m_xGrid; + std::unique_ptr<weld::Box> m_xBox; std::unique_ptr<weld::Widget> m_xWidget1; std::unique_ptr<weld::Widget> m_xWidget2; @@ -364,7 +364,7 @@ void ColorConfigWindow_Impl::Entry::ColorChanged(ExtendedColorConfigValue& rValu ColorConfigWindow_Impl::ColorConfigWindow_Impl(weld::Window* pTopLevel, weld::Container* pParent) : m_pTopLevel(pTopLevel) , m_xBuilder(Application::CreateBuilder(pParent, "cui/ui/colorconfigwin.ui")) - , m_xGrid(m_xBuilder->weld_container("ColorConfigWindow")) + , m_xBox(m_xBuilder->weld_box("ColorConfigWindow")) , m_xWidget1(m_xBuilder->weld_widget("doccolor")) , m_xWidget2(m_xBuilder->weld_widget("doccolor_lb")) { @@ -418,38 +418,31 @@ void ColorConfigWindow_Impl::CreateEntries() if (!nExtGroupCount) return; - size_t nLineNum = vChapters.size() + vEntries.size() + 1; for (unsigned j = 0; j != nExtGroupCount; ++j) { - vExtBuilders.emplace_back(Application::CreateBuilder(m_xGrid.get(), "cui/ui/chapterfragment.ui")); - vExtContainers.emplace_back(vExtBuilders.back()->weld_container("ChapterFragment")); - - vExtContainers.back()->set_grid_width(3); - vExtContainers.back()->set_grid_left_attach(0); - vExtContainers.back()->set_grid_top_attach(nLineNum); + vExtBuilders.emplace_back(Application::CreateBuilder(m_xBox.get(), "cui/ui/chapterfragment.ui")); + vExtContainers.emplace_back(vExtBuilders.back()->weld_frame("ChapterFragment")); OUString const sComponentName = aExtConfig.GetComponentName(j); vChapters.push_back(std::make_shared<Chapter>( *vExtBuilders.back(), "chapter", true)); vChapters.back()->SetText(aExtConfig.GetComponentDisplayName(sComponentName)); - ++nLineNum; + + vExtContainers.emplace_back(vExtBuilders.back()->weld_box("contents")); + weld::Container* pChapterBox = vExtContainers.back().get(); + unsigned nColorCount = aExtConfig.GetComponentColorCount(sComponentName); for (unsigned i = 0; i != nColorCount; ++i) { - vExtBuilders.emplace_back(Application::CreateBuilder(m_xGrid.get(), "cui/ui/colorfragment.ui")); + vExtBuilders.emplace_back(Application::CreateBuilder(pChapterBox, "cui/ui/colorfragment.ui")); vExtContainers.emplace_back(vExtBuilders.back()->weld_container("ColorFragment")); - vExtContainers.back()->set_grid_width(3); - vExtContainers.back()->set_grid_left_attach(0); - vExtContainers.back()->set_grid_top_attach(nLineNum); - ExtendedColorConfigValue const aColorEntry = aExtConfig.GetComponentColorConfigValue(sComponentName, i); vEntries.push_back(std::make_shared<Entry>(m_pTopLevel, *vExtBuilders.back(), "label", "button", aColorEntry.getDefaultColor(), nCheckBoxLabelOffset, false, true)); vEntries.back()->SetText(aColorEntry.getDisplayName()); - ++nLineNum; } } } diff --git a/cui/uiconfig/ui/chapterfragment.ui b/cui/uiconfig/ui/chapterfragment.ui index b1179f5fbabd..6ed4fb34a71a 100644 --- a/cui/uiconfig/ui/chapterfragment.ui +++ b/cui/uiconfig/ui/chapterfragment.ui @@ -1,28 +1,31 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- Generated with glade 3.22.1 --> +<!-- Generated with glade 3.38.2 --> <interface domain="cui"> <requires lib="gtk+" version="3.20"/> - <!-- n-columns=1 n-rows=1 --> - <object class="GtkGrid" id="ChapterFragment"> + <object class="GtkFrame" id="ChapterFragment"> <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="row_spacing">6</property> - <property name="column_spacing">12</property> - <property name="row_homogeneous">True</property> + <property name="can-focus">False</property> + <property name="label-xalign">0</property> + <property name="shadow-type">none</property> <child> + <object class="GtkBox" id="contents"> + <property name="visible">True</property> + <property name="can-focus">False</property> + <property name="orientation">vertical</property> + <property name="spacing">3</property> + <child> + <placeholder/> + </child> + </object> + </child> + <child type="label"> <object class="GtkLabel" id="chapter"> <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="xalign">0</property> + <property name="can-focus">False</property> <attributes> <attribute name="weight" value="bold"/> </attributes> </object> - <packing> - <property name="left_attach">0</property> - <property name="top_attach">0</property> - <property name="width">3</property> - </packing> </child> </object> </interface> diff --git a/cui/uiconfig/ui/colorfragment.ui b/cui/uiconfig/ui/colorfragment.ui index a0b1fa636ebe..e127bf52d58a 100644 --- a/cui/uiconfig/ui/colorfragment.ui +++ b/cui/uiconfig/ui/colorfragment.ui @@ -1,47 +1,47 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- Generated with glade 3.22.1 --> +<!-- Generated with glade 3.38.2 --> <interface domain="cui"> <requires lib="gtk+" version="3.20"/> - <!-- n-columns=1 n-rows=1 --> + <!-- n-columns=2 n-rows=1 --> <object class="GtkGrid" id="ColorFragment"> <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="row_spacing">6</property> - <property name="column_spacing">12</property> - <property name="row_homogeneous">True</property> + <property name="can-focus">False</property> + <property name="margin-start">6</property> + <property name="margin-end">6</property> + <property name="column-spacing">6</property> + <property name="row-homogeneous">True</property> <child> <object class="GtkLabel" id="label"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="margin-start">6</property> - <property name="use_underline">True</property> - <property name="mnemonic_widget">button</property> + <property name="use-underline">True</property> + <property name="mnemonic-widget">button</property> <property name="xalign">0</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="GtkMenuButton" id="button"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">False</property> + <property name="can-focus">True</property> + <property name="receives-default">False</property> + <property name="halign">end</property> + <property name="hexpand">True</property> <property name="xalign">0</property> - <property name="draw_indicator">True</property> + <property name="draw-indicator">True</property> <property name="label" translatable="no"></property> <child> <placeholder/> </child> </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> - <placeholder/> - </child> </object> </interface> |