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

Add panel padding property #1940

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Conversation

antis81
Copy link

@antis81 antis81 commented Sep 27, 2023

references #909

TODO:

  • Add a "padding" parameter in settings dialog.
  • Add "inset" to "padding" values.
  • Initialize dialog fields. (should be 0)
  • Make dialog strings translatable.
  • Save value(s) in settings.

@antis81
Copy link
Author

antis81 commented Sep 28, 2023

FYI: Due to these lines setting the padding on the "outer" QFrame behaves like what is described as "inset" in the QtQuick::Control documentation linked above. Taking this little - important - detail into account and setting the padding on the "inner" QFrame the behavior is exactly as expected and the panel contents start to "shrink"… 🎉

@antis81 antis81 marked this pull request as ready for review September 28, 2023 16:23
@antis81
Copy link
Author

antis81 commented Jun 23, 2024

@stefonarch Functionality is complete. From what I remember giving negative numbers allows for "floating" panels in LXQt (similar to KDE's panel). It adds a little bit flexibility for customization. Please let me know if and what you need for translations. Initialization I don't know if that is even required and I don't have the time to build and test this.

@stefonarch
Copy link
Member

stefonarch commented Jun 24, 2024

Padding works. It's results are similar to "icon size" and other configurations in the final result.

panel2.mp4

The worldclock plugin goes out of panel instead:

immagine

From what I remember giving negative numbers allows for "floating" panels in LXQt (similar to KDE's panel).

Not really: Negative pixel value sets the panel length to that many pixels less than available screen space. A floating panel would be (is) a big source of bugs.

@antis81
Copy link
Author

antis81 commented Jun 24, 2024

To make this fully work, the font (px) size has to be relative the plugin's (icon)…

  • …height for horizontal and…
  • …width for vertical panel positioning

This is independent from the padding itself and so I don't see it in this PR (requires touching all plugins).

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.

2 participants