On 7/12/09, Petr Vanek <[email protected]> wrote:
> Ehm,
>
> as you know i am no programmer, i just play :)
>
> i have simply tweaked the shr-settings shr_gpsinfo.py to show the sat
> status as Sliders (as progress bar doesn't seem to be available through
> python). The _only_ issue is that the slider is too high for all the
> sats to be seen on the screen and i cannot find the height parameter...
> any idea?
>
> cheers
> Petr
>
>
>     def update(self, sats):
>        print "update satellites"
>        sats.sort()
>        for row in range(0,12):
>          if len(self.satlab) <= row:
>              self.satlab.append(elementary.Slider(self.tab))
>              self.satlab[row].size_hint_align_set (-1.0, -1.0)
>            self.satlab[row].span_size_set(60)
>            self.satlab[row].min_max_set(0, 100)
>            self.satlab[row].show()    
>            self.tab.pack(self.satlab[row], 1, row, 1, 1)
>
>          if row < len(sats):
>            (prn, inuse, ele, azi, srn) = sats[row]
>            if inuse:
>                self.satlab[row].color_set(1,100,1,200)
>            else:
>                self.satlab[row].color_set(100,1,1,100)
>            self.satlab[row].label_set("%d (%d,%d) %d" % (prn, ele, azi,srn))
>          else:
>            # delete empty rows
>            self.satlab[row].label_set("")
>
>        self.satlab[row].value=srn

Nice! You could maybe try self.satlab[row].scale_set(0.8), or even
with lower values. If that still doesn't work, you could have to
adjust finger_size_set.
_______________________________________________
Shr-User mailing list
[email protected]
http://lists.shr-project.org/mailman/listinfo/shr-user

Reply via email to