Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
db0703b2
Commit
db0703b2
authored
Oct 01, 1998
by
Barry Warsaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a nice divider
parent
856bb7e0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
4 deletions
+14
-4
Tools/pynche/ChipViewer.py
Tools/pynche/ChipViewer.py
+7
-2
Tools/pynche/StripViewer.py
Tools/pynche/StripViewer.py
+7
-2
No files found.
Tools/pynche/ChipViewer.py
View file @
db0703b2
...
...
@@ -52,8 +52,8 @@ class ChipWidget:
class
ChipViewer
:
def
__init__
(
self
,
switchboard
,
parent
=
None
):
self
.
__sb
=
switchboard
self
.
__frame
=
Frame
(
parent
,
relief
=
GROOVE
,
borderwidth
=
2
)
self
.
__frame
.
pack
(
)
self
.
__frame
=
Frame
(
parent
)
#
, relief=GROOVE, borderwidth=2)
self
.
__frame
.
grid
(
row
=
3
,
column
=
0
)
# create the chip that will display the currently selected color
# exactly
self
.
__sframe
=
Frame
(
self
.
__frame
)
...
...
@@ -66,6 +66,11 @@ class ChipViewer:
self
.
__nearest
=
ChipWidget
(
self
.
__nframe
,
text
=
'Nearest'
,
presscmd
=
self
.
__buttonpress
,
releasecmd
=
self
.
__buttonrelease
)
self
.
__div
=
Frame
(
self
.
__frame
,
width
=
2
,
borderwidth
=
2
,
relief
=
RAISED
)
self
.
__div
.
grid
(
row
=
0
,
column
=
2
,
sticky
=
'NS'
,
padx
=
5
)
def
update_yourself
(
self
,
red
,
green
,
blue
):
# TBD: should exactname default to X11 color name if their is an exact
...
...
Tools/pynche/StripViewer.py
View file @
db0703b2
...
...
@@ -265,8 +265,8 @@ class StripViewer:
def
__init__
(
self
,
switchboard
,
parent
=
None
):
self
.
__sb
=
switchboard
# create a frame inside the parent
self
.
__frame
=
Frame
(
parent
,
relief
=
GROOVE
,
borderwidth
=
2
)
self
.
__frame
.
pack
(
)
self
.
__frame
=
Frame
(
parent
)
#
, relief=GROOVE, borderwidth=2)
self
.
__frame
.
grid
(
row
=
1
,
column
=
0
,
columnspan
=
2
,
sticky
=
'EW'
)
uwd
=
BooleanVar
()
self
.
__reds
=
StripWidget
(
switchboard
,
self
.
__frame
,
generator
=
constant_cyan_generator
,
...
...
@@ -289,6 +289,11 @@ class StripViewer:
text
=
'Update while dragging'
,
variable
=
uwd
)
self
.
__uwd
.
pack
()
self
.
__div
=
Frame
(
self
.
__frame
,
height
=
2
,
borderwidth
=
2
,
relief
=
RAISED
)
self
.
__div
.
pack
(
expand
=
1
,
fill
=
X
)
def
update_yourself
(
self
,
red
,
green
,
blue
):
self
.
__reds
.
update_yourself
(
red
,
green
,
blue
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment