diff --git a/src/pomodouroboros/macos/progress_hud.py b/src/pomodouroboros/macos/progress_hud.py index fb60dd2..8bafdfd 100644 --- a/src/pomodouroboros/macos/progress_hud.py +++ b/src/pomodouroboros/macos/progress_hud.py @@ -100,6 +100,8 @@ class AbstractProgressView(NSView): _bonusPercentage2: float = 0.0 _leftColor = NSColor.greenColor() _rightColor = NSColor.redColor() + _bonus1Color: NSColor = NSColor.blueColor() + _bonus2Color: NSColor = NSColor.yellowColor() _alphaValue: float = 1 / 4 _textAlpha: float = 0.0 @@ -625,11 +627,11 @@ def drawRect_(self, dirtyRect: NSRect) -> None: self._alphaValue ) - bonus1Color = NSColor.blueColor().colorWithAlphaComponent_( - self._alphaValue + bonus1Color = self._bonus1Color.colorWithAlphaComponent_( + self._alphaValue + 0.2 ) - bonus2Color = NSColor.yellowColor().colorWithAlphaComponent_( - self._alphaValue + bonus2Color = self._bonus2Color.colorWithAlphaComponent_( + self._alphaValue + 0.2 ) super().drawRect_(dirtyRect) @@ -649,25 +651,19 @@ def drawRect_(self, dirtyRect: NSRect) -> None: leftArc = maker.makeArc(endDegrees, startDegrees) rightArc = maker.makeArc(startDegrees, endDegrees) - bonusMaker = ArcMaker(center, radius * 1.1) + bonusMaker = ArcMaker(center, radius * 1.05) bonus1start = pct2deg(self._bonusPercentage1) - bonus2start = pct2deg(self._bonusPercentage2) + bonus2start = pct2deg(self._bonusPercentage2 + self._bonusPercentage1) - bonus1Arc = maker.makeArc(endDegrees, bonus1start) - bonus2Arc = maker.makeArc(bonus1start, bonus2start + bonus1start) + bonus1Arc = bonusMaker.makeArc(endDegrees, bonus1start) + bonus2Arc = bonusMaker.makeArc(bonus1start, bonus2start) leftWithAlpha.setFill() leftArc.fill() rightWithAlpha.setFill() rightArc.fill() - bonus1Color.setFill() - bonus1Arc.fill() - - bonus2Color.setFill() - bonus2Arc.fill() - lineAlpha = (self._alphaValue - DEFAULT_BASE_ALPHA) * 4 if lineAlpha > 0: @@ -685,6 +681,12 @@ def drawRect_(self, dirtyRect: NSRect) -> None: center, self._reticleText, self._textAlpha, self._leftColor ) + bonus1Color.setFill() + bonus1Arc.fill() + + bonus2Color.setFill() + bonus2Arc.fill() + def _removeWindows(self: ProgressController) -> None: """