core.git: cui/uiconfig vcl/inc vcl/source
cui/uiconfig/ui/hyperlinkdialog.ui |1 vcl/inc/verticaltabctrl.hxx|2 - vcl/source/control/imivctl.hxx |2 - vcl/source/control/imivctl1.cxx| 67 + vcl/source/control/ivctrl.cxx |4 +- vcl/source/window/builder.cxx | 14 +++ 6 files changed, 50 insertions(+), 40 deletions(-) New commits: commit b64751ba28fd69fb2a93a21b10a92b68f4dd2097 Author: Samuel Mehrbrodt AuthorDate: Fri Apr 26 10:47:00 2024 +0200 Commit: Samuel Mehrbrodt CommitDate: Mon Apr 29 07:52:27 2024 +0200 tdf#99528 Properly layout vertical tabs without icons Implement a proper list mode for VerticalTabControl. Before this was only used in the Hyperlink dialog with large icons. Change-Id: I227643392ef4840a70b379734e2993db0f13 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166702 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt diff --git a/cui/uiconfig/ui/hyperlinkdialog.ui b/cui/uiconfig/ui/hyperlinkdialog.ui index b8819f74d31a..c0eb4f085906 100644 --- a/cui/uiconfig/ui/hyperlinkdialog.ui +++ b/cui/uiconfig/ui/hyperlinkdialog.ui @@ -123,6 +123,7 @@ True True left +icons diff --git a/vcl/inc/verticaltabctrl.hxx b/vcl/inc/verticaltabctrl.hxx index c5942799b381..666bef474172 100644 --- a/vcl/inc/verticaltabctrl.hxx +++ b/vcl/inc/verticaltabctrl.hxx @@ -49,7 +49,7 @@ class VerticalTabControl final : public VclHBox VerticalTabPageData* GetPageData(const SvxIconChoiceCtrlEntry* pEntry) const; public: -VerticalTabControl(vcl::Window* pParent); +VerticalTabControl(vcl::Window* pParent, bool bWithIcons); virtual ~VerticalTabControl() override; virtual void dispose() override; diff --git a/vcl/source/control/imivctl.hxx b/vcl/source/control/imivctl.hxx index 5a052c083efa..c29068442728 100644 --- a/vcl/source/control/imivctl.hxx +++ b/vcl/source/control/imivctl.hxx @@ -303,7 +303,7 @@ public: SvxIconChoiceCtrlEntry* GetCurEntry() const { return pCursor; } voidSetCursor( SvxIconChoiceCtrlEntry* ); -SvxIconChoiceCtrlEntry* GetEntry( const Point& rDocPos, bool bHit = false ); +SvxIconChoiceCtrlEntry* GetEntry( const Point& rDocPos ); voidMakeEntryVisible( SvxIconChoiceCtrlEntry* pEntry, bool bBound = true ); diff --git a/vcl/source/control/imivctl1.cxx b/vcl/source/control/imivctl1.cxx index 1364dc4f44d0..6508c4fe12c3 100644 --- a/vcl/source/control/imivctl1.cxx +++ b/vcl/source/control/imivctl1.cxx @@ -92,7 +92,7 @@ SvxIconChoiceCtrl_Impl::SvxIconChoiceCtrl_Impl( aVisRectChangedIdle.SetInvokeHandler(LINK(this,SvxIconChoiceCtrl_Impl,VisRectChangedHdl)); Clear( true ); -Size gridSize(100,70); +Size gridSize((nWinStyle & WB_DETAILS) ? 200 : 100, (nWinStyle & WB_DETAILS) ? 20 : 70); if(pView->GetDPIScaleFactor() > 1) { gridSize.setHeight( gridSize.Height() * ( pView->GetDPIScaleFactor()) ); @@ -157,11 +157,6 @@ void SvxIconChoiceCtrl_Impl::SetStyle( WinBits nWinStyle ) eSelectionMode = SelectionMode::NONE; if( !(nWinStyle & (WB_ALIGN_TOP | WB_ALIGN_LEFT))) nWinBits |= WB_ALIGN_LEFT; -if( nWinStyle & WB_DETAILS ) -{ -if (!m_pColumns) -SetColumn( 0, SvxIconChoiceCtrlColumnInfo() ); -} } IMPL_LINK( SvxIconChoiceCtrl_Impl, ScrollUpDownHdl, ScrollBar*, pScrollBar, void ) @@ -608,7 +603,7 @@ bool SvxIconChoiceCtrl_Impl::MouseButtonDown( const MouseEvent& rMEvt) if(aDocPos.X()>=aOutputSize.Width() || aDocPos.Y()>=aOutputSize.Height()) return false; ToDocPos( aDocPos ); -SvxIconChoiceCtrlEntry* pEntry = GetEntry( aDocPos, true ); +SvxIconChoiceCtrlEntry* pEntry = GetEntry( aDocPos ); if( pEntry ) MakeEntryVisible( pEntry, false ); @@ -785,7 +780,7 @@ bool SvxIconChoiceCtrl_Impl::MouseMove( const MouseEvent& rMEvt ) return false; else if( nWinBits & WB_HIGHLIGHTFRAME ) { -SvxIconChoiceCtrlEntry* pEntry = GetEntry( aDocPos, true ); +SvxIconChoiceCtrlEntry* pEntry = GetEntry( aDocPos ); SetEntryHighlightFrame( pEntry, false ); } else @@ -1513,7 +1508,7 @@ void SvxIconChoiceCtrl_Impl::SetNoSelection() } } -SvxIconChoiceCtrlEntry* SvxIconChoiceCtrl_Impl::GetEntry( const Point& rDocPos, bool bHit ) +SvxIconChoiceCtrlEntry* SvxIconChoiceCtrl_Impl::GetEntry( const Point& rDocPos ) { CheckBoundingRects(); // search through z-order list from the end @@ -1522,24 +1517,9 @@ SvxIconChoiceCtrlEntry* SvxIconChoiceCtrl_Impl::GetEntry( const Point& rDocPos, { nCount--; SvxIconChoiceCtrlEntry* pEntry = maZOrderList[ nCount ]; -if( pEntry->aRect.Contains( rDocPos ) ) -{ -if( bHit ) -{ -tools::Rectangle aRect = CalcBmpRect( pEntry ); -
core.git: cui/uiconfig vcl/inc vcl/source
cui/uiconfig/ui/spellingdialog.ui |2 +- vcl/inc/bitmaps.hlst |1 + vcl/source/window/builder.cxx |2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) New commits: commit 174430d7a831eede078b6718d991b506d39180f1 Author: Caolán McNamara AuthorDate: Fri Mar 29 21:37:59 2024 + Commit: Caolán McNamara CommitDate: Sat Mar 30 15:09:43 2024 +0100 Related: tdf#160159 use a stock icon for the character map https://specifications.freedesktop.org/icon-naming-spec/0.8/ar01s04.html Where "accessories-character-map" is "The icon used for the ... character accessory program" Change-Id: I48c72aaa3827037eb6921571bcce061fe60ac135 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165561 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/cui/uiconfig/ui/spellingdialog.ui b/cui/uiconfig/ui/spellingdialog.ui index f661a5a8b80e..9aa0ae3145e7 100644 --- a/cui/uiconfig/ui/spellingdialog.ui +++ b/cui/uiconfig/ui/spellingdialog.ui @@ -306,7 +306,7 @@ True Special Character True -cmd/sc_insertsymbol.png +accessories-character-map False diff --git a/vcl/inc/bitmaps.hlst b/vcl/inc/bitmaps.hlst index f4ccaaa46a2e..da7f30a3ee8b 100644 --- a/vcl/inc/bitmaps.hlst +++ b/vcl/inc/bitmaps.hlst @@ -140,6 +140,7 @@ inline constexpr OUString IMG_COPY = u"cmd/sc_copy.png"_ustr; inline constexpr OUString IMG_PASTE = u"cmd/sc_paste.png"_ustr; inline constexpr OUString IMG_MENU = u"sfx2/res/menu.png"_ustr; inline constexpr OUString IMG_CALENDAR = u"sc/res/date.png"_ustr; +inline constexpr OUString IMG_CHARACTER_MAP = u"cmd/sc_insertsymbol.png"_ustr; inline constexpr OUString IMG_OPEN = u"cmd/sc_open.png"_ustr; inline constexpr OUString RID_BMP_TREENODE_COLLAPSED = u"res/plus.png"_ustr; diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx index de5c5ea1bbce..fcb3a21fee30 100644 --- a/vcl/source/window/builder.cxx +++ b/vcl/source/window/builder.cxx @@ -118,6 +118,8 @@ namespace return SV_RESID_BITMAP_CLOSEDOC; else if (sType == u"x-office-calendar") return IMG_CALENDAR; +else if (sType == u"accessories-character-map") +return IMG_CHARACTER_MAP; return OUString(); }
[Libreoffice-commits] core.git: cui/uiconfig vcl/inc vcl/source
cui/uiconfig/ui/spellingdialog.ui |2 +- vcl/inc/bitmaps.hlst |2 ++ vcl/source/window/builder.cxx | 18 ++ 3 files changed, 21 insertions(+), 1 deletion(-) New commits: commit baa55eca0b653d4f661c08f5b6593caa3b186e89 Author: Caolán McNamara AuthorDate: Mon Jun 15 20:03:47 2020 +0100 Commit: Caolán McNamara CommitDate: Tue Jun 16 09:36:05 2020 +0200 support gtk-copy and gtk-paste stock ids Change-Id: I0d9dc30c62bdfb5976c86bc5a08d5f030eb216e8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96394 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/cui/uiconfig/ui/spellingdialog.ui b/cui/uiconfig/ui/spellingdialog.ui index 6e437a1145b2..7673d262e21c 100644 --- a/cui/uiconfig/ui/spellingdialog.ui +++ b/cui/uiconfig/ui/spellingdialog.ui @@ -272,7 +272,7 @@ False Paste True -cmd/sc_paste.png +gtk-paste False diff --git a/vcl/inc/bitmaps.hlst b/vcl/inc/bitmaps.hlst index 5ce994a0c384..68f23533eae0 100644 --- a/vcl/inc/bitmaps.hlst +++ b/vcl/inc/bitmaps.hlst @@ -138,6 +138,8 @@ #define IMG_INFO"dbaccess/res/exinfo.png" #define IMG_ADD "extensions/res/scanner/plus.png" #define IMG_REMOVE "extensions/res/scanner/minus.png" +#define IMG_COPY"cmd/sc_copy.png" +#define IMG_PASTE "cmd/sc_paste.png" #define RID_BMP_TREENODE_COLLAPSED "res/plus.png" #define RID_BMP_TREENODE_EXPANDED "res/minus.png" diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx index ff1f4ca9fe64..368b771068f3 100644 --- a/vcl/source/window/builder.cxx +++ b/vcl/source/window/builder.cxx @@ -95,6 +95,10 @@ namespace return IMG_ADD; else if (sType == "gtk-remove") return IMG_REMOVE; +else if (sType == "gtk-copy") +return IMG_COPY; +else if (sType == "gtk-paste") +return IMG_PASTE; return OUString(); } @@ -1048,6 +1052,18 @@ namespace return sIconName; } +OUString extractStockId(VclBuilder::stringmap ) +{ +OUString sIconName; +VclBuilder::stringmap::iterator aFind = rMap.find(OString("stock-id")); +if (aFind != rMap.end()) +{ +sIconName = aFind->second; +rMap.erase(aFind); +} +return sIconName; +} + OUString getStockText(const OUString ) { if (rType == "gtk-ok") @@ -2216,6 +2232,8 @@ VclPtr VclBuilder::makeObject(vcl::Window *pParent, const OString & pToolBox->SetQuickHelpText(nItemId, sTooltip); OUString sIconName(extractIconName(rMap)); +if (sIconName.isEmpty()) +sIconName = mapStockToImageResource(extractStockId(rMap)); if (!sIconName.isEmpty()) pToolBox->SetItemImage(nItemId, FixedImage::loadThemeImage(sIconName)); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: cui/uiconfig vcl/inc vcl/source
cui/uiconfig/ui/optmemorypage.ui |8 + vcl/inc/vcl/builder.hxx |4 ++ vcl/source/window/builder.cxx| 60 --- 3 files changed, 63 insertions(+), 9 deletions(-) New commits: commit fc2f3ce3c1beb845368a29ebaa29b1c90f4d1469 Author: Caolán McNamara caol...@redhat.com Date: Thu Feb 21 11:55:01 2013 + add a mechanism to load date fields from .ui files Change-Id: If546e2f5c0f4b58d1306c737bf69799e8033c5c0 diff --git a/cui/uiconfig/ui/optmemorypage.ui b/cui/uiconfig/ui/optmemorypage.ui index e3be9b6..3675e6c 100644 --- a/cui/uiconfig/ui/optmemorypage.ui +++ b/cui/uiconfig/ui/optmemorypage.ui @@ -23,11 +23,9 @@ property name=page_increment10/property /object object class=GtkAdjustment id=adjustment4 -property name=lower1/property -property name=upper1439/property -property name=value10/property -property name=step_increment1/property -property name=page_increment10/property +property name=lower1/property +property name=upper2359/property +property name=value10/property /object object class=GtkBox id=OptMemoryPage property name=visibleTrue/property diff --git a/vcl/inc/vcl/builder.hxx b/vcl/inc/vcl/builder.hxx index 41178ed..11693a3 100644 --- a/vcl/inc/vcl/builder.hxx +++ b/vcl/inc/vcl/builder.hxx @@ -23,6 +23,7 @@ class ListBox; class NumericFormatter; class PopupMenu; class ScrollBar; +class DateField; class TimeField; class VclMultiLineEdit; @@ -129,6 +130,7 @@ private: typedef stringmap Adjustment; const Adjustment *get_adjustment_by_name(OString sID) const; static void mungeAdjustment(NumericFormatter rTarget, const Adjustment rAdjustment); +static void mungeAdjustment(DateField rTarget, const Adjustment rAdjustment); static void mungeAdjustment(TimeField rTarget, const Adjustment rAdjustment); static void mungeAdjustment(ScrollBar rTarget, const Adjustment rAdjustment); @@ -169,6 +171,7 @@ private: std::vectorWidgetAdjustmentMap m_aNumericFormatterAdjustmentMaps; std::vectorWidgetAdjustmentMap m_aTimeFormatterAdjustmentMaps; +std::vectorWidgetAdjustmentMap m_aDateFormatterAdjustmentMaps; std::vectorWidgetAdjustmentMap m_aScrollAdjustmentMaps; std::mapOString, Adjustment m_aAdjustments; @@ -263,6 +266,7 @@ private: void connectNumericFormatterAdjustment(const OString id, const OString rAdjustment); void connectTimeFormatterAdjustment(const OString id, const OString rAdjustment); +void connectDateFormatterAdjustment(const OString id, const OString rAdjustment); bool extractGroup(const OString id, stringmap rVec); bool extractModel(const OString id, stringmap rVec); diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx index dc25339..264bf92 100644 --- a/vcl/source/window/builder.cxx +++ b/vcl/source/window/builder.cxx @@ -256,6 +256,16 @@ VclBuilder::VclBuilder(Window *pParent, OUString sUIDir, OUString sUIFile, OStri mungeAdjustment(*pTarget, *pAdjustment); } +for (std::vectorWidgetAdjustmentMap::iterator aI = m_pParserState-m_aDateFormatterAdjustmentMaps.begin(), + aEnd = m_pParserState-m_aDateFormatterAdjustmentMaps.end(); aI != aEnd; ++aI) +{ +DateField *pTarget = dynamic_castDateField*(getWindow(aI-m_sID)); +const Adjustment *pAdjustment = get_adjustment_by_name(aI-m_sValue); +SAL_WARN_IF(!pTarget || !pAdjustment, vcl, missing elements of spinbutton/adjustment); +if (pTarget pAdjustment) +mungeAdjustment(*pTarget, *pAdjustment); +} + //Set ScrollBar adjustments when everything has been imported for (std::vectorWidgetAdjustmentMap::iterator aI = m_pParserState-m_aScrollAdjustmentMaps.begin(), aEnd = m_pParserState-m_aScrollAdjustmentMaps.end(); aI != aEnd; ++aI) @@ -715,6 +725,12 @@ void VclBuilder::connectTimeFormatterAdjustment(const OString id, const OString m_pParserState-m_aTimeFormatterAdjustmentMaps.push_back(WidgetAdjustmentMap(id, rAdjustment)); } +void VclBuilder::connectDateFormatterAdjustment(const OString id, const OString rAdjustment) +{ +if (!rAdjustment.isEmpty()) + m_pParserState-m_aDateFormatterAdjustmentMaps.push_back(WidgetAdjustmentMap(id, rAdjustment)); +} + bool VclBuilder::extractScrollAdjustment(const OString id, VclBuilder::stringmap rMap) { VclBuilder::stringmap::iterator aFind = rMap.find(OString(adjustment)); @@ -1024,6 +1040,13 @@ Window *VclBuilder::makeObject(Window *pParent, const OString name, const OStri TimeField *pField = new TimeField(pParent, nBits); pWindow = pField; } +else if (sPattern == yy:mm:dd) +{ +connectDateFormatterAdjustment(id, sAdjustment); +SAL_INFO(vcl.layout, making date field for name.getStr() sUnit.getStr());