slider return correct values
This commit is contained in:
1 parent
c604d8a768
commit
e962e4bfa6
1 file changed
+15
-5
+15
-5
@@ -106,19 +106,29 @@ s_slider_double = DoubleVar()
|
|||||||
|
|
||||||
|
|
||||||
def get_sliders():
|
def get_sliders():
|
||||||
return b_slider_double.get(), c_slider_double.get(), s_slider_double.get()
|
|
||||||
|
print(
|
||||||
|
b_slider_double.get() / 100,
|
||||||
|
c_slider_double.get() / 100,
|
||||||
|
s_slider_double.get() / 100,
|
||||||
|
)
|
||||||
|
return (
|
||||||
|
b_slider_double.get() / 100,
|
||||||
|
c_slider_double.get() / 100,
|
||||||
|
s_slider_double.get() / 100,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
b_slider_val, c_slider_val, s_slider_val = get_sliders()
|
b_slider_val, c_slider_val, s_slider_val = get_sliders()
|
||||||
|
|
||||||
# 1 to 100 → 0 to 1
|
# 1 to 100 → 0 to 1
|
||||||
b_slider = Scale(parent, variable=b_slider_double, from_=1, to=100, orient=HORIZONTAL)
|
b_slider = Scale(parent, variable=b_slider_double, from_=0, to=100, orient=HORIZONTAL)
|
||||||
c_slider = Scale(parent, variable=c_slider_double, from_=1, to=100, orient=HORIZONTAL)
|
c_slider = Scale(parent, variable=c_slider_double, from_=0, to=100, orient=HORIZONTAL)
|
||||||
s_slider = Scale(parent, variable=s_slider_double, from_=1, to=100, orient=HORIZONTAL)
|
s_slider = Scale(parent, variable=s_slider_double, from_=0, to=100, orient=HORIZONTAL)
|
||||||
|
|
||||||
show_enhance_button = Button(
|
show_enhance_button = Button(
|
||||||
parent,
|
parent,
|
||||||
text="Apply b",
|
text="Preview",
|
||||||
command=get_sliders,
|
command=get_sliders,
|
||||||
bg="yellow",
|
bg="yellow",
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in new issue
Block a user