Skip to content

Commit

Permalink
Fix colors panel
Browse files Browse the repository at this point in the history
Sliders need `int` value.
  • Loading branch information
speleo3 committed Mar 15, 2024
1 parent 795e664 commit 8463226
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions modules/pmg_qt/pymol_qt_gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -573,9 +573,9 @@ def update_gui(*args):
R = form.input_R.value()
G = form.input_G.value()
B = form.input_B.value()
form.slider_R.setValue(R * 100)
form.slider_G.setValue(G * 100)
form.slider_B.setValue(B * 100)
form.slider_R.setValue(round(R * 100))
form.slider_G.setValue(round(G * 100))
form.slider_B.setValue(round(B * 100))
form.frame_color.setStyleSheet(
"background-color: rgb(%d,%d,%d)" % (
R * 0xFF, G * 0xFF, B * 0xFF))
Expand Down

0 comments on commit 8463226

Please sign in to comment.