Skip to content
Merged
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 @@ -289,7 +289,9 @@ private void prepareChildren() {
@Override
@SuppressWarnings("unchecked")
public @NotNull B mergeStyle(final @NotNull Component that, final @NotNull Set<Style.Merge> merges) {
this.styleBuilder().merge(requireNonNull(that, "component").style(), merges);
final Style thatStyle = requireNonNull(that, "that").style();
if (thatStyle.isEmpty() && merges.isEmpty()) return (B) this;
this.styleBuilder().merge(thatStyle, merges);
return (B) this;
}

Expand All @@ -313,6 +315,7 @@ private void prepareChildren() {
return this.styleBuilder;
}

@SuppressWarnings("BooleanMethodIsAlwaysInverted")
protected final boolean hasStyle() {
return this.styleBuilder != null || this.style != null;
}
Expand Down