-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: support wx * specify extra * fix try start * thinner track * add mouse events * warn on bad data * fixup * add fixme * add to test matrix * skip wx on ubuntu * fix wx test * style(pre-commit.ci): auto fixes [...] * remove condition * change any_app * add pytest-qt to dev * add wxpythong 3.9 * fix 3.9 * add windows jup 3.9 * remove test of range_slider * remove wx-signal * fix pygfx * style(pre-commit.ci): auto fixes [...] --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
- Loading branch information
1 parent
ca31223
commit 6c19a89
Showing
12 changed files
with
824 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import wx | ||
|
||
|
||
class WxLabeledSlider(wx.Panel): | ||
"""A simple labeled slider widget for wxPython.""" | ||
|
||
def __init__(self, parent: wx.Window) -> None: | ||
super().__init__(parent) | ||
|
||
self.label = wx.StaticText(self) | ||
self.slider = wx.Slider(self, style=wx.HORIZONTAL) | ||
|
||
sizer = wx.BoxSizer(wx.HORIZONTAL) | ||
sizer.Add(self.label, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 5) | ||
sizer.Add(self.slider, 1, wx.EXPAND) | ||
self.SetSizer(sizer) | ||
|
||
def setRange(self, min_val: int, max_val: int) -> None: | ||
self.slider.SetMin(min_val) | ||
self.slider.SetMax(max_val) | ||
|
||
def setValue(self, value: int) -> None: | ||
self.slider.SetValue(value) | ||
|
||
def value(self) -> int: | ||
return self.slider.GetValue() # type: ignore [no-any-return] | ||
|
||
def setSingleStep(self, step: int) -> None: | ||
self.slider.SetLineSize(step) |
Oops, something went wrong.