dbaccess/source/ui/inc/JoinTableView.hxx | 2 ++ dbaccess/source/ui/inc/TableWindowListBox.hxx | 3 +++ dbaccess/source/ui/inc/callbacks.hxx | 11 +++++++++++ dbaccess/source/ui/querydesign/JoinTableView.cxx | 4 ++++ dbaccess/source/ui/querydesign/TableWindowListBox.cxx | 14 +++++++++++++- include/vcl/weld.hxx | 2 ++ vcl/inc/salvtables.hxx | 2 ++ vcl/source/app/salvtables.cxx | 5 +++++ vcl/unx/gtk3/gtk3gtkinst.cxx | 6 ++++++ 9 files changed, 48 insertions(+), 1 deletion(-)
New commits: commit 62ae240e9e9405b04488ade5ef113b42a3d583fa Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Wed Aug 19 11:44:38 2020 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Wed Aug 19 16:28:31 2020 +0200 support the background color used by base's title windows Change-Id: Id5e9b34f35bdcd38c7d22797573ce2549f842a66 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100991 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/include/vcl/weld.hxx b/include/vcl/weld.hxx index b2080c671874..cd56690f0575 100644 --- a/include/vcl/weld.hxx +++ b/include/vcl/weld.hxx @@ -249,6 +249,8 @@ public: virtual void set_stack_background() = 0; //make this widget look like it has a highlighted background virtual void set_highlight_background() = 0; + //make this widget suitable as parent for a title + virtual void set_title_background() = 0; //make this widget suitable for use in a toolbar virtual void set_toolbar_background() = 0; diff --git a/vcl/inc/salvtables.hxx b/vcl/inc/salvtables.hxx index 0b5f52179bdc..f7addeea389e 100644 --- a/vcl/inc/salvtables.hxx +++ b/vcl/inc/salvtables.hxx @@ -379,6 +379,8 @@ public: virtual void set_stack_background() override; + virtual void set_title_background() override; + virtual void set_toolbar_background() override; virtual void set_highlight_background() override; diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx index aa44a1ac0275..906cd00cffe3 100644 --- a/vcl/source/app/salvtables.cxx +++ b/vcl/source/app/salvtables.cxx @@ -519,6 +519,11 @@ void SalInstanceWidget::set_stack_background() set_background(m_xWidget->GetSettings().GetStyleSettings().GetWindowColor()); } +void SalInstanceWidget::set_title_background() +{ + set_background(m_xWidget->GetSettings().GetStyleSettings().GetShadowColor()); +} + void SalInstanceWidget::set_toolbar_background() { m_xWidget->SetBackground(); diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx index 3c2032970376..bfd3c32eca6c 100644 --- a/vcl/unx/gtk3/gtk3gtkinst.cxx +++ b/vcl/unx/gtk3/gtk3gtkinst.cxx @@ -2921,6 +2921,12 @@ public: set_background(&sColor); } + virtual void set_title_background() override + { + OUString sColor = Application::GetSettings().GetStyleSettings().GetShadowColor().AsRGBHexString(); + set_background(&sColor); + } + virtual void set_highlight_background() override { OUString sColor = Application::GetSettings().GetStyleSettings().GetHighlightColor().AsRGBHexString(); commit db56c1ccdb03a8b22e6021e2bd394745a1f997cf Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Wed Aug 19 13:01:51 2020 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Wed Aug 19 16:28:12 2020 +0200 restore call to dragFinished on successful drop Change-Id: Ib8a1e7f38d4e5f658ff55b645d39b0c521e21f87 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100990 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/dbaccess/source/ui/inc/JoinTableView.hxx b/dbaccess/source/ui/inc/JoinTableView.hxx index 53201878ad56..413cccf32e7d 100644 --- a/dbaccess/source/ui/inc/JoinTableView.hxx +++ b/dbaccess/source/ui/inc/JoinTableView.hxx @@ -75,6 +75,7 @@ namespace dbaui class OJoinTableView : public vcl::Window, + public IDragTransferableListener, public DropTargetHelper { friend class OJoinMoveTabWinUndoAct; @@ -274,6 +275,7 @@ namespace dbaui virtual void Resize() override; + virtual void dragFinished( ) override; /// @note here the physical position (that can be changed while /// resizing) is used, as no scrolling can take place while resizing virtual void Command(const CommandEvent& rEvt) override; diff --git a/dbaccess/source/ui/inc/TableWindowListBox.hxx b/dbaccess/source/ui/inc/TableWindowListBox.hxx index 968ef93ab506..5ca01098266b 100644 --- a/dbaccess/source/ui/inc/TableWindowListBox.hxx +++ b/dbaccess/source/ui/inc/TableWindowListBox.hxx @@ -50,6 +50,7 @@ namespace dbaui class OTableWindowListBox : public InterimItemWindow + , public IDragTransferableListener { std::unique_ptr<weld::TreeView> m_xTreeView; std::unique_ptr<TableWindowListBoxHelper> m_xDragDropTargetHelper; @@ -71,6 +72,8 @@ namespace dbaui virtual void LoseFocus() override; virtual void GetFocus() override; + virtual void dragFinished( ) override; + public: OTableWindowListBox(OTableWindow* pParent); virtual ~OTableWindowListBox() override; diff --git a/dbaccess/source/ui/inc/callbacks.hxx b/dbaccess/source/ui/inc/callbacks.hxx index d55edc6a63cb..c7a8864eae29 100644 --- a/dbaccess/source/ui/inc/callbacks.hxx +++ b/dbaccess/source/ui/inc/callbacks.hxx @@ -105,6 +105,17 @@ namespace dbaui ~IContextMenuProvider() {} }; + // IDragTransferableListener + class SAL_NO_VTABLE IDragTransferableListener + { + public: + /// called when a drag operation done with a Transferable has been finished + virtual void dragFinished( ) = 0; + + protected: + ~IDragTransferableListener() {} + }; + } // namespace dbaui #endif // INCLUDED_DBACCESS_SOURCE_UI_INC_CALLBACKS_HXX diff --git a/dbaccess/source/ui/querydesign/JoinTableView.cxx b/dbaccess/source/ui/querydesign/JoinTableView.cxx index ecd6d47aedea..5ef30e19aeda 100644 --- a/dbaccess/source/ui/querydesign/JoinTableView.cxx +++ b/dbaccess/source/ui/querydesign/JoinTableView.cxx @@ -1473,6 +1473,10 @@ sal_Int8 OJoinTableView::ExecuteDrop( const ExecuteDropEvent& /*_rEvt*/ ) return DND_ACTION_NONE; } +void OJoinTableView::dragFinished( ) +{ +} + void OJoinTableView::clearLayoutInformation() { m_pLastFocusTabWin = nullptr; diff --git a/dbaccess/source/ui/querydesign/TableWindowListBox.cxx b/dbaccess/source/ui/querydesign/TableWindowListBox.cxx index db2af6ad9458..ae83c8714458 100644 --- a/dbaccess/source/ui/querydesign/TableWindowListBox.cxx +++ b/dbaccess/source/ui/querydesign/TableWindowListBox.cxx @@ -58,6 +58,16 @@ OTableWindowListBox::OTableWindowListBox( OTableWindow* pParent ) m_xTreeView->connect_drag_begin(LINK(this, OTableWindowListBox, DragBeginHdl)); } +void OTableWindowListBox::dragFinished( ) +{ + // first show the error msg when existing + m_pTabWin->getDesignView()->getController().showError(m_pTabWin->getDesignView()->getController().clearOccurredError()); + // second look for ui activities which should happen after d&d + if (m_nUiEvent) + Application::RemoveUserEvent(m_nUiEvent); + m_nUiEvent = Application::PostUserEvent(LINK(this, OTableWindowListBox, LookForUiHdl), nullptr, true); +} + OTableWindowListBox::~OTableWindowListBox() { disposeOnce(); @@ -203,7 +213,9 @@ sal_Int8 OTableWindowListBox::ExecuteDrop( const ExecuteDropEvent& _rEvt ) Application::RemoveUserEvent(m_nDropEvent); m_nDropEvent = Application::PostUserEvent(LINK(this, OTableWindowListBox, DropHdl), nullptr, true); - return DND_ACTION_LINK; + dragFinished(); + + return DND_ACTION_NONE; } return DND_ACTION_NONE; } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits