Closed astro-ray closed 1 month ago
Mh ... It doesn't seem like tooltip position can be changed very easily... I'll try a little more but I'm not too sure. We may have to recode buttons from scratch to do that ...
The issue is probably a gtk one though. AFAIK the tooltip position is derived only from the button position (above or below) and it doesn't seem like it takes into account other UI elements (so that it wouldn't be over another element).
This can be seen in the left toolbar : tooltips are still above/below element even though having them on the left/right would make more sense (and I don't think I can force this either).
I don't seem to find how to have a smaller margin between the buttons and the end of the toolbar either (so that the tooltip ends up out of the toolbar).
Also, tooltips are pretty buggy on non linux platforms.
So overall, maybe not possible right now without a large effort (and with very limited benefits anyway as there are larger issues on other platforms regarding position).
gtk::Tooltip has a paragraph on setting a custom tooltip but it doesn't seem to be working great. It's much slower to appear, doesn't appear all the time, and it doesn't seem like setting the tip area manually does anything.
I tried this but it didn't work
imp.brush_toggle.connect_query_tooltip(|_button,x,y,boolval,tooltip| {
println!("{:?}",tooltip); //modify the tooltip here ?
println!("{:?} {:?} {:?}",x,y,boolval);
// need to have the text here then
tooltip.set_text(Some("hello")); //call property to get the property
tooltip.set_tip_area(&Rectangle::new(x, y, 10, 10));
true
});
Probably having a custom tooltip that way doesn't really work and interferes with the button tooltip, meaning we have to redo a custom button for this ....
To be honest I really don't think this is an issue that is worth spending time on - let's not get too perfectionistic with the UI.
I am not very familiar with the widely used terms for UI elements, so maybe my title and description will be a little off. Feel free to edit the Title as you see fit.
Describe the bug
The floating description that appears when you hover your cursor above any tool on toolbar overlaps with the toolbar.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The popup should be a few pixel above toolbar
Console Output
Run the app in the terminal with
flatpak --env=RUST_LOG=rnote=debug --env=RUST_BACKTRACE=1 run com.github.flxzt.rnote
and post the output.Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Additional context
Resolution: 1920 x 1080