-
Notifications
You must be signed in to change notification settings - Fork 731
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
[Hot Corners] Added hover delay functionality. #5829
Conversation
Hope this gets merged - lot of votes for this :) |
Also, a suggestion - when icon is visible in the corner, can the action be displayed as a tooltip on hover over icon? |
Hello, @anandrkris. I like your suggestion about adding a tooltip to the hot corners icons. I have been doing some tests but, sadly, without success. No matter how or at which point I add the tooltip, it never shows on icon hover. Here is a shortened version of what I did in case someone has any suggestion: After adding the import for the tooltip module in the js/ui/hotCorner.js file... const Tooltips = imports.ui.tooltips; ...I simply added the tooltip to the icon inside the setProperties method like this... if (this.icon) {
new Tooltips.Tooltip(this.iconActor, "Tooltip text.");
this.iconActor.show();
} else
this.iconActor.hide(); Is it even possible for the hot corners icons to have a tooltip? |
@Odyseus this.tooltip = new Tooltips.Tooltip(this.iconActor, "Tooltip text."); |
Hello, @NikoKrause. I already tried that. The very first thing that I tried was to create the tooltip inside HotCorner._init and then use the set_text() method inside the setProperties method to apply the correct tooltip text. It's pretty straight forward and it works in every applet code that I ever used, except here with the hot corners. |
@Odyseus |
Like I said, I already tried that. I used the exact code that you posted and it didn't work.
I didn't really forget. It isn't needed to store the tooltip in a new variable because the tooltip is already added to the element passed by the first argument of the constructor (here is a functional example that I use in one of my applets). Eighter way, like I stated before, I already added I did my tests in all of my 4 Cinnamon systems with the same results. The tooltip isn't shown when hovering over the hot corner icon. I will give this rest for now. Maybe someone else can create a different pull request that adds the tooltips to the hot corners icons. |
@Odyseus Just replace the hotCorner.js file in |
No, it still isn't working on any of the 4 Cinnamon systems I tried before. But, I tried it on a fith system (an Archlinux system with Cinnamon) and all tooltips work like a charm here! This is very strange! I hesitate to add to this pull request something that I can't make work reliable on all my systems. If you want to add this feature yourself and send the pull request, here is a Gist with the hotCorner.js file with icons tooltips fully implemented. |
@NikoKrause and other code reviewers. Ignore the previous posts discussing problems while setting the tooltips for the hot corners icons. I had an extension enabled that was interfering with the hot corners code. I disabled it and everything started working as it should. @anandrkris: If this PR doesn't make it, NikoKrause just send a pull request adding the tooltips to the hot corner icons. Apologies for the noise. |
@Odyseus A couple notes/suggestions.
|
Added tooltips to hot corner icons. Corrected some minor indentation/white space inconsistencies. Closes #1050
Hello, @collinss.
Thanks for your notes/suggestions, collinss. Pull request updated. |
Thanks @Odyseus for listening 😄 and again for your efforts. 👏 |
This pull request adds the ability to set a hover delay to activate hot corners. Its main purpose is to
avoid accidental hot corners activation. I also added tooltips to the hot corners icons that reflect their current action, as suggested by @anandrkris.
The new Hot Corners settings window would look like this:
Some technicalities
I used a Gtk.Grid instead of a Gtk.HBox because of its deprecation.Switched to a Gtk.Box as suggested by @collinss.This PR also adds a new string that needs to be translated. I will need advice on how to proceed with this as well.