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

lxqt-panel: Qeyes plugin #1847

Merged
merged 15 commits into from
Dec 21, 2022
Merged

lxqt-panel: Qeyes plugin #1847

merged 15 commits into from
Dec 21, 2022

Conversation

kreijack
Copy link
Contributor

@kreijack kreijack commented Dec 17, 2022

Hi All,

This PR adds a new plugin inspired to the venerable xeyes program.

image

I am also working to a standalone program (called qeyes), but this is another story.

This plug in has a <internal> style (which doesn't depend by any other program)

image

or can use the themes provided by mate-applets and/or gnome-applets if available.

image

It is possible to configure also the number of showed eyes:

image

I checked the plugin also for a vertical panel

image

I sent this PR to get a first feedback, because I would like to add some enhancements:

  • add translation (now the dialog is English only, I can't translate for every language, but I want to create the possibility for)
  • ingrate the themes in the plugin without be dependent by other projects. This also would allow to use SVG themes.

Comments are welcomed

@tsujan
Copy link
Member

tsujan commented Dec 17, 2022

Thanks! It's nice to have a qeyes widget.

P.S. This comment isn't a review (I've neither read nor tested the code) but just a general opinion.

@stefonarch
Copy link
Member

stefonarch commented Dec 17, 2022

It works very nicely, only thing I noticed is that "Type" configuration has only "internal" here.
It looks like that under wayland it could be used also to identify xwayland applications.

For translations only a /translations/qeyes.ts file containing the translatable strings is needed, once merged translators in our weblate instance will sure think of most languages.

@kreijack
Copy link
Contributor Author

It works very nicely, only thing I noticed is that "Type" configuration has only "internal" here.

is the only type provided by qeyes; the other types are provided by foreign packages like mate-applets and gnome-applets-data. Likely you don't have these package installed.

Could you point me how allow cmake to install resources like .png/.svg that can be used by an lxqt plugin. It would be useful if you can point me to an example.

It looks like that under wayland it could be used also to identify xwayland applications.

My understanding is that under Wayland, the application cannot access the absolute positioning of the window/mouse. So this kind of application might not work.
I didn't go deeply in this kind of issue, so I am not 100% certain of this.

For translations only a /translations/qeyes.ts file containing the translatable strings is needed, once merged translators in our weblate instance will sure think of most languages.

Many thanks for that !!!

@stefonarch
Copy link
Member

Could you point me how allow cmake to install resources like .png/.svg that can be used by an lxqt plugin. It would be useful if you can point me to an example.

Take a look at lxqt-about, it installs his own icon.

- add support for translation of the text
- reload the availables eyes not a dialog creation (which happend once),
  but when the dialog is showed
- using QStringLiteral when possible
- renamed "<internal>" as "QEyes default"
@kreijack
Copy link
Contributor Author

I updated my branch:

  • I included several "skin" from the different "eyes" project (mainly gnome-applets)
    image image image image image [...]

  • Add support for translation

So I think that this now is ready for a 'full review' for a possible integration

BR
G.Baroncelli

@stefonarch
Copy link
Member

I tested all - also new translations - and everything works perfectly. Some skins are blurred (tango, bizarre) with huge panel size (100px) but that's not an issue IMO.

For me it's GTM but I've not enough skills to review the code.

@kreijack
Copy link
Contributor Author

Thank for the testing

I tested all - also new translations - and everything works perfectly. Some skins are blurred (tango, bizarre) with huge panel size (100px) but that's not an issue IMO.

Yeah, unfortunately the "skin" are all raster (.png) based, so the upscale is not very good. Only the "Qeyes" (internal) and "Crystal" (.svg based) are vector based and so these perform good with big size.

@tsujan
Copy link
Member

tsujan commented Dec 20, 2022

I won't be able to review the code soon. If it has no (major) problem, I think it can be merged. Probable issues could be fixed at any time.

Copy link
Member

@tsujan tsujan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's have it for git users.

@kreijack, thanks again for your contributon!

@tsujan tsujan merged commit 906c11c into lxqt:master Dec 21, 2022
@stefonarch
Copy link
Member

It looks like that under wayland it could be used also to identify xwayland applications.

My understanding is that under Wayland, the application cannot access the absolute positioning of the window/mouse. So this kind of application might not work. I didn't go deeply in this kind of issue, so I am not 100% certain of this.

In fact QEyes doesn't follow applications in xwayland, while xeyes does (tested with glxgears). Wondering if this could be implemented here, an easy way to detect those applications on wayland.

@kreijack
Copy link
Contributor Author

It looks like that under wayland it could be used also to identify xwayland applications.

My understanding is that under Wayland, the application cannot access the absolute positioning of the window/mouse. So this kind of application might not work. I didn't go deeply in this kind of issue, so I am not 100% certain of this.

In fact QEyes doesn't follow applications in xwayland, while xeyes does (tested with glxgears). Wondering if this could be implemented here, an easy way to detect those applications on wayland.

Could you elaborate a bit ? I tested both xeyes and qeyes under wayland (plasma session); both exhibit the same behavior: when the mouse pointer is over the [qx]eyes window, the eyes follow the mouse. When the pointer is outside the window, the eyes don't follow the mouse anymore.

@kreijack kreijack deleted the qeyes-plugin branch December 22, 2022 19:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants