Skip to content

Commit

Permalink
Appearance improvements
Browse files Browse the repository at this point in the history
During scanning, the red button text changes to stop instead of exit.
In embedded skin adds a border to the progress bar.
Shows a progress bar only when starting a scan.

skip-release
  • Loading branch information
Taapat committed Nov 12, 2023
1 parent 653ab21 commit ccea8a7
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/FreeChannelsUi.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class FreeChannelsMain(ChannelSelectionBase):
skin = """<screen position="center,center" size="655*f,470*f">
<widget source="service" render="Label" position="15*f,10*f" size="625*f,30*f" font="Regular;25*f"/>
<widget source="scanned_service" render="Label" position="15*f,50*f" size="625*f,30*f" font="Regular;25*f"/>
<widget name="scan_progress" position="15*f,90*f" size="625*f,20*f"/>
<widget name="scan_progress" position="15*f,90*f" size="625*f,20*f" borderWidth="1"/>
<widget name="list" position="15*f,120*f" size="625*f,280*f" enableWrapAround="1" scrollbarMode="showOnDemand" serviceItemHeight="28*f" serviceNameFont="Regular;22*f" serviceNumberFont="Regular;20*f" serviceInfoFont="Regular;15*f"/>
<ePixmap position="15*f,415*f" size="140*f,40*f" pixmap="skin_default/buttons/red.png" transparent="1" alphatest="blend"/>
<widget source="key_red" render="Label" position="15*f,415*f" zPosition="2" size="140*f,40*f" valign="center" halign="center" font="Regular;20*f" transparent="1"/>
Expand All @@ -56,6 +56,7 @@ def __init__(self, session):
self["service"] = StaticText(_("Choose where to search for free channels"))
self["scanned_service"] = StaticText()
self["scan_progress"] = ProgressBar()
self["scan_progress"].hide()
key_text = self["key_red"].text
self["key_red"] = StaticText(key_text)
key_text = self["key_green"].text
Expand Down Expand Up @@ -149,6 +150,7 @@ def get_services_list(self):
services = self.get_services(self.cur_root)
self.services_count = len(services)
self["scan_progress"].range = (0, self.services_count)
self["scan_progress"].show()
services.append(None) # Marks the end of the list
i = 0
for service in services:
Expand All @@ -168,6 +170,7 @@ def zap_service(self, stop=False):
else:
self["service"].text = _("Search complete")
self["scanned_service"].text = ""
self["key_red"].text = _("Exit")
self.services_count = -1 # Marks search complete

@staticmethod
Expand Down Expand Up @@ -268,7 +271,7 @@ def ok_selected(self):
def start_scan(self, answer):
if answer:
self.title = _("Search for free channels")
self["key_red"].text = _("Exit")
self["key_red"].text = _("Stop")
self["key_green"].text = ""
self["key_yellow"].text = ""
self["key_blue"].text = ""
Expand Down

0 comments on commit ccea8a7

Please sign in to comment.