Skip to content

Commit

Permalink
Update QwtLinearColorMap.colorStops API to return list of ColorStop o…
Browse files Browse the repository at this point in the history
…bjects
  • Loading branch information
PierreRaybaut committed Feb 15, 2024
1 parent 3cc5755 commit 201c714
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
- Added an additional margin to the left of ticks labels: this margin is set to one
character width, to avoid the labels to be truncated while keeping a tight layout
- Slighly improved the new flat style (see V0.7.0) by selecting default fonts
- API breaking change: `QwtLinearColorMap.colorStops` now returns a list of `ColorStop`
objects instead of the list of stop values

## Version 0.11.2

Expand Down
4 changes: 2 additions & 2 deletions qwt/color_map.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
:members:
"""

from qtpy.QtGui import QColor, qRed, qGreen, qBlue, qRgb, qRgba, qAlpha
from qtpy.QtCore import Qt, qIsNaN
from qtpy.QtGui import QColor, qAlpha, qBlue, qGreen, qRed, qRgb, qRgba


class ColorStop(object):
Expand Down Expand Up @@ -92,7 +92,7 @@ def insert(self, pos, color):

def stops(self):
if self.__stops:
return [stop.pos for stop in self.__stops]
return [stop for stop in self.__stops]
else:
return []

Expand Down

0 comments on commit 201c714

Please sign in to comment.