Summary: | Layout in ledger view much too wide | ||
---|---|---|---|
Product: | [Applications] kmymoney | Reporter: | Frank Steinmetzger <dev+kde> |
Component: | general | Assignee: | KMyMoney Devel Mailing List <kmymoney-devel> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | agander93, hermanj04, onet.cristian, ostroffjh |
Priority: | NOR | ||
Version: | 4.6.2 | ||
Target Milestone: | --- | ||
Platform: | Gentoo Packages | ||
OS: | Linux | ||
Latest Commit: | http://commits.kde.org/kmymoney/c93bfa3c47d1db4c43ba3da33d693e81613295fd | Version Fixed In: | |
Sentry Crash Report: | |||
Attachments: |
Screenshot of ledger (actually a combination of two separate shots). The window cannot be resized to anything thinner.
Account selector which seems to cause the width problem. Same problem in Krusader Screenshot of ledger view at minimum possible size with Sans Serif font |
(In reply to comment #0) > Something is making the ledger view ultra-wide. When I first start KMyMoney, > I can reduce the window's width to 255 pixel. But as soon as I switched to > ledger view, the window expands to 1817 pixels and can't be made any > slimmer. This is really strange. Could you provide more information about your setup: system, kmymoney version and it's source (package or compiled from sources)? > This makes entering new transactions very impractical for me (I > have a 1400x1050 screen, so I have to move the window around to reach the > various input controls) that I haven't used the program regularly for almost > a year now, always hoping that something this obvious would be fixed soon. Believe me, if this problem would be so obvious it would have been fixed by now. I never seen it happen. > With the recent release of 4.6.2 and the fact that it didn't fix this > finally convinced me to file a bug for it. That was the right choice. > Thanks for your time. Now to get more information about what is causing this bug. Looking at the screenshot I suspect that the unusually large width is caused by the account selector combo. Do you, by any chance, use a very deep account hierarchy? Or do you have very long account names? Can you reproduce this behavior with a new kmymoney file? You can try this sample test file http://kmymoney2.sourceforge.net/SampleKMyMoneyDataFile.kmy If you save the file as anonymous is this still happening? Created attachment 69575 [details]
Account selector which seems to cause the width problem.
Thanks for the quick response, I'm willing to give you any info you need in order to fix it.
Yes, it is also happening with the sample file provided. It *must* be the account selector, for I also encounter the thing on the Investments and on the Recipients page. Both of which contain one. Also, if you look at the attached screenshot, you see why. I moved the window half way out of the screen to the right and then opened the selector. The drop down appears much more to the left than where the widget starts. For some reason it wants this much space.
I'm running 4.6.2 on KDE 4.8, compiled from source through the Gentoo package manager, source file md5 is 5659706cbe85416cbabfa000a29b19b5. I also tried the Oxygen style, because I'm using QtCurve as my default style, and it shows the same behavior.
(In reply to comment #2) > Created attachment 69575 [details] > Account selector which seems to cause the width problem. > > Thanks for the quick response, I'm willing to give you any info you need in > order to fix it. > Yes, it is also happening with the sample file provided. It *must* be the > account selector, for I also encounter the thing on the Investments and on > the Recipients page. Both of which contain one. Also, if you look at the > attached screenshot, you see why. I moved the window half way out of the > screen to the right and then opened the selector. The drop down appears much > more to the left than where the widget starts. For some reason it wants this > much space. From this I conclude that you don't have an unusually deep account hierarchy or account names. > > I'm running 4.6.2 on KDE 4.8, compiled from source through the Gentoo > package manager, source file md5 is 5659706cbe85416cbabfa000a29b19b5. I also > tried the Oxygen style, because I'm using QtCurve as my default style, and > it shows the same behavior. I'm running the same setup and I don't see this behavior so there must be something else causing this. You could try the following: 1. Run KMyMoney as another user which has the default UI settings so we can tel that this is somehow style/user interface related. 2. Since I'm lucky that your a Gentoo user I can ask you to try some patches that could change the behavior that you are observing for this: (In reply to comment #2) > Created attachment 69575 [details] > Account selector which seems to cause the width problem. > > Thanks for the quick response, I'm willing to give you any info you need in > order to fix it. > Yes, it is also happening with the sample file provided. It *must* be the > account selector, for I also encounter the thing on the Investments and on > the Recipients page. Both of which contain one. Also, if you look at the > attached screenshot, you see why. I moved the window half way out of the > screen to the right and then opened the selector. The drop down appears much > more to the left than where the widget starts. For some reason it wants this > much space. From this I conclude that you don't have an unusually deep account hierarchy or account names. > > I'm running 4.6.2 on KDE 4.8, compiled from source through the Gentoo > package manager, source file md5 is 5659706cbe85416cbabfa000a29b19b5. I also > tried the Oxygen style, because I'm using QtCurve as my default style, and > it shows the same behavior. I'm running the same setup and I don't see this behavior so there must be something else causing this. You could try the following: 1. Run KMyMoney as another user which has the default UI settings so we can tell if this is somehow style/user interface related. 2. Since I'm lucky that you are a Gentoo user I can ask you to try some patches that could change the behavior that you are observing: a. try removing https://projects.kde.org/projects/extragear/office/kmymoney/repository/revisions/master/entry/kmymoney/widgets/kmymoneyaccountcombo.cpp#L89 lines 89-90 b. try removing line 194 https://projects.kde.org/projects/extragear/office/kmymoney/repository/revisions/master/entry/kmymoney/views/kgloballedgerview.cpp#L194 Fell free to try only one of the above suggestions. Sorry that we have to do it this way but since you are the lucky one experiencing this issue I hope to get your feedback. I've had some problems submitting the comments so please ignore comment 3. I tried both deletions in every combination -- no effect. *But* when I tried it with the guest user I have set up on my system, the problem does not occur, so it seems to be something in my setup. :-/ (In reply to comment #6) > I tried both deletions in every combination -- no effect. *But* when I tried > it with the guest user I have set up on my system, the problem does not > occur, so it seems to be something in my setup. :-/ I guess then that this is caused by a style or UI setting. Could you try to change the style/windows decorations and see which exactly is causing the problem. I know youve tried oxygen but there must be something that's causing this problem and if I could reproduce it I could fix it. I tried almost all styles -- CDE, GTK-Style, Plastik, they all showed the same result. When run as the guest user, either from a guest login or via kdesu, the issue doesn't occur. But it does when started as my own user either from my own session or via kdesu from a guest session. I don't really know what to look for now. The only thing that comes to mind right now is to do a newton approach and find out which KDE config file is responsible, which is a lengthy process. -- set up config files, login, start and close KMyMoney, log out, rinse and repeat. I'd start with kmymoneyrc before digging into general KDE config stuff. In my case (also Gentoo) it's in .kde4/share/config/kmymoneyrc. Rename it to something else and retry KMM (no need to log in/out) You can also then compare the KDE config files between your own user and your new guest user - that might narrow down the search at least somewhat. I already tried a run with a blank kmymoneyrc and the sample file provided earlier. The KDE settings between my account and the (practically unused) guest account are very extensive, I guess I'll be quicker if I just start with an empty kde config dir and always add half of the remaining files back with each iteration. That *could* lead me to the culprit, as long as it is the sole cause, and doesn't act in combination with other files. Created attachment 69853 [details]
Same problem in Krusader
I haven't gotten around to doing anything about this since my last post, but yesterday I discovered the very same issue in one of Krusader's dialogues (which can be reached in Krusader’s settings, “Archives” page, “Automatic detection” button). So it’s not KMyMoneys fault alone. :-)
You will not believe what I just found out... I finally took the time to bisect my .kde/share/config dir (took me several hours altogether). In the end it turned out that setting the “General” KDE font to Linux Libertine/Linux Biolinum was the cause for this problem. I set it back to Sans Serif and now the Ledger stays at its size. The same goes for the mentioned Krusader window. So.... should this be re-assigned to something within KDE? Or is it maybe even a Qt bug? Git commit b7993aeaf9184345310527ae8e5acd3237dfe3e7 by Cristian Oneț. Committed on 12/05/2012 at 14:42. Pushed by conet into branch 'master'. Use a safer way to set the minimum width of the account combo. Using QFontMetrics::maxWidth() was a bad idea because some fonts could contain really wide characters (with a very low probability of appearing in the account names) - see the bug that is fixed. Instead of the width of the widest character in the font use the width of the 'W' character which will produce a much more predictable result. Even the Qt implementation uses the width of a know character ('x') to compute a kind of minimum size. M +2 -6 kmymoney/widgets/kmymoneyaccountcombo.cpp M +2 -3 kmymoney/widgets/kmymoneycompletion.cpp http://commits.kde.org/kmymoney/b7993aeaf9184345310527ae8e5acd3237dfe3e7 Git commit c93bfa3c47d1db4c43ba3da33d693e81613295fd by Cristian Oneț. Committed on 12/05/2012 at 14:42. Pushed by conet into branch '4.6'. Use a safer way to set the minimum width of the account combo. Using QFontMetrics::maxWidth() was a bad idea because some fonts could contain really wide characters (with a very low probability of appearing in the account names) - see the bug that is fixed. Instead of the width of the widest character in the font use the width of the 'W' character which will produce a much more predictable result. Even the Qt implementation uses the width of a know character ('x') to compute a kind of minimum size. (cherry picked from commit b7993aeaf9184345310527ae8e5acd3237dfe3e7) M +2 -6 kmymoney/widgets/kmymoneyaccountcombo.cpp M +2 -3 kmymoney/widgets/kmymoneycompletion.cpp http://commits.kde.org/kmymoney/c93bfa3c47d1db4c43ba3da33d693e81613295fd Thanks for your perseverance to track down the source of this problem. It really was a problem in KMyMoney (you can tell what was the problem by looking at the patch). So you can go back to using your favorite font if you apply this patch (which should not be that hard if you are a Gentoo user). Thanks again for your contribution :) Created attachment 71042 [details]
Screenshot of ledger view at minimum possible size with Sans Serif font
Thanks back for your quick response. I applied the patch to 4.6.2, it did do something, but unfortunately not enough. :-/
In my original post, the window was expanded to 1817 pixels, now it is at 1695.
How can it be *that* much more in width? It may seem a stupid question, but what does width(QLatin1Char('W')) actually return? Not only for the Linux* fonts, but also for the default Sans Serif. I mention the latter, too, because this new screenie shows the Ledger view at its minimum size using Sans serif. Clearly, the selector still uses too much space. I superimposed 15 W characters of both Sans serif and Linux Biolinum (which is a screenshot from KWrite, to rule out Gimp's own font rendering). Linux Biolinum's W is actually a bit thinner than Sans Serif (which is one reason why I chose this font in the first place -- it fits more on the same screen area).
(In reply to comment #16) > Created attachment 71042 [details] > Screenshot of ledger view at minimum possible size with Sans Serif font > > Thanks back for your quick response. I applied the patch to 4.6.2, it did do > something, but unfortunately not enough. :-/ > In my original post, the window was expanded to 1817 pixels, now it is at > 1695. Could you check what happens if you remove the setMinimumSize statement? My experience with the font used by you was that without the patch the application was very wide (around 1400px) but with the patch the minimum width was reduced to around 800px. > How can it be *that* much more in width? It may seem a stupid question, but > what does width(QLatin1Char('W')) actually return? Not only for the Linux* > fonts, but also for the default Sans Serif. I mention the latter, too, > because this new screenie shows the Ledger view at its minimum size using > Sans serif. Clearly, the selector still uses too much space. I superimposed > 15 W characters of both Sans serif and Linux Biolinum (which is a screenshot > from KWrite, to rule out Gimp's own font rendering). Linux Biolinum's W is > actually a bit thinner than Sans Serif (which is one reason why I chose this > font in the first place -- it fits more on the same screen area). I wouldn't be sure that the minimum size of the ledger in the screen shot is given by the account selector. Maybe it's given by some other widget and since the account selector has a larger stretch factor it's larger then it's minimum size. It's many years since I looked in a font file, but I seem to remember that that it contains many parameters other than character width: inter-character spacing and kerning spring to mind. This may be something you are already aware of, but I've only just found out, and I don't know if it may help, but you might try it if you haven't already. Drag the KMM window more than halfway off screen to the side. This automatically resizes to half width and half height. *** Bug 304215 has been marked as a duplicate of this bug. *** |
Created attachment 69560 [details] Screenshot of ledger (actually a combination of two separate shots). The window cannot be resized to anything thinner. Something is making the ledger view ultra-wide. When I first start KMyMoney, I can reduce the window's width to 255 pixel. But as soon as I switched to ledger view, the window expands to 1817 pixels and can't be made any slimmer. This makes entering new transactions very impractical for me (I have a 1400x1050 screen, so I have to move the window around to reach the various input controls) that I haven't used the program regularly for almost a year now, always hoping that something this obvious would be fixed soon. With the recent release of 4.6.2 and the fact that it didn't fix this finally convinced me to file a bug for it. Thanks for your time.