Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
b55c4ad5
Kaydet (Commit)
b55c4ad5
authored
Eki 02, 1998
tarafından
Barry Warsaw
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Got click on working. Dragging is disabled for now
üst
ff45d54f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
35 deletions
+17
-35
ListViewer.py
Tools/pynche/ListViewer.py
+17
-35
No files found.
Tools/pynche/ListViewer.py
Dosyayı görüntüle @
b55c4ad5
...
...
@@ -46,7 +46,6 @@ class ListViewer:
outline
=
''
,
tags
=
(
exactcolor
,))
canvas
.
bind
(
'<ButtonRelease>'
,
self
.
__onrelease
)
canvas
.
bind
(
'<Motion>'
,
self
.
__onmotion
)
bboxes
.
append
(
boxid
)
if
textend
+
3
>
widest
:
widest
=
textend
+
3
...
...
@@ -56,16 +55,8 @@ class ListViewer:
for
box
in
bboxes
:
x1
,
y1
,
x2
,
y2
=
canvas
.
coords
(
box
)
canvas
.
coords
(
box
,
x1
,
y1
,
widest
,
y2
)
#
# Update while dragging?
#
self
.
__uwd
=
BooleanVar
()
self
.
__uwdbtn
=
Checkbutton
(
root
,
text
=
'Update while dragging'
,
variable
=
self
.
__uwd
)
self
.
__uwdbtn
.
pack
()
def
__on
motion
(
self
,
event
=
None
):
def
__on
release
(
self
,
event
=
None
):
canvas
=
self
.
__canvas
# find the current box
x
=
canvas
.
canvasx
(
event
.
x
)
...
...
@@ -77,30 +68,15 @@ class ListViewer:
else
:
## print 'No box found!'
return
if
self
.
__uwd
.
get
():
self
.
__onrelease
(
event
)
tags
=
self
.
__canvas
.
gettags
(
boxid
)
for
t
in
tags
:
if
t
[
0
]
==
'#'
:
break
else
:
self
.
__selectbox
(
boxid
)
def
__selectbox
(
self
,
boxid
):
canvas
=
self
.
__canvas
# turn off the last box
if
self
.
__lastbox
:
canvas
.
itemconfigure
(
self
.
__lastbox
,
outline
=
''
)
self
.
__lastbox
=
boxid
canvas
.
itemconfigure
(
boxid
,
outline
=
'black'
)
def
__onrelease
(
self
,
event
=
None
):
if
self
.
__lastbox
:
tags
=
self
.
__canvas
.
gettags
(
self
.
__lastbox
)
for
t
in
tags
:
if
t
[
0
]
==
'#'
:
break
else
:
## print 'No color tag found!'
return
red
,
green
,
blue
=
ColorDB
.
rrggbb_to_triplet
(
t
)
self
.
__sb
.
update_views
(
red
,
green
,
blue
)
## print 'No color tag found!'
return
red
,
green
,
blue
=
ColorDB
.
rrggbb_to_triplet
(
t
)
self
.
__sb
.
update_views
(
red
,
green
,
blue
)
def
__quit
(
self
,
event
=
None
):
sys
.
exit
(
0
)
...
...
@@ -112,5 +88,11 @@ class ListViewer:
self
.
__root
.
deiconify
()
def
update_yourself
(
self
,
red
,
green
,
blue
):
colorname
=
ColorDB
.
triplet_to_rrggbb
((
red
,
green
,
blue
))
self
.
__selectbox
(
colorname
)
canvas
=
self
.
__canvas
# turn off the last box
if
self
.
__lastbox
:
canvas
.
itemconfigure
(
self
.
__lastbox
,
outline
=
''
)
# turn on the current box
colortag
=
ColorDB
.
triplet_to_rrggbb
((
red
,
green
,
blue
))
canvas
.
itemconfigure
(
colortag
,
outline
=
'black'
)
self
.
__lastbox
=
colortag
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