I have 2 issues and I created a small testcase where I could reproduce what is happening.
Attachment:
buttonsizetest.zip [22.12 KiB]
Downloaded 11 times
In the testcase, I'm trying to add a button that is too big for the scrollpane.
The first issue is:
If I do not add a Resizableframe, the button will have its size adjusted to smallest possible.
If the
titleAreaBottom param is exactly 4(as in resizableframe theme), the button will also be adjusted.
The second one is, assuming we apply
resizableframeTEST and the button has the correct size (200x50):
When I'm hovering the button, and move the mouse outside the scrollpane on the RIGHT side(where the button is cut off), the button does not change hover-state. As soon as I enter the scrollpane again, the button will receive its MOUSE_EXITED event and toggle state.
As far as I've seen, the widget will not receive MOUSE_EXITED on any of the sides if the scrollpane is not scrolled to the far edge of where the mouse is exiting.
Code:
public ButtonSizeTest() {
frame = new ResizableFrame();
// frame.setTheme("resizableframe");
frame.setTheme("resizableframeTEST");
add(frame);
button = new Button("Button");
scrollPane = new ScrollPane(button);
add(scrollPane);
}
@Override
protected void layout() {
button.setSize(200, 50);
scrollPane.setSize(100, 100);
scrollPane.setPosition(10, 50);
}
Code:
<theme name="resizableframe" ref="resizableframe-title" allowWildcard="true">
<param name="background"><image>-borderA</image></param>
<param name="border"><border>background.border</border></param>
<param name="hasCloseButton"><bool>false</bool></param>
<param name="titleAreaBottom"><int>4</int></param>
</theme>
<theme name="resizableframeTEST" ref="resizableframe-title">
<param name="titleAreaBottom"><int>3</int></param>
</theme>