! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Panel length is not accurate on some resolutions
Status:
RESOLVED: MOVED
Product:
Xfce4-panel

Comments

Description Danilo Azevedo 2017-11-07 17:05:11 CET
Created attachment 7422 
Demonstration of the issue

I have a monitor with screen resolution of 1366 x 768 and if I set the length of the panel to a percentage that results in a not interger number, the length of the panel won't be the expected.

Example:

Something I'm very used to do is to create 3 panels to have a center-aligned clock. If I do this on a 1600x900 resolution monitor, I get the expected result:
Panel 0: 33% (528px)
Panel 1: 34% (544px)
Panel 2: 33% (528px)
Total: 100% (1600px)

But if I do the same thing on a 1366x768 resolution monitor, the final values won't match:
Panel 0: 33% (450.78px, 450 is used)
Panel 1: 34% (464.44px, 464 is used)
Panel 2: 33% (450.78px, 450 is used)
Total: 100% (should be 1366, instead is 1064)

This results in some blank spots, as can be seen in the attached image.

One thing that can be done is to let the the user to set de length in pixels, instead of percentage, as sugested in bug #11093.
Comment 1 Danilo Azevedo 2017-11-07 17:10:10 CET
Typo: The result in the second example is 1364, instead of 1064.
Comment 2 Simon Steinbeiss editbugs 2017-11-11 00:53:00 CET
These are simple rounding issues and I'm not sure what the elegant way of solving this would be. I don't think switching to pixel values is particularly user-friendly.

Why not make the center panel a bit wider and overlap the other two?
Comment 3 Danilo Azevedo 2017-11-11 01:17:34 CET
(In reply to Simon Steinbeiss from comment #2)
> I don't think switching to pixel values is particularly user-friendly.
I woldn't say "switch". Isn't it possible to have the two options? Keep the percentage as default and add the option to set width in pixels?

> Why not make the center panel a bit wider and overlap the other two?
Yes, I tried this approach, but if there's some transparency in the panels, the center panel appears in the background of two side panels.
Comment 4 Git Bot editbugs 2020-05-28 02:04:33 CEST
-- GitLab Migration Automatic Message --

This bug has been migrated to xfce.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.xfce.org/xfce/xfce4-panel/-/issues/181.

Please create an account or use an existing account on one of our supported OAuth providers. 

If you want to fork to submit patches and merge requests please continue reading here: https://docs.xfce.org/contribute/dev/git/start#gitlab_forks_and_merge_requests

Also feel free to reach out to us on the mailing list https://mail.xfce.org/mailman/listinfo/xfce4-dev

Bug #13982

Reported by:
Danilo Azevedo
Reported on: 2017-11-07
Last modified on: 2020-05-28

People

Assignee:
Nick Schermer
CC List:
1 user

Version

Version:
4.12.1

Attachments

Demonstration of the issue (10.63 KB, image/png)
2017-11-07 17:05 CET , Danilo Azevedo
no flags

Additional information