uno icon indicating copy to clipboard operation
uno copied to clipboard

`ToolTips` are not shown and keyboard shortcuts don't work for Skia.WPF.

Open Suriman opened this issue 11 months ago • 6 comments

Current behavior

When hovering the TabViewItem tab, a ToolTip with the TabViewItem's Header text should be shown but don't. Also, the Ctrl+F4 shortcut for closing the current tab doesn't work.

Expected behavior

The ToolTip shows up and the keyboard shortcuts work.

How to reproduce it (as minimally and precisely as possible)

WpfToolTipsShortcuts.zip

  1. Open the attached solution and compile it.
  2. Execute it in Skia.WPF head.
  3. Hover the TabViewItem tab.
  4. Compare with WinUI so you can see the difference.

Workaround

No known workaround.

Works on UWP/WinUI

Yes

Environment

Uno.UI / Uno.UI.WebAssembly / Uno.UI.Skia

NuGet package version(s)

Uno.WinUI 5.1.80

Affected platforms

Skia (WPF)

IDE

Visual Studio 2022

IDE version

17.9.2

Relevant plugins

No response

Anything else we need to know?

No response

Suriman avatar Mar 07 '24 19:03 Suriman

@Suriman I think you forgot to attach the repro :D

ramezgerges avatar Mar 08 '24 10:03 ramezgerges

WpfToolTipsShortcuts.zip.txt Here is the file Suriman wanted to attach; he had troubles attaching it.

sasakrsmanovic avatar Mar 08 '24 14:03 sasakrsmanovic

@sasakrsmanovic The file you sent is actually a text file with "attachment was removed"

ramezgerges avatar Mar 09 '24 11:03 ramezgerges

@Suriman the repro you provided is not the right one. You should be able to attach it here as a zip, using drag and drop. Make sure to follow these steps for creating a repro.

jeromelaban avatar Mar 18 '24 12:03 jeromelaban

@ramezgerges the repro is now attached.

jeromelaban avatar Mar 21 '24 12:03 jeromelaban

ToolTips are disabled by default. See: https://platform.uno/docs/articles/feature-flags.html#tooltips

Enable them with the FeatureConfiguration.ToolTip.UseToolTips flag.

public AppHead()
{
    FeatureConfiguration.ToolTip.UseToolTips = true;
    this.InitializeComponent();
}

Incidentally, it is usually suggested to use the __SKIA__ build constant as below. But this has never worked for me...

#if __SKIA__
        FeatureConfiguration.ToolTip.UseToolTips = true;
#endif

brinko99 avatar Mar 26 '24 20:03 brinko99

This works properly, thank you so much!

What about the Ctrl + F4 shortcut that shows up in the tooltip? Does not work for Skia but it works for WinUI. I mentioned this in the description of the issue.

Thanks in advance!

ADD-Noureddine-Maachi avatar May 22 '24 14:05 ADD-Noureddine-Maachi

What about the Ctrl + F4 shortcut that shows up in the tooltip? Does not work for Skia but it works for WinUI. I mentioned this in the description of the issue.

fyi @jeromelaban, @MartinZikmund

agneszitte avatar May 22 '24 14:05 agneszitte

This requires keyboard accelerators API, I have PR draft for that, will finish it as soon as possible

MartinZikmund avatar May 22 '24 14:05 MartinZikmund

This is implemented via https://github.com/unoplatform/uno/pull/15245 (includes TabView support)

MartinZikmund avatar Jun 21 '24 09:06 MartinZikmund

I've tried it and it works fine! Thanks @MartinZikmund 😊

ADD-Noureddine-Maachi avatar Jun 26 '24 07:06 ADD-Noureddine-Maachi

Awesome, closing!

MartinZikmund avatar Jun 26 '24 07:06 MartinZikmund