[Kmymoney-devel] Review Request 112989: Improve the resizing of the register and the transaction form.

Allan Anderson agander93 at gmail.com
Sun Oct 13 11:14:25 UTC 2013



> On Oct. 11, 2013, 11:53 a.m., Allan Anderson wrote:
> > Can you hold for a little while, please.  I think I've found a problem.
> 
> Allan Anderson wrote:
>     I think the problem with the column widths is to do with the extra space that is needed when a transaction is opened for editing.  That extra space is being retained, resulting in the column widths being unnecessarily wide when not being edited.
>     
>     The column width is controlled by 'if (m_usedWithEditor && !KMyMoneyGlobalSettings::transactionForm())' at line 1149 in
>     void Register::resize(int col, bool force).
>     
>     m_usedWithEditor is enabled on line 204 in KGlobalLedgerView::KGlobalLedgerView(QWidget *parent, const char *name) and then seems to stay that way.  I've patched it instead to be enabled in TransactionEditor* KGlobalLedgerView::startEdit(const KMyMoneyRegister::SelectedTransactions& list) and reset in void KGlobalLedgerView::slotLeaveEditMode(const KMyMoneyRegister::SelectedTransactions& list).
>     
>     This allows the columns to shrink when not editing.  It is how I controlled it in my earlier patches.

Yes, the problem I saw was that initially the column widths were too wide because space had been created for the edit buttons before a transaction had been opened for editing, because m_usedWithEditor was being enabled in KGlobalLedgerView ctor. I've changed this so m_usedWithEditor is enabled in KGlobalLedgerView::startEdit() and reset in KGlobalLedgerView::slotLeaveEditMode().

After this, there was a further problem as, after a transaction had been opened for editing and the column widths increased for the buttons, when the transaction was closed, there was no final resizing to shrink the columns to normal size.  I've patched this by adding the variable bool m_resizing to allow this final resize to take place.

I can't see any way for me to add a new patch to your review so I'll add it to the bug.


- Allan


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/112989/#review41555
-----------------------------------------------------------


On Sept. 29, 2013, 11:37 a.m., Cristian Oneț wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/112989/
> -----------------------------------------------------------
> 
> (Updated Sept. 29, 2013, 11:37 a.m.)
> 
> 
> Review request for KMymoney.
> 
> 
> Bugs: 312816
>     http://bugs.kde.org/show_bug.cgi?id=312816
> 
> 
> Repository: kmymoney
> 
> 
> Description
> -------
> 
> Improve the resizing of the register and the transaction form.
> 
> The transaction form was not correctly resizing the Value2 column
> when the data of the KMyMoneyEdit exceeded the size of the widget.
> The size of the push button (when present) was not considered when
> the width was computed based on the cell text.
> 
> The same issues were fixed when for the inline transaction editor.
> 
> The register resizing was improved in the following ways:
> - the number fields is no longer limited
> - the details column can no longer be shrinked to a size smaller then
> it's needed to render the data it contains
> 
> BUG: 312816
> 
> 
> Diffs
> -----
> 
>   kmymoney/widgets/kmymoneydateinput.cpp 856efaa9ddffcec7440cf3530349568d2c789333 
>   kmymoney/widgets/register.h 50ce7598783b49197de6acf4859a0fbd7c5c8962 
>   kmymoney/widgets/register.cpp d5dd63951d35b7098c0797fe64f10baf07a77fe1 
>   kmymoney/widgets/transactionform.cpp 642e98f97eb98a14676186c296c1b27972f195cd 
> 
> Diff: http://git.reviewboard.kde.org/r/112989/diff/
> 
> 
> Testing
> -------
> 
> Ledger resize with/without the transaction form with multiple account types.
> 
> 
> Thanks,
> 
> Cristian Oneț
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kmymoney-devel/attachments/20131013/ac15400f/attachment.html>


More information about the KMyMoney-devel mailing list