Bug 148183 - Dragging widgets in the Dialog Editor should preview the full widget size
Summary: Dragging widgets in the Dialog Editor should preview the full widget size
Status: ASSIGNED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
Version:
(earliest affected)
7.3.1.3 release
Hardware: All All
: medium normal
Assignee: Rafael Lima
URL:
Whiteboard:
Keywords: needsDevAdvice
Depends on:
Blocks: BASIC-Dialog-Designer
  Show dependency treegraph
 
Reported: 2022-03-25 11:44 UTC by Rafael Lima
Modified: 2024-02-22 15:07 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Video showing the bug (47.68 KB, video/mp4)
2022-03-25 11:44 UTC, Rafael Lima
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rafael Lima 2022-03-25 11:44:37 UTC
Created attachment 179101 [details]
Video showing the bug

Suppose you add a widget to a Basic dialog using the Dialog Editor (in the Basic IDE). If you drag this widget to another place in the dialog, a preview of the widget is drawn, however with a much smaller size. See the attached video for a better explanation.

The preview should have the same size as the widget, so that when the user drags the widget to some other place, it will be possible to know exactly the are that it will occupy. This issue has been a big problem for me while designing Basic dialogs.

This bug seems to be around for a long time, at least since 6.4, but I cannot tell if it is inherited from OO.

System info:
Version: 7.3.1.3 / LibreOffice Community
Build ID: 30(Build:3)
CPU threads: 16; OS: Linux 5.13; UI render: default; VCL: kf5 (cairo+xcb)
Locale: pt-BR (pt_BR.UTF-8); UI: en-US
Ubuntu package version: 1:7.3.1~rc3-0ubuntu0.21.10.1~lo2
Calc: threaded
Comment 1 Rafael Lima 2022-03-25 11:47:15 UTC
Minor typo in the original message:

The preview should have the same size as the widget, so that when the user drags the widget to some other place, it will be possible to know exactly the AREA that it will occupy.
Comment 2 Andreas Heinisch 2022-06-29 08:46:09 UTC
Confirmed in:
Version: 7.5.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 1c44d1051cfee6ce7099965dc4470b4820f80489
CPU threads: 16; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: en-US
Calc: CL
Comment 3 Rafael Lima 2023-08-18 18:10:54 UTC
I looked for it, but could not find where the previews are drawn when dragging widgets.

Can anyone provide a code pointer for this bug? I would like to try to fix it.
Comment 4 Andreas Heinisch 2023-12-12 14:18:40 UTC
It should be DlgEdFuncSelect::MouseMove at [1]

[1] https://opengrok.libreoffice.org/xref/core/basctl/source/dlged/dlgedfunc.cxx?r=5ae01ffa#407
Comment 5 Rafael Lima 2024-01-22 23:33:31 UTC
(In reply to Andreas Heinisch from comment #4)
> It should be DlgEdFuncSelect::MouseMove at [1]
> 
> [1]
> https://opengrok.libreoffice.org/xref/core/basctl/source/dlged/dlgedfunc.
> cxx?r=5ae01ffa#407

I've been debugging this bug for 3 days and I cannot find where it is.

I have a feeling that it has something to do with the BASEPROPERTY_GRAPHIC property of the UnoControlModel. I guess the graphic used while dragging the object is corrupted somehow.

However I have no idea where the actual graphic for the controls are defined.
Comment 6 Rafael Lima 2024-02-22 15:07:10 UTC
Finally I figured out what is causing this bug.

Proposed fix here:
https://gerrit.libreoffice.org/c/core/+/163757