Re: [patch] fix bug #4430

2016-01-21 Thread Uwe Stöhr

Am 21.01.2016 um 05:56 schrieb Scott Kostyshak:


Thanks for the explanation.


To be honest, I learned that the last days via the Internet. So I hope I 
did not write wrong things.



My only hesitation is that I have seen weird platform-specific things
happen with .ui files. For example, this bug only happened on Mac:
http://www.lyx.org/trac/ticket/9889


Ignoring the size is bad if there is no surrounding layout that 
preserves a minimal size. Thus I think that my fix does not make 
problems on Mac. If it does, I'll revert it.


regards Uwe


Re: [patch] fix bug #4430

2016-01-20 Thread Scott Kostyshak
On Wed, Jan 20, 2016 at 07:32:52PM -0800, Pavel Sanda wrote:
> Uwe Stöhr wrote:
> > > Why are you confident that this will not cause #9084?
> >
> > Because that once appeared because the size of the outer layout was ignored 
> > AND the size of the QTextEdit was set to MinimumExpanding. Since the 
> > minimum was/is not set MinimumExpanding and because of ignoring the size 
> > for the outer layout the necessary height for the button block was ignored 
> > and one could go down to a minimal size of 0 px.
> 
> I quickly checked and #9084 did not reappear, so this patch has my +1
> even for 2.1 backporting.

In this case go ahead and commit for beta, Uwe. I will try to remember
to confirm with a Mac user that all is as expected.

Thanks for the nice fix. I hadn't even noticed that but indeed it makes
a significant difference.

Scott


signature.asc
Description: PGP signature


Re: [patch] fix bug #4430

2016-01-20 Thread Pavel Sanda
Uwe Stöhr wrote:
> > Why are you confident that this will not cause #9084?
>
> Because that once appeared because the size of the outer layout was ignored 
> AND the size of the QTextEdit was set to MinimumExpanding. Since the 
> minimum was/is not set MinimumExpanding and because of ignoring the size 
> for the outer layout the necessary height for the button block was ignored 
> and one could go down to a minimal size of 0 px.

I quickly checked and #9084 did not reappear, so this patch has my +1
even for 2.1 backporting.
P


Re: [patch] fix bug #4430

2016-01-20 Thread Scott Kostyshak
On Wed, Jan 20, 2016 at 11:46:28PM +0100, Uwe Stöhr wrote:
> Am 20.01.2016 um 06:07 schrieb Scott Kostyshak:
> 
> >The fix is similar to the fix that was tried before and that caused
> >#9084.
> 
> The fix is not similar.
> We have currently the following situation:
> A QTextEdit and a button block is grouped in a layout. All 3 elements have
> currently the preferred size. That means that the height of the button block
> is the preferred height of it and for the QTextEdit the preferred default
> size is 200 px. The outer layout therefore uses the 200 px as minimal
> (preferred) size. That is the reason why one cannot have a smaller height.
> 
> To overcome this regression, my patch ignores the 200 px height of the
> QTextEdit and not more. Therefore one can use less height than 200 px but
> not less height that is necessary for the button block since this block is
> not changed and the outer layout does still use the preferred size - which
> is then the size of the button block.

Thanks for the explanation.

> Just apply my patch and try to make the source code window smaller than the
> button block (which was once bug #9084) - this is not possible.

The patch works great for me. I like the improvement.

> > Why are you confident that this will not cause #9084?
> 
> Because that once appeared because the size of the outer layout was ignored
> AND the size of the QTextEdit was set to MinimumExpanding. Since the minimum
> was/is not set MinimumExpanding and because of ignoring the size for the
> outer layout the necessary height for the button block was ignored and one
> could go down to a minimal size of 0 px.

I see.

My only hesitation is that I have seen weird platform-specific things
happen with .ui files. For example, this bug only happened on Mac:
http://www.lyx.org/trac/ticket/9889

Stephan are you able to test this patch?

Scott


signature.asc
Description: PGP signature


Re: [patch] fix bug #4430

2016-01-20 Thread Uwe Stöhr

Am 20.01.2016 um 06:07 schrieb Scott Kostyshak:


The fix is similar to the fix that was tried before and that caused
#9084.


The fix is not similar.
We have currently the following situation:
A QTextEdit and a button block is grouped in a layout. All 3 elements 
have currently the preferred size. That means that the height of the 
button block is the preferred height of it and for the QTextEdit the 
preferred default size is 200 px. The outer layout therefore uses the 
200 px as minimal (preferred) size. That is the reason why one cannot 
have a smaller height.


To overcome this regression, my patch ignores the 200 px height of the 
QTextEdit and not more. Therefore one can use less height than 200 px 
but not less height that is necessary for the button block since this 
block is not changed and the outer layout does still use the preferred 
size - which is then the size of the button block.


Just apply my patch and try to make the source code window smaller than 
the button block (which was once bug #9084) - this is not possible.


> Why are you confident that this will not cause #9084?

Because that once appeared because the size of the outer layout was 
ignored AND the size of the QTextEdit was set to MinimumExpanding. Since 
the minimum was/is not set MinimumExpanding and because of ignoring the 
size for the outer layout the necessary height for the button block was 
ignored and one could go down to a minimal size of 0 px.


regards Uwe


Re: [patch] fix bug #4430

2016-01-19 Thread Scott Kostyshak
On Wed, Jan 20, 2016 at 01:49:01AM +0100, Uwe Stöhr wrote:
> The attached one liner fixes the longstanding regression bug
> http://www.lyx.org/trac/ticket/4430
> 
> OK to go in?

The fix is similar to the fix that was tried before and that caused
#9084. Why are you confident that this will not cause #9084?

Scott


signature.asc
Description: PGP signature