Layout/divider bug

Hi Beni,

long time no hear, but i was really busy lately.

I’ve just tried the new versions of DF and found some bugs. Currently, I’m using the preview 7a of
version 1.1.1. (, i just wanted to update to the latest version, but there seems to be some layout problems.

I’ve attached a little test application where you can see the problems.

So, what is wrong (it happens in all themes, I’ve tried it with Eclipse and the default one):
[ol]
[li]In the test app, I can’t move the divider between the two “columns”, the mouse cursor doesn’t change and there is no reaction if I drag the mouse
[/li][li]The upper right view is way too small, seems to be a problem with min or max size.
[/li]It also seems that the minimum size of stacked dockables is not taken into account if i resize them
[/ol]

If you comment out all lines in the initialize method in CTestView, there are no problems anymore.

I’ve observed this behavoir also with other layout managers than GridBag in our applications.

Is there something I’m missing?

I’ve also sometimes the problem, that I can’t change between stacked dockables, but this is not really reproduceable. I’ll check if I can reproduce it somehow.

Could you please have a look on the problems? Thanks

Greetz,
Thomas

Hi Thomas

  1. was because of the right dockable needing more space than the initial layout gave it, the divider was in reality a bit more to the right. The MouseListener now takes the correct value for the divider, so this is fixed.

  2. It’s a feature, not a bug :stuck_out_tongue:
    There are issues if the StackDockStation calculates the minimum size, and there are issues if it does not. There is no „correct“ solution for this issue. But you can change the behavior of the StackDockStation:

			public void dockStationRegistering( DockController controller, DockStation station ){
				if( station instanceof StackDockStation ){
					((StackDockStation)station).setSmallMinimumSize( false );
				}
			}
		} );```
This will tell all StackDockStations to return their "correct" minimum size, as in "the maximum minimum size of any child". (unfortunately there is not yet a property-key for setting this boolean).

I'll upload a fixed version for 1. later this day.

I hope the thing that kept your busy was fun :wink: I do have a new job, so in the next few weeks I’m going to be busy as well. Don’t expect me to answer to any mails of forum posts during the day.

You can try out this new version, this solves issue 1. And you can solve issue 2 with the code from my first answer.

Hi Beni,

i’ve tried the new version, works like charm :slight_smile:
I could also fix the second problem with your solution, thanks.

Congrats to your new job, hope you will have a lot of fun and interessting projects in the future :slight_smile:

CU,
Thomas