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

Bug 798995 - Keystrokes ignored during ledger entry #1752

Merged
merged 1 commit into from
Sep 10, 2023

Conversation

Bob-IT
Copy link
Contributor

@Bob-IT Bob-IT commented Aug 18, 2023

Some themes add additional pixels to list rows and dialogs, in this case with 'TraditionalOK' 2 pixels are added to each entry in the list and 2 to the popup. This make the calculation for the pop up height wrong and so when compared to the allocation height it is different so tries to resolve by re-popping the list and this causes an endless loop.

To fix this, use the calculated height which works for Adwaita but if this is different to the popup allocation height use that.

I have tested this on the reported OS, Fedora38 with the reported 'TraditionalOK' theme and also on an Xfce VM with the 'Clearlooks-Phenix' theme. Also built and tested on Windows and all seems to be OK.

@bparees
Copy link

bparees commented Aug 18, 2023

can confirm, this appears to resolve the issue i was seeing when using TraditionalOk with Mate on Fedora38

thank you!

Some themes add additional pixels to list rows and dialogs, in this
case with 'TraditionalOK' 2 pixels are added to each entry in the
list and 2 to the popup. This make the calculation for the pop up
height wrong and so when compared to the allocation height it is
different so tries to resolve by re-poping the list and this
cuases an endless loop.

To fix this, use the calculated height which works for Adwaita but
if this is different to the popup allocation height use that.
@Bob-IT
Copy link
Contributor Author

Bob-IT commented Aug 19, 2023

I have added calculating the popup height to gnucash-item-list as the same calculation was being done in two places and added calling it from the else condition.

Is this partly to figure out how big a window to ask for or otherwise set height before the popup is realized and has an allocation?

The calculation of height is correct for Adwaita but for other themes it may be correct or an approximation. The height is used to decide on the placement of the popup which is based on the greater space above or below the current position. Setting the height is needed when the list is large to restrict the popup to the register size.

I am not sure I can see a better way but will have a think.

@ipilcher
Copy link

This also fixes the issue for me. (Seen with the Breeze theme under KDE/Plasma/X11.)

@code-gnucash-org code-gnucash-org merged commit fcd054a into Gnucash:stable Sep 10, 2023
3 checks passed
@jralls
Copy link
Member

jralls commented Sep 10, 2023

Thanks!

@Bob-IT Bob-IT deleted the bug798995 branch November 15, 2023 10:02
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.

5 participants