Skip to content

Commit 7a14fe2

Browse files
committed
Added FlatBtn.setBackground
1 parent 900cad7 commit 7a14fe2

File tree

1 file changed

+6
-0
lines changed
  • durian-swt/src/main/java/com/diffplug/common/swt/widgets

1 file changed

+6
-0
lines changed

durian-swt/src/main/java/com/diffplug/common/swt/widgets/FlatBtn.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
package com.diffplug.common.swt.widgets;
1717

1818
import org.eclipse.swt.SWT;
19+
import org.eclipse.swt.graphics.Color;
1920
import org.eclipse.swt.graphics.Image;
2021
import org.eclipse.swt.widgets.Composite;
2122
import org.eclipse.swt.widgets.Listener;
@@ -76,4 +77,9 @@ public void setEnabled(boolean enabled) {
7677
public void setSelection(boolean selected) {
7778
item.setSelection(selected);
7879
}
80+
81+
/** Sets the background color of the button. */
82+
public void setBackground(Color color) {
83+
wrapped.setBackground(color);
84+
}
7985
}

0 commit comments

Comments
 (0)