diff --git a/com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/swt/CopilotUsageBar.java b/com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/swt/CopilotUsageBar.java deleted file mode 100644 index 967f00cb..00000000 --- a/com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/swt/CopilotUsageBar.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. - -package com.microsoft.copilot.eclipse.ui.swt; - -import org.eclipse.swt.graphics.Color; -import org.eclipse.swt.widgets.Composite; - -/** - * A usage bar colored for Copilot quota display: - * - * The unused portion is rendered in gray (#DFE1E5). - */ -public class CopilotUsageBar extends AbstractUsageBar { - - private static final int THRESHOLD_WARNING = 75; - private static final int THRESHOLD_CRITICAL = 90; - - private Color colorActive; - private Color colorApproaching; - private Color colorExhausted; - private Color colorRemaining; - - /** - * Creates a new CopilotUsageBar. - * - * @param parent the parent composite - * @param style the SWT style bits - */ - public CopilotUsageBar(Composite parent, int style) { - super(parent, style); - colorActive = CssConstants.getUsageBarActiveColor(getDisplay()); - colorApproaching = CssConstants.getUsageBarApproachingColor(getDisplay()); - colorExhausted = CssConstants.getUsageBarExhaustedColor(getDisplay()); - colorRemaining = CssConstants.getUsageBarRemainingColor(getDisplay()); - } - - @Override - protected Color getTrackColor() { - return colorRemaining; - } - - @Override - protected Color getFillColor() { - if (getPercentage() >= THRESHOLD_CRITICAL) { - return colorExhausted; - } else if (getPercentage() >= THRESHOLD_WARNING) { - return colorApproaching; - } - return colorActive; - } -} diff --git a/com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/swt/CssConstants.java b/com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/swt/CssConstants.java index b8a6621c..6a3c7e4b 100644 --- a/com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/swt/CssConstants.java +++ b/com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/swt/CssConstants.java @@ -218,32 +218,4 @@ public static Color getDonutTrackColor(Display display) { return new Color(display, 223, 225, 229); // #DFE1E5 } - /** - * Returns the active (blue) fill color for the usage bar. - */ - public static Color getUsageBarActiveColor(Display display) { - return new Color(display, 53, 116, 240); - } - - /** - * Returns the approaching (yellow) fill color for the usage bar. - */ - public static Color getUsageBarApproachingColor(Display display) { - return new Color(display, 255, 184, 36); - } - - /** - * Returns the exhausted (red) fill color for the usage bar. - */ - public static Color getUsageBarExhaustedColor(Display display) { - return new Color(display, 224, 81, 81); - } - - /** - * Returns the remaining (gray) track color for the usage bar. - */ - public static Color getUsageBarRemainingColor(Display display) { - return new Color(display, 223, 225, 229); - } - }