diff options
author | Pranav Kant <pranavk@collabora.co.uk> | 2018-01-25 14:34:19 +0530 |
---|---|---|
committer | Pranav Kant <pranavk@collabora.co.uk> | 2018-01-25 15:35:20 +0530 |
commit | 668deca97d8dd049bb17b6d8b73c4ea73f7b8b9c (patch) | |
tree | b8cf812acb16c5b71d4713acdcd3dc35910b25c3 /vcl | |
parent | f1a68998e11291d117140ea07f1da84b4309f2d4 (diff) |
lokdialog: Fix incorrect dialog sizes sent to client
GetSizePixel triggers pending resize handler and gives more correct
sizes than GetOptimalSize(). Some of the dialog with inconsistencies in
sizes like EditStyle, Manage Changes, etc. are fixed with this patch.
Change-Id: I0661b7d2e98233edf0cd2c9c525b271d0724da08
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/window/dialog.cxx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx index c61a41be32f1..272da360b503 100644 --- a/vcl/source/window/dialog.cxx +++ b/vcl/source/window/dialog.cxx @@ -886,10 +886,9 @@ bool Dialog::ImplStartExecuteModal() { if(const vcl::ILibreOfficeKitNotifier* pNotifier = GetLOKNotifier()) { - const Size aSize = GetOptimalSize(); std::vector<vcl::LOKPayloadItem> aItems; aItems.emplace_back("type", "dialog"); - aItems.emplace_back("size", aSize.toString()); + aItems.emplace_back("size", GetSizePixel().toString()); if (!GetText().isEmpty()) aItems.emplace_back("title", GetText().toUtf8()); pNotifier->notifyWindow(GetLOKWindowId(), "created", aItems); @@ -1256,7 +1255,7 @@ void Dialog::Resize() if (const vcl::ILibreOfficeKitNotifier* pNotifier = GetLOKNotifier()) { std::vector<vcl::LOKPayloadItem> aItems; - aItems.emplace_back("size", GetOptimalSize().toString()); + aItems.emplace_back("size", GetSizePixel().toString()); pNotifier->notifyWindow(GetLOKWindowId(), "size_changed", aItems); } } |