diff options
author | Sven Gothel <[email protected]> | 2023-04-28 12:43:36 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2023-04-28 12:43:36 +0200 |
commit | 3ddcde7f2fd21e0a418f756519e42ee190ede07e (patch) | |
tree | 1d391e44b9e5a9d4ef3d3da80069c01101febcb7 /src/graphui/classes/com/jogamp/graph/ui/shapes/ImageButton.java | |
parent | 87814f1c86b132a16ddf6822d05b83c3ed091fe2 (diff) |
GraphUI Colors: Use pure white modulation w/ color-channel on no-action for original color, adjust defaults accordingly
Diffstat (limited to 'src/graphui/classes/com/jogamp/graph/ui/shapes/ImageButton.java')
-rw-r--r-- | src/graphui/classes/com/jogamp/graph/ui/shapes/ImageButton.java | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/graphui/classes/com/jogamp/graph/ui/shapes/ImageButton.java b/src/graphui/classes/com/jogamp/graph/ui/shapes/ImageButton.java index 63b0b3eaf..cd919546d 100644 --- a/src/graphui/classes/com/jogamp/graph/ui/shapes/ImageButton.java +++ b/src/graphui/classes/com/jogamp/graph/ui/shapes/ImageButton.java @@ -41,16 +41,24 @@ import com.jogamp.opengl.util.texture.ImageSequence; * This button is rendered with a round oval shape. * To render it rectangular, {@link #setCorner(float)} to zero. * </p> + * <p> + * Default colors (toggle-off is full color): + * - non-toggle: 1 * color + * - pressed: 0.9 * color + * - toggle-off: 1.0 * color + * - toggle-on: 0.8 * color + * </p> */ public class ImageButton extends TexSeqButton { public ImageButton(final int renderModes, final float width, final float height, final ImageSequence texSeq) { super(renderModes, width, height, texSeq); - setColor(0.95f, 0.95f, 0.95f, 1.0f); - setPressedColorMod(1f, 1f, 1f, 0.9f); - setToggleOffColorMod(0.8f, 0.8f, 0.8f, 1.0f); - setToggleOnColorMod(1.0f, 1.0f, 1.0f, 1.0f); + + setColor(1f, 1f, 1f, 1.0f); + setPressedColorMod(0.9f, 0.9f, 0.9f, 0.9f); + setToggleOffColorMod(1f, 1f, 1f, 1f); + setToggleOnColorMod(0.8f, 0.8f, 0.8f, 1f); } public final void setCurrentIdx(final int idx) { |