Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tooltips are not shown #303

Closed
FreeSlave opened this issue Oct 13, 2016 · 21 comments
Closed

Tooltips are not shown #303

FreeSlave opened this issue Oct 13, 2016 · 21 comments
Assignees
Labels

Comments

@FreeSlave
Copy link
Contributor

FreeSlave commented Oct 13, 2016

example1 has tooltipText on Button, but I can't see it in application. Also could not make it work with other widgets.
Testing on Debian with LXDE.

@buggins buggins added the bug label Oct 14, 2016
@buggins buggins self-assigned this Oct 14, 2016
@buggins
Copy link
Owner

buggins commented Oct 14, 2016

Probably something is broken.

@buggins
Copy link
Owner

buggins commented Oct 14, 2016

Tooltips are working ok on Windows/Win32 backend - in both example1 (buttons tab/first button), and DlangIDE.
Windows + SDL backend - working too.
Ubuntu + SDL backend - working

Tooltips are related to timer. Is cursor blinking in text editors? In example1/misc are start/stop timer buttons working?

@FreeSlave
Copy link
Contributor Author

Oh, sorry. Tooltips work. My mistake was that I checked the wrong ones (from the Controls tab instead of Buttons)

@FreeSlave
Copy link
Contributor Author

Actually, about tooltips. I'm trying to add tooltips in FileDialog items by adding this line to the createRootsList function:

btn.tooltipText("Tooltip Text");

But tooltip does not appear.

@FreeSlave FreeSlave reopened this Oct 14, 2016
@buggins
Copy link
Owner

buggins commented Oct 14, 2016

let me check

@buggins
Copy link
Owner

buggins commented Oct 14, 2016

Tooltips do not work because button is on ListWidget.
No mouse events are being passed to items in list widget. List handles them all.
Let me think how to resolve it.
Btw, why do you need tooltips in file dialog?

@FreeSlave
Copy link
Contributor Author

FreeSlave commented Oct 14, 2016

I wanted to add tooltips on each root path to show the corresponding absolute path.

@buggins
Copy link
Owner

buggins commented Oct 14, 2016

need some improvements in list widget and adapter - to pass mouse events if necessary

@FreeSlave FreeSlave changed the title Tooltips are now shown Tooltips are not shown Oct 15, 2016
@buggins
Copy link
Owner

buggins commented Oct 17, 2016

Fixed. Added full path tooltips to filedialog as well

@FreeSlave
Copy link
Contributor Author

But now I have access violation when opening file dialog
access_violation

@FreeSlave
Copy link
Contributor Author

Also on Linux

Program received signal SIGSEGV, Segmentation fault.
0x000000000078aa2a in dlangui.widgets.lists.ListWidget.onMouseEvent() (this=0x7fffe73dc800, event=0x7fffe7382100) at src/dlangui/widgets/lists.d:1331
1331                        Widget oldParent = itemWidget.parent;
(gdb) bt
#0  0x000000000078aa2a in dlangui.widgets.lists.ListWidget.onMouseEvent() (this=0x7fffe73dc800, event=0x7fffe7382100) at src/dlangui/widgets/lists.d:1331
#1  0x000000000075cfb2 in dlangui.platforms.common.platform.Window.sendAndCheckOverride() (this=0x7ffff7f7b400, event=0x7fffe7382100, widget=0x7fffe73dc800) at src/dlangui/platforms/common/platform.d:821
#2  0x000000000075de55 in dlangui.platforms.common.platform.Window.dispatchMouseEvent() (this=0x7ffff7f7b400, event=0x7fffe7382100) at src/dlangui/platforms/common/platform.d:1060
#3  0x0000000000807ea8 in dlangui.platforms.sdl.sdlapp.SDLWindow.processMouseEvent() (this=0x7ffff7f7b400, y=35, x=37, state=0, button=1, action=2 '\002') at src/dlangui/platforms/sdl/sdlapp.d:562
#4  0x00000000008095dd in dlangui.platforms.sdl.sdlapp.SDLPlatform.enterMessageLoop() (this=0x7ffff7f0f300) at src/dlangui/platforms/sdl/sdlapp.d:1149
#5  0x00000000006f1087 in UIAppMain (args=...) at examples/example1/src/example1.d:1100
#6  0x00000000007600a5 in dlangui.platforms.sdl.sdlapp.sdlmain() (args=...) at src/dlangui/platforms/sdl/sdlapp.d:1797
#7  0x000000000075fe04 in DLANGUImain (args=...) at src/dlangui/platforms/sdl/sdlapp.d:1723
#8  0x00000000006e6748 in D main (args=...) at src/dlangui/platforms/common/platform.d:1589
#9  0x000000000088a517 in rt.dmain2._d_run_main() ()
#10 0x000000000088a461 in rt.dmain2._d_run_main() ()
#11 0x000000000088a4d3 in rt.dmain2._d_run_main() ()
#12 0x000000000088a461 in rt.dmain2._d_run_main() ()
#13 0x000000000088a3d2 in _d_run_main ()
#14 0x0000000000716f70 in main ()

@buggins
Copy link
Owner

buggins commented Oct 17, 2016

Right on open? I cannot reproduce it

@buggins buggins reopened this Oct 17, 2016
buggins added a commit that referenced this issue Oct 17, 2016
@buggins
Copy link
Owner

buggins commented Oct 17, 2016

Could you please check if fix works for you?

@FreeSlave
Copy link
Contributor Author

Yes, right on window showing.
Still crashes.

@FreeSlave
Copy link
Contributor Author

Looks like itemWidget becomes invalid pointer. Can it be destroyed somewhere by adapter?

@FreeSlave
Copy link
Contributor Author

It gets invalid after itemClicked(i);

@buggins
Copy link
Owner

buggins commented Oct 17, 2016

do you just open FileDialog or do something in it?
How do I reproduce this bug?

@FreeSlave
Copy link
Contributor Author

Oh, it happens on any menu entry. It's not File Dialog problem.
Just start example1 and click on some menu entry, e.g. File -> Open.

@buggins
Copy link
Owner

buggins commented Oct 17, 2016

wow
reproduced

buggins added a commit that referenced this issue Oct 17, 2016
@buggins
Copy link
Owner

buggins commented Oct 17, 2016

I hope it's fixed now

@FreeSlave
Copy link
Contributor Author

It looks ok now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants