Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,13 @@ public boolean equals(@Nullable Object o)
return false;
}
ScrollBarThumbLayoutConfiguration that = (ScrollBarThumbLayoutConfiguration) o;
return value == that.value;
return value == that.value && Float.compare(thumbExtent, that.thumbExtent) == 0;
}

@Override
public int hashCode()
{
return Objects.hash(super.hashCode(), value);
return Objects.hash(super.hashCode(), value, thumbExtent);
}

@Override
Expand Down
5 changes: 3 additions & 2 deletions src/org/violetlib/jnr/aqua/coreui/CoreUIPainter.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

import java.awt.geom.Rectangle2D;
import java.security.PrivilegedAction;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

Expand Down Expand Up @@ -778,11 +779,11 @@ STATE_KEY, toState(st),
PRESENTATION_STATE_KEY, toPresentationState(st),
USER_INTERFACE_LAYOUT_DIRECTION_KEY, toLayoutDirection(ld));
} else {
List<Object> parameters = Arrays.asList(WIDGET_KEY, widget,
List<Object> parameters = new ArrayList<>(Arrays.asList(WIDGET_KEY, widget,
SIZE_KEY, toSize(sz),
STATE_KEY, toState(st),
PRESENTATION_STATE_KEY, toPresentationState(st),
USER_INTERFACE_LAYOUT_DIRECTION_KEY, toLayoutDirection(ld));
USER_INTERFACE_LAYOUT_DIRECTION_KEY, toLayoutDirection(ld)));
parameters.addAll(extraParameters);
r = getRenderer(parameters.toArray());
}
Expand Down
2 changes: 1 addition & 1 deletion src/org/violetlib/jnr/aqua/impl/LayoutInfo_11.java
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ public LayoutInfo_11()
public @NotNull Insetter getPopupButtonContentInsets(@NotNull PopupButtonLayoutConfiguration g)
{
PopupButtonWidget bw = g.getPopupButtonWidget();
if (bw == BUTTON_POP_UP || bw == BUTTON_POP_DOWN | bw == BUTTON_POP_UP_TEXTURED | bw == BUTTON_POP_DOWN_TEXTURED) {
if (bw == BUTTON_POP_UP || bw == BUTTON_POP_DOWN || bw == BUTTON_POP_UP_TEXTURED || bw == BUTTON_POP_DOWN_TEXTURED) {
Size sz = g.getSize();
float top = 1;
float bottom = 1;
Expand Down
2 changes: 1 addition & 1 deletion src/org/violetlib/jnr/impl/JNRUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ public static boolean describeRaster(@NotNull int[] buffer, int rw, int rh)
}
if (opaquePixelCount > 0) {
int percent = Math.round(opaquePixelCount * 100f / pixelCount);
s += " " + transparentPixelCount + " opaque pixels (" + percent + "%)";
s += " " + opaquePixelCount + " opaque pixels (" + percent + "%)";
}
if (maximumAlpha > 0) {
s += " maximum alpha: " + maximumAlpha + " at " + maximumAlphaCol + ", " + maximumAlphaRow;
Expand Down